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

Fix treesitter function color and add nvim-cmp highlights #87

Merged
merged 3 commits into from
Dec 17, 2021
Merged

Fix treesitter function color and add nvim-cmp highlights #87

merged 3 commits into from
Dec 17, 2021

Conversation

David-Else
Copy link
Contributor

Please see https://github.com/hrsh7th/nvim-cmp/wiki/Menu-Appearance#how-to-add-visual-studio-code-dark-theme-colors-to-the-menu. This PR adds those highlights directly.

nvim-cmp-dark-plus

(and also this PR makes the function keyword blue in treesitter, as it should be)

jacobfoard added a commit to jacobfoard/vim-code-dark that referenced this pull request Dec 1, 2021
@tomasiser tomasiser merged commit 884ca67 into tomasiser:master Dec 17, 2021
@tomasiser
Copy link
Owner

Thank you for this PR! Merged! :)

@immjolnir
Copy link

Hi @David-Else @tomasiser

First of all, thanks for your awesome contribution. But I thought, it would be better let you know my case:

I got an error when entering the vim:

Error detected while processing function <SNR>15_hi:
line    8:
E418: Illegal value: strikethrough
Press ENTER or type command to continue

After I removed the line:

call <sid>hi('CmpItemAbbrDeprecated', s:cdGray, {}, 'strikethrough', {})

It worked as intended. Does it depend on other plugins?

FYI, its latest commit in my host is

$ git log
commit 7fe0dc672b20ef62962494560a0bc656fb237346 (HEAD -> master, origin/master, origin/HEAD)
Merge: b75d76f 0edd11c
Author: Tomáš Iser <[email protected]>
Date:   Fri Dec 17 14:58:50 2021 +0100

    Merge pull request #63 from zdzislaw-s/zdzislaw-c++-vscode-vs-vim
    
    Changes for better colorization of C++ code

Would you please take a look?

@David-Else
Copy link
Contributor Author

David-Else commented Jan 3, 2022

I think it is very rare that a terminal does not support strikethrough. It does not depend on anything apart from your terminal.

If some kind of check can be done (Afraid I don't know vimscript :( ):

IF terminal supports: call <sid>hi('CmpItemAbbrDeprecated', s:cdGray, {}, 'strikethrough', {})
ELSE it doesn't: call <sid>hi('CmpItemAbbrDeprecated', s:cdGray, {}, 'none', {})

Then it would fix it. Do you have another terminal on your machine? I found this comment that might help with this issue: tmux/tmux#612 (comment)

@immjolnir
Copy link

immjolnir commented Jan 4, 2022

Thanks for replying. I dig it deeper today and found that it is caused by the statement in ~/.vimrc:

colorscheme codedark

It will disappear when using the below:

let g:airline_theme = 'codedark'

After reading the code, I found that call <sid>hi function looks like working as below:

:hi comment guifg=Blue ctermfg=Red cterm=underline

Screenshot from 2022-01-04 23-44-05

But when I set cterm=strikethrough, the error: E418: Illegal value: strikethrough will be displayed.
Screenshot from 2022-01-04 23-44-22

So, it seems that cterm should have some predefined options, but strikethrough is not included, right?

FYI, my terminal is terminator and echo -e "\e[9mstrikethrough\e[0m" works as intended.

@tomasiser
Copy link
Owner

tomasiser commented Jan 5, 2022

Hmm, this looks like a serious problem. Interesting that no one has complained about it so far. Could you try it in a different terminal just to make sure it is really a problem of the terminal and not something deeper in your vim / system?

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

Successfully merging this pull request may close these issues.

3 participants