bash-language-server
bash-language-server copied to clipboard
Ability to disregard certain bash script
This screenshot from VsCode. The bash script Open.sh
executes without any issue but the bash IDE underlines red each line of the code and complains Failed to parse expression
.
In general I love Bash IDE as it is helpful to get the outline of most of the script files. But clearly this looks like a limitation of the parser. It would be useful if we could specify such files in a dot file for bashide, such that those files are not processed. And may be if the parser of BashIDE improves later I could remove that file from the dotfile.
Currently I have to disable the extension to read the file.
I agree. I have the same problems with some of my scripts. What would be even more interesting is to understand why bash-server fails to parse some of those scripts.
Thanks.
Thanks for reaching out. In the vs code setting for bash ide you can disable the highlighting of parsing errors. That is a better option than disabling specific files.
I’m thinking this should probably be the default that we hide those errors. 🤔
Why does it fail? The grammar (treesitter-bash) still requires some work before it is able to parse all bash constructs. It is a fun project to contribute to if you are up for it. :)
This seems to have been fixed in the newer version of the grammar.