Skip to content

Instantly share code, notes, and snippets.

@smolck
Created August 26, 2021 19:27
Show Gist options
  • Save smolck/1d960920ab046e2e1486d92dc8cd8736 to your computer and use it in GitHub Desktop.
Save smolck/1d960920ab046e2e1486d92dc8cd8736 to your computer and use it in GitHub Desktop.
......
return function()
vim.api.nvim_exec([[
echo luaeval("vim.fn.eval(\"'hi'\")")
]], false)
end
lua << EOF
vim.cmd [[
call luaeval('vim.fn.execute("call v:lua.require(\"why.blah\")()", "")')
]]
EOF

Don't ask, just put this in your init directory like so:

lua/why/blah.lua lua/blah.vim lua/why.lua

Now run :lua require'why'. You're welcome.

local fpath = vim.api.nvim_get_runtime_file('lua/blah.vim', false)[1]
vim.cmd([[ source ]] .. fpath)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment