tiagovla / tokyodark.nvim

A clean dark theme written in lua for neovim.
453 stars 19 forks source link

Updated highlights with Neovim V0.9 LSP highlighting. #28

Closed Bats6789 closed 3 months ago

Bats6789 commented 7 months ago

Neovim V0.9.0 added support for semantic highlighting using LSP's. This commit adds the additional highlight groups to support that feature.

The highlight groups are only added if the user has V0.9 or higher. Previous version should exclude the additional groups, which may be unnecessary.

This commit also adds a table concatenation function in the utils folder. This function is used for adding the additional highlight groups.

shreyas-a-s commented 3 months ago

Maybe a stupid question, but I am curious that's why I am asking.

Is it possible to check the changes in highlighting after applying this change? Because I copied some code from here and even after applying the changes to tokyodark colorscheme files I couldn't see any visible changes.

Or is this some change that only will be noticeable when the a plugin or language specifically makes use of this semantic highlighting feature?

Bats6789 commented 3 months ago

Maybe a stupid question, but I am curious that's why I am asking.

Is it possible to check the changes in highlighting after applying this change? Because I copied some code from here and even after applying the changes to tokyodark colorscheme files I couldn't see any visible changes.

In the case of semantic highlighting, you must have an LSP that is capable of reporting semantic highlighting.

Or is this some change that only will be noticeable when the a plugin or language specifically makes use of this semantic highlighting feature?

You should be able to see changes occur by using the hi command. Use the :Inspect command over some text you expect to receive the semantic highlighting and see if it has @lsp highlighting group.

tiagovla commented 3 months ago

Hey, just include the highlight groups directly under here. Older versions will probably ignore it. If not, there's a version check function in utils, and table concatenation can be done using vim.tbl_extend.

Bats6789 commented 3 months ago

Hey, just include the highlight groups directly under here. Older versions will probably ignore it. If not, there's a version check function in utils, and table concatenation can be done using vim.tbl_extend.

I moved the highlights to the suggested section.