feat: remove lsp-signature for noice

This commit is contained in:
Matthew Leong 2022-12-22 08:51:01 -08:00
parent 8872b757af
commit 924b2e33a7
4 changed files with 45 additions and 23 deletions

View file

@ -93,14 +93,6 @@ return packer.startup(function()
disable = vim.tbl_contains(user_config.disable_builtin_plugins, 'null-ls'),
after = 'nvim-lspconfig',
},
{
'ray-x/lsp_signature.nvim',
config = function()
require('cosmic.plugins.lsp-signature')
end,
after = 'nvim-lspconfig',
disable = vim.tbl_contains(user_config.disable_builtin_plugins, 'lsp_signature'),
},
},
event = 'BufWinEnter',
})

View file

@ -1,14 +1,15 @@
local config = require('cosmic.core.user')
-- set up lsp servers
require('cosmic.lsp.providers')
require('cosmic.lsp.diagnostics')
require('cosmic.lsp.commands')
vim.lsp.handlers['textDocument/hover'] = vim.lsp.with(vim.lsp.handlers.hover, {
border = config.border,
})
vim.lsp.handlers['textDocument/signatureHelp'] = vim.lsp.with(vim.lsp.handlers.signature_help, {
border = config.border,
})
-- currently handled by noice
--
--[[ local config = require('cosmic.core.user') ]]
--[[ vim.lsp.handlers['textDocument/hover'] = vim.lsp.with(vim.lsp.handlers.hover, { ]]
--[[ border = config.border, ]]
--[[ }) ]]
--[[]]
--[[ vim.lsp.handlers['textDocument/signatureHelp'] = vim.lsp.with(vim.lsp.handlers.signature_help, { ]]
--[[ border = config.border, ]]
--[[ }) ]]

View file

@ -1,11 +1,23 @@
require('noice').setup({
lsp = {
hover = {
enabled = false,
views = {
notify = {
merge = true,
},
signature = {
enabled = false,
auto_open = false, -- Automatically show signature help when typing a trigger character from the LSP
hover = {
border = {
style = 'rounded',
},
position = { row = 2, col = 2 },
},
},
lsp = {
-- override markdown rendering so that **cmp** and other plugins use **Treesitter**
override = {
['vim.lsp.util.convert_input_to_markdown_lines'] = true,
['vim.lsp.util.stylize_markdown'] = true,
['cmp.entry.get_documentation'] = true,
},
},
})
require('cosmic.plugins.noice.mappings')

View file

@ -0,0 +1,17 @@
vim.keymap.set('n', '<c-f>', function()
if not require('noice.lsp').scroll(4) then
return '<c-f>'
end
end, {
silent = true,
expr = true,
})
vim.keymap.set('n', '<c-b>', function()
if not require('noice.lsp').scroll(-4) then
return '<c-b>'
end
end, {
silent = true,
expr = true,
})