nordtheme / vim

An arctic, north-bluish clean and elegant Vim theme.
https://www.nordtheme.com/ports/vim
MIT License
2.52k stars 275 forks source link

JSX brackets too light #179

Closed maharjanaman closed 4 years ago

maharjanaman commented 4 years ago

Hi, I'm using neo vim on iterm2 with nord color scheme. I have syntax highlighted from vim-polyglot and JSX brackets seems to light for visibility. The same case is with the comments. Is there anyway to change this?

Screen Shot 2019-11-20 at 19 00 05
arcticicestudio commented 4 years ago

Hi @maharjanaman :wave:, thanks for your contribution :+1: Since the highlighting is defined by an external plugin that is not explicitly supported by Nord, the style might not fit Nord's design. The plugin can override any style group of any syntax and it looks like they prefer to use a darker color, in this case it looks like nord3, which is used by Nord for elements like comments.

You can fix this by overriding the style for the brackets only for Nord so it doesn't affect other themes. You can follow the instructions in the official Nord Vim „Customization” documentation. To get the name of the group for the brackets you can add a function to your vimrc that shows syntax highlighting groups for the current cursor position.

maharjanaman commented 4 years ago

Thanks for the quick response. Even if I remove the highlighting plugin, the theme just gives white colors for jsx tag brackets. Sorry for troubling you, I new to this vim and I just couldn't figure out color combination of ctermfg and guifg 😞.

arcticicestudio commented 4 years ago

"White" colors are correct, Nord uses nord4 - nord6 for such elements and they don't need a color which gives them more attention (only "required overhead" for compiler/interpreter and not actually and important part of the business logic).

The ctermfg option is used when running Vim in a terminal while guifg is for the Vim GUI version. When enabling the termguicolors option in your vimrc, Vim supports true colors which allows to use colors that were previously only available in GUI mode.

if (has("termguicolors"))
  set termguicolors
endif
arcticicestudio commented 4 years ago

Maybe we can add dedicated support for the vim-polyglot plugin so it works out-of-the-box with Nord. It looks like the highlighting for JSX is by far better than the one bundled with Vim.

maharjanaman commented 4 years ago

Ohh, so I'm using tmux 2.9 and because of this, I had to disable termguicolors. If just running nvim, the colors look great and comments are not too light as well. So anyway to make it work with tmux? P.S. with termguicolors enable on tmux, I get different sets of colors.

maharjanaman commented 4 years ago

Adding set -ga terminal-overrides ",xterm-256color:Tc" on .tmux.conf made somewhat better. 😅

maharjanaman commented 4 years ago

Just for my curiosity, shouldn't theme of vscode be similar to this vim theme. Sorry to trouble you again, also you can close this issue as its third party thats affecting the highlights.

arcticicestudio commented 4 years ago

Most applications / editors using their own syntax highlighting / parsing engine so it's hard to port themes consistently. VS Code itself is written in TypeScript (JavaScript) so it natively understands JSX and I guess they are also parsing the code into as AST (using some high-performance library like treesitter) which is way more accurate and allows a lot of more features than the regex based parsing used by Vim and Vim syntax plugins.

Nice to see the theme now works for you, most of the time the setup / environment / third-party code is the reason for such problems.