nvim: Use ex commands as methods instead of string on vim.cmd

This commit is contained in:
Sanchayan Maity 2022-09-17 10:49:20 +05:30
parent f04308f569
commit 4b18ecad6d
2 changed files with 3 additions and 3 deletions

View file

@ -92,7 +92,7 @@ vim.g.tmux_navigator_save_on_switch = 1
-- We do this to prevent the loading of the system fzf.vim plugin. This is
-- present at least on Arch/Manjaro
vim.api.nvim_command('set rtp-=/usr/share/vim/vimfiles')
vim.cmd.set{ args = { 'rtp-=/usr/share/vim/vimfiles' } }
-- Disable virtual text for all diagnostics
vim.diagnostic.config({
underline = false,
@ -114,4 +114,4 @@ require 'keymappings'
require 'lsp'
-- Load our custom color scheme
vim.api.nvim_command('colorscheme yolokai')
vim.cmd.colorscheme('yolokai')

View file

@ -105,7 +105,7 @@ local switch_source_header = function()
return
end
vim.api.nvim_command('edit ' .. vim.uri_to_fname(result))
vim.cmd.edit(vim.uri_to_fname(result))
end, 0)
else
print 'Method switchSourceHeader is not supported by server active on the current buffer'