bash-language-server icon indicating copy to clipboard operation
bash-language-server copied to clipboard

Ability to disregard certain bash script

Open lamyergeier opened this issue 4 years ago • 2 comments

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.

image

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.

lamyergeier avatar Jun 04 '20 09:06 lamyergeier

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.

matmel avatar Jun 19 '20 15:06 matmel

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

skovhus avatar Jun 20 '20 06:06 skovhus

This seems to have been fixed in the newer version of the grammar.

skovhus avatar Nov 25 '22 13:11 skovhus