Make Lspsaga optional

Issues with 0.6.0
This commit is contained in:
ViViDboarder 2021-12-08 15:55:31 -08:00
parent b8b502298e
commit 9092219d2c
2 changed files with 2 additions and 1 deletions

View File

@ -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,
}

View File

@ -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', "<Cmd>lua require('lspsaga.hover').render_hover_doc()<CR>", opts)
buf_set_keymap('n', '<leader>rn', "<cmd>lua require('lspsaga.rename').rename()<CR>", opts)
buf_set_keymap('n', '<leader>e', "<cmd>lua require('lspsaga.diagnostic').show_line_diagnostics()<CR>", opts)