diff --git a/lua/highlights.lua b/lua/highlights.lua index b6f891d7..44a6d5ba 100644 --- a/lua/highlights.lua +++ b/lua/highlights.lua @@ -112,9 +112,8 @@ fg("DashboardFooter", grey_fg) -- packer's floating window -bg("NormalFloat", black2) -bg("FloatBorder", black2) -fg("FloatBorder", black2) +bg("NormalFloat", "NONE") +fg("FloatBorder", blue) -- set bg color for nvim -- bg("Normal", black) diff --git a/lua/pluginList.lua b/lua/pluginList.lua index cfac9e6f..168d9d48 100644 --- a/lua/pluginList.lua +++ b/lua/pluginList.lua @@ -57,7 +57,7 @@ return packer.startup( end } - -- language related plugins + -- lsp stuff use { "nvim-treesitter/nvim-treesitter", event = "BufRead", @@ -68,7 +68,7 @@ return packer.startup( use { "kabouzeid/nvim-lspinstall", - event = "BufEnter" + event = "BufRead" } use { @@ -87,6 +87,14 @@ return packer.startup( end } + use { + after = "nvim-lspconfig", + "ray-x/lsp_signature.nvim", + config = function() + require("plugins.others").signature() + end + } + -- load compe in insert mode only use { "hrsh7th/nvim-compe", diff --git a/lua/plugins/others.lua b/lua/plugins/others.lua index 0a060a6d..b3c10329 100644 --- a/lua/plugins/others.lua +++ b/lua/plugins/others.lua @@ -46,4 +46,30 @@ M.blankline = function() vim.g.indent_blankline_show_first_indent_level = false end +M.signature = function() + local present, lspsignature = pcall(require, "lsp_signature") + if present then + lspsignature.setup( + { + bind = true, + doc_lines = 2, + floating_window = true, + fix_pos = true, + hint_enable = true, + hint_prefix = " ", + hint_scheme = "String", + use_lspsaga = false, + hi_parameter = "Search", + max_height = 22, + max_width = 120, -- max_width of signature floating_window, line will be wrapped if exceed max_width + handler_opts = { + border = "single" -- double, single, shadow, none + }, + zindex = 200, -- by default it will be on top of all floating windows, set to 50 send it to bottom + padding = "", -- character to pad on left and right of signature can be ' ', or '|' etc + } + ) + end +end + return M