1

VS Code has great Bash language support -- syntax highlighting (via shellscript), LSP support (via Bash-IDE), linting (via vscode-shellcheck), and a debugger (via bash debug). There is a Bash-based TAP-compliant unit test framework called BATS that also has syntax highlighting support for some new BATS-specific keywords (via bats). I'd primarily like to marry the Bash LSP with the BATS syntax language so that I can get individual tests listed in the VS Code outline panel, but I'd also be potentially interested in shellcheck linting as well (though that is a bigger project, I think).

There are pieces of all of this architecture that are extensively documented, but I haven't found anything that documents how all of these work together, let alone how to then derive off of them. A fundamental question therefor is: can I define a new language as an extension of an existing one such that I pick up all of this language support for free, albeit with different/added keyword definitions? I guess each piece has their own definition of the different syntax elements (e.g. how a "function" is defined), so perhaps I need to override each one of them individually somehow?

Joe Casadonte
  • 15,888
  • 11
  • 45
  • 57

0 Answers0