R-nvim / R.nvim

Neovim plugin to edit R files
GNU General Public License v3.0
178 stars 18 forks source link

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

Closed PMassicotte closed 1 month ago

PMassicotte commented 1 month ago

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: https://github.com/nvim-treesitter/nvim-treesitter/commit/da61d31a3d51f38a78a739392aabf79e7b2f523f

PMassicotte commented 1 month ago

See also https://github.com/nvim-treesitter/nvim-treesitter/issues/7183

PMassicotte commented 1 month ago

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 -->.

jalvesaq commented 1 month ago

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 commented 1 month ago

That is perfect! Thank you for the info.