3 ms·
Still, it would be pretty handy. For example a good Zsh linter could warn you if you use a Bashism that isn't valid in Zsh, or it could switch to Posix mode if
by nerdponx 4y ago
Still, it would be pretty handy. For example a good Zsh linter could warn you if you use a Bashism that isn't valid in Zsh, or it could switch to Posix mode if you set `emulate sh`, or warn you when an autoload function file is missing its function call at the bottom, etc.
- Beltalowda 4y agoSure, but that's "only" useful warnings/errors of that kind that are useful for any language, rather than footguns that work on first approximation and then don't ($*, unquoted $@, unquoted $var, stuff like that). A zsh LSP would be nice as well.
- nerdponx 4y agoVery fair! I bet you could use the C "module" interface to write the Zsh LSP in Zsh itself...
- Beltalowda 4y agoThere's https://github.com/zsh-users/zsh-syntax-highlighting https://github.com/zsh-users/zsh-syntax-highlighting which does some parsing, but I never looked at the details of it (I just know it exists).