add lsp-signature.nvim (#142)
This commit is contained in:
parent
232bb5fd7c
commit
d4193727bd
|
@ -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)
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue