Open jnoortheen opened 2 months ago
For inspiration, tree-sitter-nix
seems to use various prefixes to decide whether a string should be injected as bash:
/* bash */
comment beforehand (also supports e.g. /* python */
etc. but not sure if this is feasible with LSP / tmLanguage)writeShellScript
, runCommand
, writeShellApplication
configurePhase
, buildPhase
etc.Supporting the /* bash */
comments would be nice if possible, since this allows for highlighting scripts in let
bindings and arbitrary function args that might not be recognized automatically, while still leaving other multi-line strings as plain strings.
Edit: it may also be feasible to use request forwarding to support arbitrary language servers, so VSCode could fall back to something like bash-lsp for highlighting/completion etc