-
Notifications
You must be signed in to change notification settings - Fork 30
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
highlights.scm errors #145
Comments
I think your highlights.scm is the latest while the grammar is not up-to-date. |
|
Yes, because neovim-ts has its own copy of the parser, which is several days behind this repo. |
ah, that makes sense. sorry i'm such a noob on this nvim stuff. trying to get up to speed. |
3 solutions here:
config = function(_, opts)
local parser_config = require("nvim-treesitter.parsers").get_parser_configs()
parser_config.nu = {
install_info = {
url = "~/.config/nushell/tree-sitter-nu", -- local path or git repo
files = { "src/parser.c" }, -- note that some parsers also require src/scanner.c or src/scanner.cc
branch = "pr", -- default branch in case of git repo if different from master
generate_requires_npm = false, -- if stand-alone parser without npm dependencies
requires_generate_from_grammar = false, -- if folder contains pre-generated src/parser.c
},
filetype = "nu", -- if filetype does not match the parser name
}
require("nvim-treesitter.configs").setup(opts)
end,
|
This nvim-ts config is really confusing, I still don't know how to specify local queries in And please keep this issue open for others facing the same problem. |
After doing step 2, I still get the error. So, I copied the scm files to nvim-data and things seem to be working fine. Is there a way to tell what version of tree-sitter-nu I'm running? |
@fdncred Sorry for not making it clear, actually these are exclusive solutions, not steps to follow. And I suppose even after they upgrade the nu parser, method 1 will become problematic since it still use old highlights.scm, I may need to create a PR to nvim-ts for the change. |
ya, i understood that they weren't steps. I did option 2 and got it working after i copied the scm files. |
@fdncred that's weird, if you don't remove tree-sitter-nu, it should work fine (need to update to the latest) without requiring to manually copy the scm files. Manually copying just solves everything though. |
A report this morning in editor-support in discord had me reinstalling/recompiling tree-sitter-nu. I was presented with errors.
![image](https://private-user-images.githubusercontent.com/343840/387280211-a88f216f-0897-4355-aff5-afdfe2f5af36.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg4MzMyNTgsIm5iZiI6MTczODgzMjk1OCwicGF0aCI6Ii8zNDM4NDAvMzg3MjgwMjExLWE4OGYyMTZmLTA4OTctNDM1NS1hZmY1LWFmZGZlMmY1YWYzNi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjA2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIwNlQwOTA5MThaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1kN2VmYWQ2MWFiYzVhNTAxNjgxNmZhZjQyNWU0YzJiZTA0OWRmY2YwYTQ3MzJkOGQ0N2FmOGY3NTIxNDMyYzc4JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.lnuFICEEJfUbwsLl6yxq-QwxEb6Ykj7OZG3EctZSioo)
This changed stopped the errors but I'm not sure it's a valid change.
The text was updated successfully, but these errors were encountered: