You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When vim-polyglot is installed, b:is_bash is unset in [filename].bash files. This causes the undesired behavior described in dense-analysis/ale#3988, where ALE treats Bash files as sh files.
If anyone needs a workaround, I've found that this does the trick:
after/ftplugin/sh.vim:
" Work around the following bug in vim-polyglot, which causes ALE to treat files" with the "bash" file extension as POSIX shell scripts."" https://github.com/sheerun/vim-polyglot/issues/823ifexpand('%:e') ==? 'bash'letb:is_bash=1endif
Does this bug happen when you install plugin without vim-polyglot?
No, it does not. This bug appears to be related to logic in vim-polyglot's autoload/polyglot/ft.vim file.
Describe the bug:
When vim-polyglot is installed,
b:is_bash
is unset in [filename].bash files. This causes the undesired behavior described in dense-analysis/ale#3988, where ALE treats Bash files as sh files.To Reproduce:
Steps to reproduce
mv ~/.vim ~/.vim.bak.vim-polyglot-issue-823.$(date '+%s')
git clone --depth 1 https://github.com/sheerun/vim-polyglot ~/.vim/pack/plugins/start/vim-polyglot
vim example.bash
:echo b:is_bash
.Actual results
E121: Undefined variable: b:is_bash
Expected results
1
The text was updated successfully, but these errors were encountered: