spacevim/.SpaceVim.d/plugin/neovim-qt.lua

25 lines
577 B
Lua
Raw Permalink Normal View History

2024-08-21 14:17:26 +08:00
if vim.api.nvim_create_user_command then
vim.api.nvim_create_user_command('Nvim', function(opt)
local cmd = { 'nvim-qt', '--' }
for _, v in pairs(opt.fargs) do
table.insert(cmd, v)
end
vim.fn.jobstart(cmd)
end, { nargs = '*', complete = 'file' })
vim.api.nvim_create_user_command('Vim', function(opt)
local cmd = { 'gvim' }
for _, v in pairs(opt.fargs) do
table.insert(cmd, v)
end
vim.fn.jobstart(cmd, {
env = {
VIM = '',
VIMRUNTIME = '',
},
})
end, { nargs = '*', complete = 'file' })
end