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

Change R markdown language id to fix language server filetype detection #9012

Merged
merged 1 commit into from
Dec 15, 2023

Conversation

mtoohey31
Copy link
Contributor

This merge request renames the R markdown language from rmarkdown to rmd. When I added R and R markdown support back in #1998, I mistakenly chose the rmarkdown name because I didn't realize it was used for anything other than the display name in Helix's statusline. Switching the name to rmd is necessary to fix the R language server's filetype detection, which relies on the language name (see this line of code).

Copy link
Member

@the-mikedavis the-mikedavis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should fix this by adding the language-id = "rmd" key instead: that will send rmd to the language server but still keep rmarkdown as the name for :set-language etc.

@mtoohey31
Copy link
Contributor Author

Cool, didn't know that was a thing, thanks @the-mikedavis. I've confirmed that the language server works if we change that instead and pushed the simplified changes.

Copy link
Member

@the-mikedavis the-mikedavis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@mtoohey31 mtoohey31 changed the title Change R markdown language name to fix language server detection Change R markdown language id to fix language server filetype detection Dec 6, 2023
@the-mikedavis the-mikedavis added S-waiting-on-review Status: Awaiting review from a maintainer. A-language-support Area: Support for programming/text languages labels Dec 6, 2023
@archseer archseer merged commit 1185632 into helix-editor:master Dec 15, 2023
6 checks passed
@mtoohey31 mtoohey31 deleted the fix/rmd branch December 15, 2023 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-language-support Area: Support for programming/text languages S-waiting-on-review Status: Awaiting review from a maintainer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants