Skip to content

Only use the snippet formatter if it also can format the snippet#2898

Merged
dantleech merged 4 commits intophpactor:masterfrom
mamazu:snippet-formatter
Jun 28, 2025
Merged

Only use the snippet formatter if it also can format the snippet#2898
dantleech merged 4 commits intophpactor:masterfrom
mamazu:snippet-formatter

Conversation

@mamazu
Copy link
Copy Markdown
Contributor

@mamazu mamazu commented Jun 7, 2025

Fixes #2896

When the snippet completions is disabled the snippetformatter has no formatters attached. So it crashes when trying to format a method. Now we just don't provide any snippets for the user if the formatter does not support it.

@mamazu
Copy link
Copy Markdown
Contributor Author

mamazu commented Jun 7, 2025

I can't reproduce the error locally. But should be unrelated.

@dantleech dantleech merged commit fb791d5 into phpactor:master Jun 28, 2025
11 checks passed
@dantleech
Copy link
Copy Markdown
Collaborator

thanks!

@mamazu mamazu deleted the snippet-formatter branch June 28, 2025 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

when disable "completion_worse.snippets" plugin crashed in vscode

2 participants