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

Respect document languageId #511

Merged
merged 2 commits into from
Jan 8, 2022

Conversation

renkun-ken
Copy link
Member

@renkun-ken renkun-ken commented Jan 5, 2022

Closes REditorSupport/vscode-R#930
Closes #510

This PR supports the unused field languageId of TextDocumentItem so that any file with languageId == 'rmd' is treated as rmd file. If languageId is not provided on document open, then it will fallback to using file extension to determine if it is rmd.

@renkun-ken
Copy link
Member Author

renkun-ken commented Jan 5, 2022

@randy3k @inventionate I'm not sure about the behavior of editors other than vscode. Do they provide languageId and is it also rmd in other editors?

@randy3k
Copy link
Member

randy3k commented Jan 7, 2022

LGTM. Thanks for working on it. Sublime Text's LSP does respect ``languageId` afaict.

@renkun-ken renkun-ken merged commit d011f7b into REditorSupport:master Jan 8, 2022
@inventionate
Copy link

Sorry for the late response. Yes the built-in LSP client of Neovim provides languageId and usually equates it with the filetype. So yes, it is rmd.

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.

Respect document language specified from editor Text of non-'.Rmd' markdown files is analyzed as R code
3 participants