I'm trying to use v:lua to call functions written in lua (actually it's fennel, which compiles to lua).
Now I have a function named lisp-style
, then I can't directly use v:lua.lisp-style()
because it's not a valid symbol in vim script.
Here's the specific situation:
_G["lisp-style"] = function() return "b" end
vim.api.nvim_set_keymap("n", "<leader>a", "v:lua.lisp-style()", {noremap=true, expr=true})
So, is there a better approach?
Thanks a lot!