xiyaowong / transparent.nvim

Remove all background colors to make nvim transparent
806 stars 23 forks source link

Question #32

Closed ansidev closed 1 year ago

ansidev commented 1 year ago

Is there any reason for using VimScript instead of Lua for the file plugin/transparent.vim?

xiyaowong commented 1 year ago

The main reason is to use the function dictwatcheradd

https://github.com/xiyaowong/transparent.nvim/blob/960a8c88d4e06bc6c980dddd9912589a36408833/plugin/transparent.vim#L9

ansidev commented 1 year ago

IMO, the whole vim file can be ported to Lua

For example:

vim.fn.dictwatcheradd(vim.g, 'transparent_groups', 'OnTransparentGroupsChanged')

Doc: https://neovim.io/doc/user/builtin.html

xiyaowong commented 1 year ago

Lua and Vimscript are not completely compatible, you can try your example. @ansidev