Skip to content

Commit

Permalink
feat: preset for inc_rename
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Oct 27, 2022
1 parent 5c8f518 commit 91c79a0
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,15 @@ Check the [wiki](https://github.com/folke/noice.nvim/wiki/Configuration-Recipes)
-- add any filetypes here, that shouldn't trigger smart move.
excluded_filetypes = { "cmp_menu", "cmp_docs", "notify" },
},
---@type NoicePresets
presets = {
-- you can enable a preset by setting it to true, or a table that will override the preset config
-- you can also add custom presets that you can enable/disable with enabled=true
bottom_search = false, -- use a classic bottom cmdline for search
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
},
throttle = 1000 / 30, -- how frequently does Noice need to check for ui updates? This has no effect when in blocking mode.
---@type NoiceConfigViews
views = {}, ---@see section on views
Expand Down
2 changes: 2 additions & 0 deletions lua/noice/config/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,11 @@ M.defaults = {
---@type NoicePresets
presets = {
-- you can enable a preset by setting it to true, or a table that will override the preset config
-- you can also add custom presets that you can enable/disable with enabled=true
bottom_search = false, -- use a classic bottom cmdline for search
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
},
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
16 changes: 16 additions & 0 deletions lua/noice/config/preset.lua
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,22 @@ M.presets = {
},
},
},
inc_rename = {
cmdline = {
format = {
IncRename = {
pattern = "^:%s*IncRename%s+",
icon = "",
conceal = true,
opts = {
relative = "cursor",
size = { min_width = 20 },
position = { row = -3, col = 0 },
},
},
},
},
},
}

return M

0 comments on commit 91c79a0

Please sign in to comment.