shaunsingh / nord.nvim

Neovim theme based off of the Nord Color Palette, written in lua with tree sitter support
GNU General Public License v2.0
796 stars 107 forks source link

Neovim API #115

Closed Isrothy closed 1 year ago

Isrothy commented 1 year ago

@shaunsingh Firstly, thank you very much for your plugin. I wonder why don't you use vim.api.nvim_set_hl to set the highlights. Instead, you use util.highlight to implement the same(maybe?) function. And I notice that there is a closed branch nvim api rewrite which uses vim.api.nvim_set_hl. Why is it abandoned? And are you going to rewrite the api in the future?

shaunsingh commented 1 year ago

I wonder why don't you use vim.api.nvim_set_hl to set the highlights.

I should and I will probably rewrite the theme sometime. I've just temporarily moved away from neovim to pursue some other projects but I'll pick it back up soon

And I notice that there is a closed branch nvim api rewrite which uses vim.api.nvim_set_hl. Why is it abandoned? And are you going to rewrite the api in the future?

That branch was a proof of concept back when nvim_set_hl was in its infancy and we didn't have global namespace before, so it didn't work properly. But yup, I'll be switching to the new api in the future

I did do some benchmarking and the lua api is quite a bit faster as well so, that'll be nice