vim-nerdtree-syntax-highlight
vim-nerdtree-syntax-highlight copied to clipboard
No longer work in recent Neovim v0.8.0
Upon upgrading to Neovim v0.8.0, I got this error:
Error detected while processing function projectroot#exe[7]..function projectroot#exe[4]..204[2]..205[14]..188[19]..194[16]..201[34]..FileType Auto
commands for "*"..Syntax Autocommands for "*"..function <SNR>61_SynSet[25]..script /home/brian/.local/share/nvim/plugged/vim-nerdtree-syntax-highli
ght/after/syntax/nerdtree.vim:
line 458:
E5248: Invalid character in group name
Press ENTER or type command to continue
It looks like it is related to this neovim PR - https://github.com/neovim/neovim/pull/19830
I created a fork where I removed all the keys with invalid characters https://github.com/johnstef99/vim-nerdtree-syntax-highlight/tree/master. This should not thrown any errors.
By my understanding this plugin always created Groups with invalid characters but as of nvim v0.8.0 instead of that resulting to just a message, now is resulting into an error message. As you can see here in line highlight_group.c:1756.
I created a fork where I removed all the keys with invalid characters
Thanks I will use your fork instead, seems like the maintainer of this repo is rarely active now.
@johnstef99 Thank you! 🎉
FWIW, here is a branch that preserves all of the highlight groups (i.e. doesn't delete entries) and doesn't throw errors: https://github.com/jcharum/vim-nerdtree-syntax-highlight/tree/escape-keys
It's a terrible hack to eliminate the (used) invalid characters from the group name construction.
FWIW, here is a branch that preserves all of the highlight groups (i.e. doesn't delete entries) and doesn't throw errors: https://github.com/jcharum/vim-nerdtree-syntax-highlight/tree/escape-keys
It's a terrible hack to eliminate the (used) invalid characters from the group name construction.
yeah I know the right way was to escape the invalid chars, but I couldn't care less to not have 4 filetypes highlighted 😅. Thank you for doing that!!
@jcharum Even with your escape function if a new filetype was added with a char that isn't in [+,-,#] will result into an error. I refactored it so every invalid char will turn into an underscore (check here).
I created a fork where I removed all the keys with invalid characters https://github.com/johnstef99/vim-nerdtree-syntax-highlight/tree/master. This should not thrown any errors.
By my understanding this plugin always created Groups with invalid characters but as of nvim v0.8.0 instead of that resulting to just a message, now is resulting into an error message. As you can see here in line highlight_group.c:1756.
Would you like to create a PR in this repo?
I created a fork where I removed all the keys with invalid characters https://github.com/johnstef99/vim-nerdtree-syntax-highlight/tree/master. This should not thrown any errors. By my understanding this plugin always created Groups with invalid characters but as of nvim v0.8.0 instead of that resulting to just a message, now is resulting into an error message. As you can see here in line highlight_group.c:1756.
Would you like to create a PR in this repo?
@Griiid there's already a PR submitted to this repo: https://github.com/tiagofumo/vim-nerdtree-syntax-highlight/pull/54.
I created a fork where I removed all the keys with invalid characters https://github.com/johnstef99/vim-nerdtree-syntax-highlight/tree/master. This should not thrown any errors.
By my understanding this plugin always created Groups with invalid characters but as of nvim v0.8.0 instead of that resulting to just a message, now is resulting into an error message. As you can see here in line highlight_group.c:1756.
Huge bro!!
FWIW, here is a branch that preserves all of the highlight groups (i.e. doesn't delete entries) and doesn't throw errors: https://github.com/jcharum/vim-nerdtree-syntax-highlight/tree/escape-keys
It's a terrible hack to eliminate the (used) invalid characters from the group name construction.
Perfect, it works like a charm!!!
Plug 'jcharum/vim-nerdtree-syntax-highlight', { 'branch' : 'escape-keys' }
@jcharum you should consider to submit a PR.
Issue closed to avoid more off-topic comments.
~~For those who wanting a solution, there are currently two forks you can use:~~
Plug 'johnstef99/vim-nerdtree-syntax-highlight'
Plug 'jcharum/vim-nerdtree-syntax-highlight', { 'branch' : 'escape-keys' }
~~There is already a proposed pull request https://github.com/tiagofumo/vim-nerdtree-syntax-highlight/pull/54, but seems like the maintainer of this repo is unavailable at the moment. For now, just stick with one of the forks.~~
Update: it's merged 🎉🎉🎉