From 4b18ecad6daca4c6b40a4ed8868ed27a2ec80401 Mon Sep 17 00:00:00 2001 From: Sanchayan Maity Date: Sat, 17 Sep 2022 10:49:20 +0530 Subject: [PATCH] nvim: Use ex commands as methods instead of string on vim.cmd --- nvim/.config/nvim/init.lua | 4 ++-- nvim/.config/nvim/lua/lsp.lua | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua index dc89787..7ad2c5c 100644 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -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') diff --git a/nvim/.config/nvim/lua/lsp.lua b/nvim/.config/nvim/lua/lsp.lua index 4d6ce2b..e514c16 100644 --- a/nvim/.config/nvim/lua/lsp.lua +++ b/nvim/.config/nvim/lua/lsp.lua @@ -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'