diff --git a/neovim/lua/plugins.lua b/neovim/lua/plugins.lua index e1b1bfb..f6b577c 100644 --- a/neovim/lua/plugins.lua +++ b/neovim/lua/plugins.lua @@ -121,6 +121,7 @@ return require('packer').startup(function() } use { "glepnir/lspsaga.nvim", + opt = true, requires = "neovim/nvim-lspconfig", config = function() require("plugins.lsp").config_lsp_saga() end, } diff --git a/neovim/lua/plugins/lsp.lua b/neovim/lua/plugins/lsp.lua index 9251257..6459d17 100644 --- a/neovim/lua/plugins/lsp.lua +++ b/neovim/lua/plugins/lsp.lua @@ -69,7 +69,7 @@ local function default_attach(client, bufnr) end -- Use LspSaga features, if possible - if packer_plugins["lspsaga.nvim"] then + if utils.is_plugin_loaded("lspsaga.nvim") then buf_set_keymap('n', 'K', "lua require('lspsaga.hover').render_hover_doc()", opts) buf_set_keymap('n', 'rn', "lua require('lspsaga.rename').rename()", opts) buf_set_keymap('n', 'e', "lua require('lspsaga.diagnostic').show_line_diagnostics()", opts)