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

feat(R.nvim): add option to register treesitter parsers for quarto and rmd files #239

Merged
merged 2 commits into from
Oct 3, 2024

Conversation

PMassicotte
Copy link
Collaborator

nvim-treesitter recently stoped to register rmd and quarto as filetypes. This is a problem because the syntax highlighting is not working anymore. This PR adds a new option register_treesitter to let the user decide if they want to register the filetypes or not. By default, the filetypes are registered.

See the commit here: nvim-treesitter/nvim-treesitter@da61d31

…d rmd files

Add `register_treesitter` option to configuration to enable or disable
treesitter parser registration for quarto and rmd files. Default is true.
@PMassicotte
Copy link
Collaborator Author

See also nvim-treesitter/nvim-treesitter#7183

@PMassicotte
Copy link
Collaborator Author

You can watch the video for reference. The issue stemmed from the order of registration, which might cause problems when using gc to comment lines. Depending on the order, the commented line might use either # or <!-- xxx -->.

- Make description of `register_treesitter` short.
- Add full description of `register_treesitter` (and fix broken link).
@jalvesaq
Copy link
Member

jalvesaq commented Oct 2, 2024

When we put |something| in Vim documentation, we have to add the corresponding *something*. Otherwise, we get a broken link. I fixed the broken link with the new section 6.41. I also shortened the short description to fit it in a single line. If you think it is OK, the pull request can be merged.

@PMassicotte
Copy link
Collaborator Author

That is perfect! Thank you for the info.

@PMassicotte PMassicotte merged commit ff1a929 into main Oct 3, 2024
2 checks passed
@jalvesaq jalvesaq deleted the register-quarto-qmd-treesitter branch October 3, 2024 10:58
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.

2 participants