feature: support shebang
Freed-Wu opened this issue · 5 comments
Freed-Wu commented
Did you check the tree-sitter docs?
- I have read all the tree-sitter docs if it relates to using the parser
Is your feature request related to a problem? Please describe.
#!/usr/bin/env -S vi -u
echo 1
Describe the solution you'd like
Support shebang in tree-sitter
Describe alternatives you've considered
highlight default link shebang Special
augroup Shebang
autocmd!
autocmd BufEnter * syntax match shebang /\%^#!.*$/ display
augroup END
Additional context
No response
clason commented
No; this is not part of the Vim syntax.
Freed-Wu commented
vim syntax support shebang. This is a demo:
#!/usr/bin/env vim -u
echo 1
$ chmod +x test.vim
$ ./test.vim
1
clason commented
No, that's not Vim. That's shell.
Freed-Wu commented
See :help #!
:
*:#!*
:#!{anything} Ignored, so that you can start a Vim script with: >
#!vim -S
echo "this is a Vim script"
quit
clason commented
That's just a generalized comment marker. Can be added, but low priority.