From 721e48df991c1a912628567b4a37beadd404d293 Mon Sep 17 00:00:00 2001 From: sudacode Date: Fri, 17 Feb 2023 09:37:30 -0800 Subject: [PATCH] replace hover.nvim with lsp_signature --- init.vim | 2 +- lua/plugins.lua | 72 +++++++++++++++++----------------- plugin-confs/lsp-signature.lua | 6 +-- 3 files changed, 40 insertions(+), 40 deletions(-) diff --git a/init.vim b/init.vim index 62fa87b..e5a007b 100644 --- a/init.vim +++ b/init.vim @@ -36,7 +36,7 @@ source ~/.config/nvim/plugin-confs/nvim-cmp.lua source ~/.config/nvim/plugin-confs/fidget.lua source ~/.config/nvim/plugin-confs/symbols-outline.lua " source ~/.config/nvim/plugin-confs/copilot.lua -" source ~/.config/nvim/plugin-confs/lsp-signature.lua +source ~/.config/nvim/plugin-confs/lsp-signature.lua " source ~/.config/nvim/plugin-confs/nvim-docs-view.lua " nvim and vim plugins diff --git a/lua/plugins.lua b/lua/plugins.lua index 04a34b5..15b8f76 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -79,42 +79,42 @@ require('packer').startup(function(use) run = function() vim.fn['fzf#install']() end } - use { - "lewis6991/hover.nvim", - config = function() - require("hover").setup { - init = function() - -- Require providers - require("hover.providers.lsp") - -- require('hover.providers.gh') - -- require('hover.providers.jira') - require('hover.providers.man') - require('hover.providers.dictionary') - end, - preview_opts = { - border = "rounded" - -- border = { - -- { "╭", "FloatBorder" }, - -- { "─", "FloatBorder" }, - -- { "╮", "FloatBorder" }, - -- { "│", "FloatBorder" }, - -- { "╯", "FloatBorder" }, - -- { "─", "FloatBorder" }, - -- { "╰", "FloatBorder" }, - -- { "│", "FloatBorder" }, - -- } - }, - -- Whether the contents of a currently open hover window should be moved - -- to a :h preview-window when pressing the hover keymap. - preview_window = false, - title = true - } + -- use { + -- "lewis6991/hover.nvim", + -- config = function() + -- require("hover").setup { + -- init = function() + -- -- Require providers + -- require("hover.providers.lsp") + -- -- require('hover.providers.gh') + -- -- require('hover.providers.jira') + -- require('hover.providers.man') + -- require('hover.providers.dictionary') + -- end, + -- preview_opts = { + -- border = "rounded" + -- -- border = { + -- -- { "╭", "FloatBorder" }, + -- -- { "─", "FloatBorder" }, + -- -- { "╮", "FloatBorder" }, + -- -- { "│", "FloatBorder" }, + -- -- { "╯", "FloatBorder" }, + -- -- { "─", "FloatBorder" }, + -- -- { "╰", "FloatBorder" }, + -- -- { "│", "FloatBorder" }, + -- -- } + -- }, + -- -- Whether the contents of a currently open hover window should be moved + -- -- to a :h preview-window when pressing the hover keymap. + -- preview_window = false, + -- title = true + -- } - -- Setup keymaps - vim.keymap.set("n", "K", require("hover").hover, {desc = "hover.nvim"}) - vim.keymap.set("n", "gK", require("hover").hover_select, {desc = "hover.nvim (select)"}) - end - } + -- -- Setup keymaps + -- vim.keymap.set("n", "K", require("hover").hover, {desc = "hover.nvim"}) + -- vim.keymap.set("n", "gK", require("hover").hover_select, {desc = "hover.nvim (select)"}) + -- end + -- } use 'ap/vim-css-color' use 'jiangmiao/auto-pairs' @@ -190,7 +190,7 @@ require('packer').startup(function(use) use { 'onsails/lspkind-nvim' } - -- use 'ray-x/lsp_signature.nvim' + use 'ray-x/lsp_signature.nvim' use { 'rmagatti/goto-preview' } diff --git a/plugin-confs/lsp-signature.lua b/plugin-confs/lsp-signature.lua index 899f9e7..d68e692 100644 --- a/plugin-confs/lsp-signature.lua +++ b/plugin-confs/lsp-signature.lua @@ -6,20 +6,20 @@ cfg = { bind = true, -- This is mandatory, otherwise border config won't get registered. -- If you want to hook lspsaga or other signature handler, pls set to false - doc_lines = 12, -- will show two lines of comment/doc(if there are more than two lines in doc, will be truncated); + doc_lines = 15, -- will show two lines of comment/doc(if there are more than two lines in doc, will be truncated); -- set to 0 if you DO NOT want any API comments be shown -- This setting only take effect in insert mode, it does not affect signature help in normal -- mode, 10 by default floating_window = true, -- show hint in a floating window, set to false for virtual text only mode - floating_window_above_cur_line = true, -- try to place the floating above the current line when possible Note: + floating_window_above_cur_line = false, -- try to place the floating above the current line when possible Note: -- will set to true when fully tested, set to false will use whichever side has more space -- this setting will be helpful if you do not want the PUM and floating win overlap floating_window_off_x = 1, -- adjust float windows x position. floating_window_off_y = -1, -- adjust float windows y position. - fix_pos = false, -- set to true, the floating window will not auto-close until finish all parameters + fix_pos = true, -- set to true, the floating window will not auto-close until finish all parameters hint_enable = true, -- virtual hint enable hint_prefix = " ", -- Panda for parameter hint_scheme = "String",