Last active
May 13, 2022 09:46
-
-
Save maksimr/8e7646738a87947c1664a8d70dc4ca19 to your computer and use it in GitHub Desktop.
Vim Embed clojure language into sh for babashka (bb) command
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Clojure Embedding: | |
" ============== | |
if exists("b:current_syntax") | |
unlet b:current_syntax | |
endif | |
syn include @CLJScript syntax/clojure.vim | |
syn region CLJScriptCode matchgroup=CLJCommand start=+[=\\]\@<!'+ skip=+\\'+ end=+'+ contains=@CLJScript contained | |
syn region CLJScriptEmbedded matchgroup=CLJCommand start=+\<bb\>+ skip=+\\$+ end=+[=\\]\@<!'+me=e-1 contains=@shIdList,@shExprList2 nextgroup=CLJScriptCode | |
syn cluster shCommandSubList add=CLJScriptEmbedded | |
hi def link CLJCommand Type |
brew install borkdude/brew/babashka
brew install clojure/tools/clojure
brew install clojure-lsp/brew/clojure-lsp-native
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Should be placed in
~/.vim/after/syntax/zsh
. zsh can be replaced by any other shell language which we want to extend