Skip to content

Commit

Permalink
feat: added preset to set hover docs and signature help border
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Oct 28, 2022
1 parent f9bf77d commit e34db67
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ Check the [wiki](https://github.com/folke/noice.nvim/wiki/Configuration-Recipes)
command_palette = false, -- position the cmdline and popupmenu together
long_message_to_split = false, -- 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
},
throttle = 1000 / 30, -- how frequently does Noice need to check for ui updates? This has no effect when in blocking mode.
---@type NoiceConfigViews
Expand Down
1 change: 1 addition & 0 deletions lua/noice/config/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ function M.defaults()
command_palette = false, -- position the cmdline and popupmenu together
long_message_to_split = false, -- 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
},
throttle = 1000 / 30, -- how frequently does Noice need to check for ui updates? This has no effect when in blocking mode.
---@type NoiceConfigViews
Expand Down
10 changes: 10 additions & 0 deletions lua/noice/config/preset.lua
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,16 @@ M.presets = {
},
},
},
lsp_doc_border = {
views = {
hover = {
border = {
style = "rounded",
},
position = { row = 2, col = 2 },
},
},
},
command_palette = {
views = {
cmdline_popup = {
Expand Down
2 changes: 1 addition & 1 deletion lua/noice/lsp/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function M.setup()
require("noice.lsp.progress").setup()
end

vim.api.nvim_create_autocmd({ "CursorMoved", "CursorMovedI", "InsertCharPre" }, {
vim.api.nvim_create_autocmd({ "CursorMoved", "CursorMovedI", "InsertEnter" }, {
group = group,
callback = function()
vim.defer_fn(M.on_close, 10)
Expand Down

0 comments on commit e34db67

Please sign in to comment.