Commit Graph

152 Commits

Author SHA1 Message Date
Paul Stemmet 114ed132a3
fix(map_util): add `<CR>` after string bindings
If you have two <Plug> bindings, one that's a prefix to another:
- <Plug>MyScript:Cmd
- <Plug>MyScript:Cmd2
If you try and use the prefix binding, vim will wait for `ttimeoutlen`

Co-authored-by: Oliver Marshall <olivershawmarshall@gmail.com>
2024-08-18 18:11:13 +00:00
Paul Stemmet 26fb642ff3
fix(map_util): insert bindings for <Plug>, <Cmd> and :Cmd work
Co-authored-by: Oliver Marshall <olivershawmarshall@gmail.com>
2024-08-18 18:08:49 +00:00
Steven Arcangeli 6741f1062d cleanup: remove warnings for using deprecated highlight groups 2024-06-18 21:26:01 -04:00
Steven Arcangeli 374b51da1a cleanup: remove warning for deprecated "anchor" config option 2024-06-18 21:26:01 -04:00
Steven Arcangeli cd895f511f refactor!: remove insert_only config option
If you wish to restore this behavior, you can easily set a custom keymap
like so:
```lua
require("dressing").setup({
  input = {
    mappings = {
      i = {
        ["<Esc>"] = "Close",
      },
    },
  },
})
```

fixes #163
2024-06-18 21:26:01 -04:00
Steven Arcangeli e3714c8049 ci: use nvim-typecheck-action v2 2024-06-01 19:27:39 -07:00
emmanueltouzery 3c38ac861e
fix: stuck input control if callback fails (#158) 2024-05-22 13:48:25 -07:00
Steven Arcangeli 8b7b3dce9e ci: run tests against Neovim v0.10.0 2024-05-16 12:26:10 -07:00
Steven Arcangeli 3858609d68 fix: refactor deprecated methods in neovim 0.10 2024-04-23 07:21:29 -07:00
Yi Ming 18e5beb384
fix(fzf-lua): add separator after prompt (#145)
* feat(fzf-lua): add an input indicator after prompt

* refactor: only use '>' as separator if ':' is not being used

---------

Co-authored-by: Steven Arcangeli <stevearc@stevearc.com>
2024-03-12 20:16:43 -07:00
Steven Arcangeli 6f21226206 fix: undo fzf-lua cancel hack, was fixed upstream (#142) 2024-01-28 18:00:51 -08:00
Steven Arcangeli 0e88293ce3 fix(fzf-lua): not returning selected result 2024-01-25 11:09:18 -08:00
Steven Arcangeli 9f9b77315d fix(fzf-lua): canceling selection breaks future invocations of vim.ui.select 2024-01-25 11:07:13 -08:00
Steven Arcangeli 9de702fa7d fix: queue successive calls to input and select (#139) 2024-01-21 14:24:20 -08:00
231tr0n 7237cdf25e
fix: handle extra scenario where the prompt is sent with trailing spaces (#138)
* fix: handle extra scenario where the prompt is sent with trailing spaces

* changed selection for gsub

* trimmed correctly using vim.trim method
2024-01-21 08:16:20 -08:00
Steven Arcangeli c1179336aa feat: add checkhealth messages 2024-01-15 19:24:30 -08:00
231tr0n 44a3638721
fix: add space after prompt to look nicer (#136) 2024-01-14 09:33:08 -08:00
Alexandre Fonseca d7dde6afff
fix: take into account prompt size in nui and builtin selects (#135) 2024-01-14 09:30:26 -08:00
pseudometa 48b713413d
feat: add `trim_prompt` setting for `vim.ui.input` (#134) 2024-01-14 09:15:12 -08:00
Steven Arcangeli 94b0d24483 fix(nui): prevent double-callback in ui.select (#131) 2023-12-26 17:39:23 +00:00
Steven Arcangeli fe3071330a fix(telescope): codeactions error in Neovim nightly (#126) 2023-11-07 05:38:05 +00:00
Steven Arcangeli 1f2d1206a0 fix: remove default window transparency
Upstream bug https://github.com/neovim/neovim/issues/18576 causes the
background color to be solid black in some cases.
2023-10-10 20:26:53 -07:00
pseudometa 70fcf2a33c
fix: apply nowait to plugin keymaps (#120)
* fix: plugin keymaps delayed

* fix: stylua
2023-10-10 08:58:38 -07:00
Steven Arcangeli 34e52d58a2 format: auto sort requires 2023-10-08 23:33:52 -07:00
Steven Arcangeli 8f4d62b781 feat: support multiline prompt in vim.ui.input (#89) 2023-09-30 12:22:35 -07:00
Steven Arcangeli 73a7d54b52 refactor: replace util with vim.split 2023-09-29 09:32:38 -07:00
Steven Arcangeli 0c7acd7194 fix: input can only accept a single line (#119) 2023-09-29 09:32:38 -07:00
Steven Arcangeli 15ef9a398c feat: config option to disable numbers for builtin select implementation (#117) 2023-09-04 21:11:57 -07:00
Steven Arcangeli c7b035de7f lint: add more type definitions to fix typechecker 2023-08-27 07:12:15 +00:00
Steven Arcangeli ee571505f3 feat: add highlight group for builtin select index (#113) 2023-08-19 22:05:35 +00:00
Steven Arcangeli 6bde51adab ci: run type checking in actions 2023-08-13 01:20:15 -07:00
Steven Arcangeli 169877dbca fix: restore float title padding for nvim 0.9 (#109) 2023-08-09 16:27:23 -07:00
Steven Arcangeli 713b56e13c fix: increase buffer time for fzf-lua mode switching 2023-08-06 19:50:17 -07:00
Steven Arcangeli bcaf0d3d6e refactor!: deprecate the "anchor" config option (#106)
This was left over from before we had the "override" function. Now, it
doesn't make much sense to set the anchor as an option because so much
of the rest of the layout logic depends on the anchor being the default.
If a user wants to customize the layout, the override function is the
way to do it.
2023-07-29 09:35:02 -07:00
Steven Arcangeli 5131545f0a cleanup: remove old deprecation messages 2023-07-29 09:28:27 -07:00
Steven Arcangeli 39611852fd fix: inconsistent mode after selecting with fzf-lua 2023-07-17 16:24:04 -07:00
DragonBillow cc69bfed36
feat: built-in select implementation binds number keymaps (#104)
* feat(select/builtin): binding keymap for select

Signed-off-by: Longtao Zhang <DragonBillow@outlook.com>

* feat(select/builtin): add number prefix

Signed-off-by: Longtao Zhang <DragonBillow@outlook.com>

* style(builtin): remove debug statement

Signed-off-by: Longtao Zhang <DragonBillow@outlook.com>

* style(builtin): rename variable, solve luacheck problem

Signed-off-by: Longtao Zhang <DragonBillow@outlook.com>

---------

Signed-off-by: Longtao Zhang <DragonBillow@outlook.com>
2023-07-17 08:54:38 -07:00
Steven Arcangeli 154f22393b fix: stop using vim.wo to set window options
vim.wo also affects the global status of the option. We only want to set
the window-local option.
2023-06-15 21:52:50 -07:00
Steven Arcangeli 63cfd55eb2 refactor!: drop support for Neovim 0.7 2023-06-15 21:52:50 -07:00
Steven Arcangeli f16d7586fc fix: close input window when entering cmdline window (#99) 2023-06-02 12:09:51 -07:00
Steven Arcangeli f19cbd56f7 fix: ensure telescope win is closed before calling callback 2023-05-24 22:59:28 -07:00
Steven Arcangeli 2f17eee4d7 fix: minor tweaks to fix LSP type errors 2023-05-21 20:35:45 -07:00
Steven Arcangeli 9b0a311192 refactor: don't need to use global functions for completion 2023-05-21 20:31:58 -07:00
Steven Arcangeli 80dadc9c46 refactor: use modern option setter/getter methods 2023-05-21 20:29:43 -07:00
Steven Arcangeli bf1a554644 refactor: undeprecate fzf-lua config (#97)
Instead of encouraging people to register fzf-lua ui_select manually, we
can just call into it. I found a way to pass in config options (which
was the sticking point previously). Doing it this way preserves the rest
of the dressing functionality (e.g. get_config)
2023-05-12 05:41:45 -07:00
Steven Arcangeli 540d6e7115 cleanup: remove shim for deprecated config options 2023-05-03 09:49:55 -07:00
Steven Arcangeli a89327e245 refactor: remove fzf_lua implementation; defer directly to fzf_lua
Since fzf-lua ships with an implementation for vim.ui.select, we should
use that directly instead of creating our own wrapper. It reduces
overall code duplication and reduces the surface area for bugs to creep
in.
2023-04-12 05:43:58 -07:00
Steven Arcangeli 91b9ba8a94 refactor: use nvim 0.9 window title when available 2023-04-07 12:21:57 -07:00
Steven Arcangeli 324f8f16e0 feat: provide better default window options for vim.ui.input (#94) 2023-04-04 10:54:52 -07:00
Steven Arcangeli 5f44f82948 fix: bad default value handling in vim.ui.input 2023-02-23 22:06:34 -08:00