VS Code can syntacally parse bash source code but there is no outline of vars and functions in the OUTLINER.
REF: bash-lsp/bash-language-server#41 Need to have npm installed
sudo npm i -g bash-language-server tree-sitter tree-sitter-bash --unsafe-perm
If npm is not installed, run this command to install on Red Hat/CentOS/Fedora
sudo yum -y install npm
Make sure the Bash IDE extension is installed.
Started vscode and opened a folder/directory. When I click on files in the directory list, a tab appears. I noticed that the tab title was in italics (this should have meant it was a quick-preview). When I tried opening another file by clicking on the directory list, the previous file would go away. I was expecting to see 2 tables, one for each tab. I could get them to stay in the OPEN EDITORs panel if I made a change (tab title is no longer italics). I want to see all files as new tabs when I open then from the directory listing. Seems reasonable behavoir to me.
This took a while to find this solution. The above web site told me to change these settings: "workbench.editor.enablePreview": false and "workbench.editor.enablePreviewFromQuickOpen": false.
This was somewhat helpful but here is what I did in more detail.
- File -> Preferences -> Settings
- In the search bar at the top of the new tab type in the text
workbench.editor.enablePreview(pressing enter key was not needed). - Uncheck the checkbox. The theme colors made it hard to distinquish if there is a checkbox if this setting is already turned off (false).
- Repeated steps in 2-3 above for
workbench.editor. enablePreviewFromQuickOpen. This setting had 20 results so look closely for the correct setting to uncheck. - Close the Settings tab by clicking the X to the right of the tab name (probably on the left for Mac users).
- View -> Command Pallete...
- Type this command followed by enter key
toggle tab v. - Try to open two separate files in the directory. If there is still only one tab, repeat step 7. The toggle might have already been off.