-
Notifications
You must be signed in to change notification settings - Fork 14
Far behind sh/bash #37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
First of all, shell language is very complex. I do not intend to allow to color every possible obscure shell language feature. Look at the default shell syntax file that comes with vim/neovim and at the same time, how many different bug reports are opened. So a simpler zsh syntax is actually a feature. However, if you are missing something specific, please let me know and I see if I can support this. |
wow, that is very shiny and in my opinion a bit too much. Having said that, I am not against enhancing the current syntax script, but we need to be very careful, not to introduce regressions while keeping it fast and performant. So I'll leave that to someone who wants to actually spend time on it, I am open for PRs. I personally don't feel comfortable making those adjustments :( |
My expectation would be that |
Aha! File: ftplugin/bash.vim " Vim filetype plugin file
" Language: bash
" Maintainer: Bram Moolenaar
" Last Changed: 2019 Jan 12
"
" This is not a real filetype plugin. It allows for someone to set 'filetype'
" to "bash" in the modeline, and gets the effect of filetype "sh" with
" b:is_bash set. Idea from Mahmode Al-Qudsi.
if exists("b:did_ftplugin")
finish
endif
unlet! b:is_sh
unlet! b:is_kornshell
let b:is_bash = 1
runtime! ftplugin/sh.vim ftplugin/sh_*.vim ftplugin/sh/*.vim |
Then reopen this issue? |
FWIW, I think I like this. It would be interesting to compare that and zsh-syntax-highlighting's defaults: for instance, default highlighting of delimiter quotes and lack of highlighting of command words. (I'm not unaffiliated.) |
Yes, it would be great to somewhat unify these tools, Emacs highlighting could be another place to look. |
Somewhat related: zsh-users/zsh-syntax-highlighting#327. That issue imagined other parser consumers would be written in zsh, as opposed to VimL/elisp, but I'm putting it here for context (and in the hope that one day it'll turn out to be the proverbial apple that falls on an unsuspecting head). |
When editing a zsh script in neovim I get much richer syntax highlighting using the
sh
orbash
filetype. Isn't this somehow based onsh
? Is this related to neovim?The text was updated successfully, but these errors were encountered: