Skip to content
Discussion options

You must be logged in to vote

Hey @ydaveluy,

This is intended behavior (at least in VS Code). See also #1492 which contains links to a discussion surrounding this issue. In the end, we only listen to what the language client tells us.

In VS Code, if you rename a file extension to something that doesn't have a language associated with it, it will keep the old language association. You will see that the renamed file keeps the same language id (in the status bar). We correctly identify that by taking a look at the text document provided by the language client.

You can disable that behavior by overriding the ServiceRegistry. I wouldn't recommend it though, because this already works exactly how it's supposed to work.

Replies: 3 comments

Comment options

ydaveluy
Sep 5, 2024
Collaborator Author

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by ydaveluy
Comment options

ydaveluy
Sep 5, 2024
Collaborator Author

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants