add few UI plugins, shiny
This commit is contained in:
parent
42aa12b327
commit
e319cb3c2f
2 changed files with 101 additions and 56 deletions
|
@ -22,7 +22,7 @@ require("lazy").setup({
|
||||||
{ "<leader>xl", "<cmd>TroubleToggle loclist<cr>" },
|
{ "<leader>xl", "<cmd>TroubleToggle loclist<cr>" },
|
||||||
{ "<leader>xq", "<cmd>TroubleToggle quickfix<cr>" },
|
{ "<leader>xq", "<cmd>TroubleToggle quickfix<cr>" },
|
||||||
{ "gR", "<cmd>TroubleToggle lsp_references<cr>" }
|
{ "gR", "<cmd>TroubleToggle lsp_references<cr>" }
|
||||||
}},
|
} },
|
||||||
|
|
||||||
-- various plugins
|
-- various plugins
|
||||||
{ 'lewis6991/gitsigns.nvim' },
|
{ 'lewis6991/gitsigns.nvim' },
|
||||||
|
@ -40,11 +40,56 @@ require("lazy").setup({
|
||||||
{ 'vmware-archive/salt-vim' },
|
{ 'vmware-archive/salt-vim' },
|
||||||
{ 'stephpy/vim-yaml' },
|
{ 'stephpy/vim-yaml' },
|
||||||
{ 'lukas-reineke/indent-blankline.nvim' },
|
{ 'lukas-reineke/indent-blankline.nvim' },
|
||||||
|
{ 'rcarriga/nvim-notify' },
|
||||||
|
{ 'MunifTanjim/nui.nvim' },
|
||||||
|
{ 'folke/noice.nvim',
|
||||||
|
config = {
|
||||||
|
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,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- you can enable a preset for easier configuration
|
||||||
|
presets = {
|
||||||
|
bottom_search = true, -- use a classic bottom cmdline for search
|
||||||
|
command_palette = true, -- position the cmdline and popupmenu together
|
||||||
|
long_message_to_split = true, -- long messages will be sent to a split
|
||||||
|
inc_rename = false, -- enables an input dialog for inc-rename.nvim
|
||||||
|
lsp_doc_border = false, -- add a border to hover docs and signature help
|
||||||
|
},
|
||||||
|
hover = {
|
||||||
|
enabled = true,
|
||||||
|
view = nil, -- when nil, use defaults from documentation
|
||||||
|
---@type NoiceViewOptions
|
||||||
|
opts = {}, -- merged with defaults from documentation
|
||||||
|
},
|
||||||
|
signature = {
|
||||||
|
enabled = false,
|
||||||
|
auto_open = {
|
||||||
|
enabled = true,
|
||||||
|
trigger = true, -- Automatically show signature help when typing a trigger character from the LSP
|
||||||
|
luasnip = true, -- Will open signature help when jumping to Luasnip insert nodes
|
||||||
|
throttle = 50, -- Debounce lsp signature help request by 50ms
|
||||||
|
},
|
||||||
|
view = nil, -- when nil, use defaults from documentation
|
||||||
|
---@type NoiceViewOptions
|
||||||
|
opts = {}, -- merged with defaults from documentation
|
||||||
|
},
|
||||||
|
},
|
||||||
|
dependencies = {
|
||||||
|
"MunifTanjim/nui.nvim",
|
||||||
|
-- OPTIONAL:
|
||||||
|
-- `nvim-notify` is only needed, if you want to use the notification view.
|
||||||
|
-- If not available, we use `mini` as the fallback
|
||||||
|
"rcarriga/nvim-notify", } },
|
||||||
|
|
||||||
{ 'nvim-lualine/lualine.nvim' },
|
{ 'nvim-lualine/lualine.nvim' },
|
||||||
{ 'RRethy/vim-illuminate' },
|
{ 'RRethy/vim-illuminate' },
|
||||||
{ 'sheerun/vim-polyglot' },
|
{ 'sheerun/vim-polyglot' },
|
||||||
{ 'ray-x/lsp_signature.nvim' },
|
--{ 'ray-x/lsp_signature.nvim' },
|
||||||
|
|
||||||
-- themes
|
-- themes
|
||||||
{ 'olimorris/onedarkpro.nvim' },
|
{ 'olimorris/onedarkpro.nvim' },
|
||||||
|
@ -101,7 +146,7 @@ require("lazy").setup({
|
||||||
-- install missing plugins on startup. This doesn't increase startup time.
|
-- install missing plugins on startup. This doesn't increase startup time.
|
||||||
missing = true,
|
missing = true,
|
||||||
-- try to load one of these colorschemes when starting an installation during startup
|
-- try to load one of these colorschemes when starting an installation during startup
|
||||||
colorscheme = { },
|
colorscheme = {},
|
||||||
},
|
},
|
||||||
ui = {
|
ui = {
|
||||||
-- a number <1 is a percentage., >1 is a fixed size
|
-- a number <1 is a percentage., >1 is a fixed size
|
||||||
|
|
|
@ -37,64 +37,64 @@ local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||||
|
|
||||||
|
|
||||||
-- config for ray-x/lsp_signature.nvim
|
-- config for ray-x/lsp_signature.nvim
|
||||||
local cfg = {
|
--local cfg = {
|
||||||
debug = false, -- set to true to enable debug logging
|
--debug = false, -- set to true to enable debug logging
|
||||||
log_path = vim.fn.stdpath("cache") .. "/lsp_signature.log", -- log dir when debug is on
|
--log_path = vim.fn.stdpath("cache") .. "/lsp_signature.log", -- log dir when debug is on
|
||||||
-- default is ~/.cache/nvim/lsp_signature.log
|
---- default is ~/.cache/nvim/lsp_signature.log
|
||||||
verbose = false, -- show debug line number
|
--verbose = false, -- show debug line number
|
||||||
|
|
||||||
bind = true, -- This is mandatory, otherwise border config won't get registered.
|
--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
|
---- If you want to hook lspsaga or other signature handler, pls set to false
|
||||||
doc_lines = 10, -- will show two lines of comment/doc(if there are more than two lines in doc, will be truncated);
|
--doc_lines = 10, -- 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
|
---- 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
|
---- This setting only take effect in insert mode, it does not affect signature help in normal
|
||||||
-- mode, 10 by default
|
---- mode, 10 by default
|
||||||
|
|
||||||
max_height = 12, -- max height of signature floating_window
|
--max_height = 12, -- max height of signature floating_window
|
||||||
max_width = 80, -- max_width of signature floating_window
|
--max_width = 80, -- max_width of signature floating_window
|
||||||
noice = false, -- set to true if you using noice to render markdown
|
--noice = false, -- set to true if you using noice to render markdown
|
||||||
wrap = true, -- allow doc/signature text wrap inside floating_window, useful if your lsp return doc/sig is too long
|
--wrap = true, -- allow doc/signature text wrap inside floating_window, useful if your lsp return doc/sig is too long
|
||||||
|
|
||||||
floating_window = true, -- show hint in a floating window, set to false for virtual text only mode
|
--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 = true, -- 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
|
---- 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
|
---- 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_x = 1, -- adjust float windows x position.
|
||||||
floating_window_off_y = 0, -- adjust float windows y position. e.g -2 move window up 2 lines; 2 move down 2 lines
|
--floating_window_off_y = 0, -- adjust float windows y position. e.g -2 move window up 2 lines; 2 move down 2 lines
|
||||||
-- can be either number or function, see examples
|
---- can be either number or function, see examples
|
||||||
|
|
||||||
close_timeout = 4000, -- close floating window after ms when laster parameter is entered
|
--close_timeout = 4000, -- close floating window after ms when laster parameter is entered
|
||||||
fix_pos = false, -- set to true, the floating window will not auto-close until finish all parameters
|
--fix_pos = false, -- set to true, the floating window will not auto-close until finish all parameters
|
||||||
hint_enable = true, -- virtual hint enable
|
--hint_enable = true, -- virtual hint enable
|
||||||
hint_prefix = "🐼 ", -- Panda for parameter, NOTE: for the terminal not support emoji, might crash
|
--hint_prefix = "🐼 ", -- Panda for parameter, NOTE: for the terminal not support emoji, might crash
|
||||||
hint_scheme = "String",
|
--hint_scheme = "String",
|
||||||
hi_parameter = "LspSignatureActiveParameter", -- how your parameter will be highlight
|
--hi_parameter = "LspSignatureActiveParameter", -- how your parameter will be highlight
|
||||||
handler_opts = {
|
--handler_opts = {
|
||||||
border = "rounded" -- double, rounded, single, shadow, none, or a table of borders
|
--border = "rounded" -- double, rounded, single, shadow, none, or a table of borders
|
||||||
},
|
--},
|
||||||
|
|
||||||
always_trigger = false, -- sometime show signature on new line or in middle of parameter can be confusing, set it to false for #58
|
--always_trigger = false, -- sometime show signature on new line or in middle of parameter can be confusing, set it to false for #58
|
||||||
|
|
||||||
auto_close_after = nil, -- autoclose signature float win after x sec, disabled if nil.
|
--auto_close_after = nil, -- autoclose signature float win after x sec, disabled if nil.
|
||||||
extra_trigger_chars = {}, -- Array of extra characters that will trigger signature completion, e.g., {"(", ","}
|
--extra_trigger_chars = {}, -- Array of extra characters that will trigger signature completion, e.g., {"(", ","}
|
||||||
zindex = 200, -- by default it will be on top of all floating windows, set to <= 50 send it to bottom
|
--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
|
--padding = '', -- character to pad on left and right of signature can be ' ', or '|' etc
|
||||||
|
|
||||||
transparency = nil, -- disabled by default, allow floating win transparent value 1~100
|
--transparency = nil, -- disabled by default, allow floating win transparent value 1~100
|
||||||
shadow_blend = 36, -- if you using shadow as border use this set the opacity
|
--shadow_blend = 36, -- if you using shadow as border use this set the opacity
|
||||||
shadow_guibg = 'Black', -- if you using shadow as border use this set the color e.g. 'Green' or '#121315'
|
--shadow_guibg = 'Black', -- if you using shadow as border use this set the color e.g. 'Green' or '#121315'
|
||||||
timer_interval = 200, -- default timer check interval set to lower value if you want to reduce latency
|
--timer_interval = 200, -- default timer check interval set to lower value if you want to reduce latency
|
||||||
toggle_key = nil, -- toggle signature on and off in insert mode, e.g. toggle_key = '<M-x>'
|
--toggle_key = nil, -- toggle signature on and off in insert mode, e.g. toggle_key = '<M-x>'
|
||||||
|
|
||||||
select_signature_key = nil, -- cycle to next signature, e.g. '<M-n>' function overloading
|
--select_signature_key = nil, -- cycle to next signature, e.g. '<M-n>' function overloading
|
||||||
move_cursor_key = nil, -- imap, use nvim_set_current_win to move cursor between current win and floating
|
--move_cursor_key = nil, -- imap, use nvim_set_current_win to move cursor between current win and floating
|
||||||
}
|
--}
|
||||||
|
|
||||||
-- recommended:
|
---- recommended:
|
||||||
require 'lsp_signature'.setup(cfg) -- no need to specify bufnr if you don't use toggle_key
|
--require 'lsp_signature'.setup(cfg) -- no need to specify bufnr if you don't use toggle_key
|
||||||
|
|
||||||
|
|
||||||
-----------------
|
-----------------
|
||||||
|
|
Loading…
Reference in a new issue