- Notifications
You must be signed in to change notification settings - Fork1.7k
-
Hi! How can I change the parser settings that are in the parses.lua file? I've tried several ways, but the values in that file can't be overwritten. Any ideas? |
BetaWas this translation helpful?Give feedback.
All reactions
Replies: 3 comments 3 replies
-
BetaWas this translation helpful?Give feedback.
All reactions
-
Hi! vim.api.nvim_create_autocmd("User", {pattern="TSUpdate",callback=function()require("nvim-treesitter.parsers").jsonc= {install_info= {path="/srv/ARCHER/BRRIOLN036503/src/tree-sitter-jsonc", }, }end,}) |
BetaWas this translation helpful?Give feedback.
All reactions
-
No idea, never done this before. Just prompted you to what the official docs say. Actually you should see a bit to the bottom of the README about modifying parsers. Apparently, in vim.api.nvim_create_autocmd('User', {pattern='TSUpdate',callback=function()require('nvim-treesitter.parsers').jsonc.install_info.path="/srv/ARCHER/BRRIOLN036503/src/tree-sitter-jsonc"end}) |
BetaWas this translation helpful?Give feedback.
All reactions
-
The modification is applied to the parser table, but the parser is not compiled; nothing happens when I use the print(vim.inspect(require("nvim-treesitter.parsers"))) |
BetaWas this translation helpful?Give feedback.
All reactions
-
There are both |
BetaWas this translation helpful?Give feedback.
All reactions
-
It worked! |
BetaWas this translation helpful?Give feedback.