feat: floating input (#721)
* feat: add floating input to ask method
Open a floating input similar to the "edit" input for the "ask" input.
Enabled in config via `Config.windows.ask.floating` or by passing
`{ floating = true }` to the `api.ask` method.
Includes logic to ensure the sidebar uses the correct buffer and selection
if an existing sidebar is open for another code buffer.
Also refactored the `selection` module to extract the floating input
logic into a new `PromptInput` class.
* docs: update config options
* feat: more accurate annotations to prevent user misunderstandings
---------
Co-authored-by: yetone <yetoneful@gmail.com>
This commit is contained in:
committed by
GitHub
parent
b19573cb2a
commit
964715be64
12
README.md
12
README.md
@@ -262,6 +262,18 @@ _See [config.lua#L9](./lua/avante/config.lua) for the full config_
|
||||
align = "center", -- left, center, right for title
|
||||
rounded = true,
|
||||
},
|
||||
input = {
|
||||
prefix = "> ",
|
||||
},
|
||||
edit = {
|
||||
border = "rounded",
|
||||
start_insert = true, -- Start insert mode when opening the edit window
|
||||
},
|
||||
ask = {
|
||||
floating = false, -- Open the 'AvanteAsk' prompt in a floating window
|
||||
start_insert = true, -- Start insert mode when opening the ask window, only effective if floating = true.
|
||||
border = "rounded",
|
||||
},
|
||||
},
|
||||
highlights = {
|
||||
---@type AvanteConflictHighlights
|
||||
|
||||
Reference in New Issue
Block a user