Skip to content
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

Neovim syntax files for vimscript break highlighting in Vim #582

Closed
reneegyllensvaan opened this issue Oct 11, 2020 · 3 comments
Closed

Comments

@reneegyllensvaan
Copy link

Does this bug happen when you install plugin without vim-polyglot?
(not really applicable since it's vim's runtime files, but it does not happen without vim-polyglot)

Describe the bug:
Polyglot recently started breaking vimscript highlighting for me on vanilla vim. It looks like it changed with the fix for #578, where the vimscript files were swapped for neovim's. These don't seem to work with regular vim, causing unhighlighted command names, and highlighting most function calls in command definitions as errors.

I use Vim8 packages, without a wrapper, as an opt package, that I manually load before setting filetype and syntax.

To Reproduce:
Grab this minimal self-installing vimrc (or just don't load polyglot some other way)

" vim: ft=vim
call system('mkdir -p '.$HOME.'/pack/plugins/opt')
if empty(glob('~/.vim/pack/plugins/opt/polyglot'))
  call system('git clone https://github.com/sheerun/vim-polyglot ~/.vim/pack/plugins/opt/polyglot')
end

if $USE_POLYGLOT == "yes"
  packadd polyglot
end

filetype plugin indent on
syntax on

command! Foo call split(expand('%'), '/')

augroup edcon
  autocmd!
  autocmd FileType special echo expand(':e')

augroup END

Running two vim instances, the one on the left with just vim ~/.vimrc, the other one with USE_POLYGLOT=yes vim ~/.vimrc gives:
image

@ghifarit53
Copy link

I haven't updated my vim plugins for months. Today I updated all of them and realized I got this issue too when editing my vimrc. Also, changing the color of vimOption group seems gave no effect

It looks like this
null

When normally, it looks like this
null

@reneegyllensvaan
Copy link
Author

@ghifarit53 You can add let g:polyglot_disabled = ['vim.plugin'] to your vimrc before you load vim-polyglot to fall back to the bundled runtime highlighting (which is what it seems like it used previously anyway) as a workaround until this is fixed.

@sheerun
Copy link
Owner

sheerun commented Oct 14, 2020

Thanks. I'll just remove vim syntax from polyglot for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants