-
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
Help with finding ERRORs in tree-sitter-nu. #91
Comments
Fix issue with the script not working in certian cases & add an additional flag for alternative output (-R it is better when a lot of files have errors). |
Or: open the file in neovim, hit |
This is also an option, the reason why I recommended a script was twofold:
|
In no way did I want to devalue the script you provide. I noted that for completeness. |
Related Problem
Because tree-sitter-nu is still WIP there are various errors still in it. The code could still be highlighted even when errors occur (except for the snippest of code affected by the error), so they might go unnoticed.
To deal with this it can be helpful for people to test their nushell scripts via tree-sitter-cli. This can be done manually (running tree-sitter parse on every file and checking for errors there) or through I've script (tree-sitter-get-errors.nu) that I've written that I would post below.
Steps for helping out:
$env.NU_LIB_DIRS
directory - by default it is a folder called scripts in your configuration directory.use tree-sitter-get-errors.nu
tree-sitter-get-errors file1.nu file2.nu
Can take any number of files by nametree-sitter-get-errors --glob *nu
Can accept globcommand_that_returns_paths | tree-sitter-get-errors
Can take stdincolumns
to get a list of all files names with an error in them. (Optional)tree-sitter-get-errors
script, to view a list of all error line ranges (LINES START AT 0) in each file to find the code snippet that creates the TS error.Related script
The text was updated successfully, but these errors were encountered: