Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Document::language_id returning None if there is no lang server #2998

Closed
wants to merge 2 commits into from

Conversation

Mathspy
Copy link
Contributor

@Mathspy Mathspy commented Jul 7, 2022

As mentioned in #2434 (comment) this was always returning None if no language server was configured because of early returning with ? operator.
Also switched to relying on config.language_id instead of the last part of the scope because not all languages have scope configured and sometimes scope is configured as "source.md" so we would end up with "md" but returning "markdown" would make more sense, at least for the purposes of #2434

@archseer
Copy link
Member

archseer commented Jul 9, 2022

at least for the purposes of #2434

This is used primarily to signal the document type to the LSP, I'm worried that such a change would completely break some languages.

@AlexanderBrevig
Copy link
Contributor

Aslo fixes an issue with #3273 where markdown (and more) would display as text

@archseer
Copy link
Member

Merged #3338

@archseer archseer closed this Aug 30, 2022
@Mathspy Mathspy deleted the fix-language-id branch August 30, 2022 04:31
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.

3 participants