You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I only see the configuration which use vimscript, but if I want to use this plugin in neovim, how I write a new conf which use lua? Or how I use the vimscript one in neovim?
The text was updated successfully, but these errors were encountered:
neoformat works just fine in neovim. If you're wondering how to configure it using lua, the options listed in :h neoformat-config are global vimscript variables (:h g:) which you can use from lua as follows:
-- defining a custom formatter in luavim.g.neoformat_typst_typstfmt= { exe="typstfmt", replace=1 }
vim.g.neoformat_enabled_typst= { "typstfmt" }
For more information about how this works, see :h lua-vim-variables and :h lua-vimscript. You can also write vimscript inline in your lua config, so something like the following would work:
vim.cmd[[ let g:neoformat_basic_format_retab = 1 let g:neoformat_try_node_exe = 1]]
Note to maintainers: maybe it's worth adding a note about this in the README?
I only see the configuration which use vimscript, but if I want to use this plugin in neovim, how I write a new conf which use lua? Or how I use the vimscript one in neovim?
The text was updated successfully, but these errors were encountered: