Commit Graph

98 Commits

Author SHA1 Message Date
Steven Arcangeli 2f8a001ae5 fix(input): change the default_prompt to Input:
The unicode arrow makes sense when using the prompt buffer, but not so
much if the prompt is going to be a window title instead.
2022-03-31 08:24:47 -07:00
Steven Arcangeli e14e35a9d4 fix!: drop specialized text highlight groups (#30)
Removing DressingInputText and DressingSelectText highlight groups that
were added for #8. I added them before I learned about winhighlight, and
it turns out that winhighlight is the better way to do this. Previously
I was using `nvim_buf_add_highlight` to directly add the highlight
group, but that has multiple downsides (can't highlight bg of regions
with no text, overrides other relevate highlight groups e.g.
CursorLine). None of that is needed because Neovim will be setting the
highlight group of this text to NormalFloat, and if the user wants to
customize it we already expose an easy option in config to do
`winhighlight = "NormalFloat:MyCustomHighlightGroup"`.
2022-03-29 20:11:57 -07:00
Steven Arcangeli 31f12fff6e feat: allow get_config to modify enabled (#29) 2022-03-23 18:46:21 -07:00
Steven Arcangeli 8c42b8f854 fix(input): set nowrap on window (#28) 2022-03-22 22:38:58 -07:00
Github Actions 65f73d57ce [docgen] Update README.md
skip-checks: true
2022-03-23 05:10:45 +00:00
Steven Arcangeli 079e5d7df8 feat(input): option prompt_align (#27) 2022-03-22 22:10:16 -07:00
Steven Arcangeli 96552c9199 fix: hide deprecation notice when option not used (#26) 2022-03-17 10:01:53 -07:00
Steven Arcangeli 01afd7b01f fix: apply filetype option after setting keymaps (#25) 2022-03-17 09:40:49 -07:00
Github Actions e05b473205 [docgen] Update README.md
skip-checks: true
2022-03-17 04:04:55 +00:00
Steven Arcangeli 4542292854 refactor!: deprecate telescope 'theme' option
Pass the theme options in directly now. For example:
```lua
require('dressing').setup({
  select = {
    telescope = require('telescope.themes').get_ivy({})
  }
})
```
2022-03-16 21:03:17 -07:00
Steven Arcangeli c9e7f4f4cd lint: fix lint errors 2022-03-16 20:48:49 -07:00
Steven Arcangeli e7139cf971 ci: run actions on ubuntu 20.04 2022-03-16 20:46:12 -07:00
Steven Arcangeli a566ab5dd1
Merge pull request #24 from tami5/feat/select/override_telescope_config
feat(select): override telescope config
2022-03-16 20:45:06 -07:00
tami5 4f36284caa
style: format 2022-03-14 21:50:14 +03:00
tami5 dbceda6303
fix: skipping config.theme when it's a table 2022-03-14 21:50:13 +03:00
Steven Arcangeli 6006de7279 github: add bug report and pull request template 2022-03-14 11:48:32 -07:00
tami5 d1063d4e47
Merge branch 'master' into feat/select/override_telescope_config 2022-03-14 04:39:23 +03:00
tami5 43f325b654
feat(select): override telescope config
Support passing extra telescope configurations as well as custom theme
function + backward compatibility for current state. So hopefully no
breaking changes.
2022-03-14 04:32:28 +03:00
Github Actions b36b69c6a5 [docgen] Update README.md
skip-checks: true
2022-03-02 17:32:22 +00:00
Steven Arcangeli 1e529b8cdb feat!: more layout options for input and builtin select (#19)
Removed the row & col options for input and select.builtin. If you want
to tweak the values sent to nvim_open_win, use the `override` function.

Changes:
* min_width/height and max_width/height can be a list of values. Useful
  for mixing raw integers (e.g. for cols) and floats (e.g. for % of
  total)
* can specify an exact width or height for the windows
* when using relative = 'win' or 'editor', the row & col will by default
  be calculated to center the floating win
2022-03-02 09:24:06 -08:00
Steven Arcangeli b6f5a92ef4 doc: document new telescope config options 2022-02-28 16:37:34 -08:00
Steven Arcangeli 5e00319c98
Merge pull request #20 from akinsho/feature/allow-telescope-theme-opts
fix(telescope): allow passing theme options to select
2022-02-28 16:35:35 -08:00
Akin Sowemimo c49854aa5d fix(telescope): allow passing theme options
to telescope picker
2022-02-26 13:26:05 +00:00
Steven Arcangeli 8e8f7e5259 fix: replace defer_fn hack with redraw hack (#18) 2022-02-02 15:56:47 -08:00
Steven Arcangeli fc790e426a fix(input): error on history_prev when no history 2022-01-28 12:19:00 -08:00
Steven Arcangeli 3f23266f0c fix: work around neovim open_win bug (#15)
Per https://github.com/neovim/neovim/issues/12295, it seems we cannot
open *and* enter a floating window during vim startup. To work around
that, we use vim.schedule_wrap() on the entrypoints. This should not
produce any noticeable effect in functionality.
2022-01-18 14:18:00 -08:00
Github Actions 74c953a67c [docgen] Update README.md
skip-checks: true
2022-01-18 00:03:13 +00:00
Steven Arcangeli ed378363a0 feat: config option to disable specific ui modules 2022-01-17 16:02:38 -08:00
Github Actions 333d853b2f [docgen] Update README.md
skip-checks: true
2022-01-17 22:24:39 +00:00
Steven Arcangeli 1f91d264bf fix(input): mode detection in special insert modes 2022-01-17 14:22:58 -08:00
Steven Arcangeli c2208c3e5c feat(select): add support for fzf-lua (#14) 2022-01-17 14:22:24 -08:00
Steven Arcangeli f03962c617 fix(input): expand width to fit prompt & default 2022-01-17 13:18:17 -08:00
Steven Arcangeli 25b72621af fix(input): restore previous mode after leaving modal 2022-01-17 13:17:43 -08:00
Steven Arcangeli d5eaf13b80 fix(input): Don't trigger autocmds when opening input modal (#13) 2022-01-17 13:15:59 -08:00
Steven Arcangeli 15e4d5a5bb ci: run tests on neovim 0.6.1 2022-01-14 13:12:41 -08:00
Steven Arcangeli d5918d0475 feat: history for ui.input (#12) 2022-01-11 16:35:31 -08:00
Steven Arcangeli f487c89b56 cleanup!: Remove prompt buffer implementation for ui.input
The `prompt_buffer = true` option will no longer function. The only
input modal implementation will use a normal scratch buffer.
2022-01-11 16:34:27 -08:00
Steven Arcangeli 0ad4d1e6b9 fix: remove defer_fn hack in fzf select (fix #10) 2021-12-23 11:52:44 -08:00
Github Actions 0bb73bc2bd [docgen] Update README.md
skip-checks: true
2021-12-19 04:22:46 +00:00
Steven Arcangeli c856074771 feat: add config options for setting winhighlight (#8) 2021-12-18 20:20:38 -08:00
Steven Arcangeli 4b677be056 fix(select): off-by-one error in text highlighting 2021-12-18 20:12:32 -08:00
Steven Arcangeli 8d19119476 fix: re-add safety nil check 2021-12-18 19:50:12 -08:00
Steven Arcangeli b5f8d2d4fd refactor(input): remove feedkeys() hack when not using prompt buffer 2021-12-18 19:43:01 -08:00
Steven Arcangeli 28560556f1 feat: add DressingInputText highlight group (#8) 2021-12-18 19:40:46 -08:00
Steven Arcangeli 7270a30237 docgen: make docgen and prettier stop fighting 2021-12-18 15:54:59 -08:00
Steven Arcangeli d1a48d496f doc: update alternatives section of README 2021-12-18 12:47:51 -08:00
Steven Arcangeli f8542237f3 feat: add DressingSelectText highlight group (#8) 2021-12-18 12:32:17 -08:00
Steven Arcangeli 264874eb7b feat: add FloatTitle highlight group (#8) 2021-12-18 12:18:54 -08:00
Steven Arcangeli 26ce743306 refactor: extract common logic for adding window title 2021-12-18 12:18:10 -08:00
Steven Arcangeli 9b8c2be345 deprecate: input.prompt_buffer option
Even once the fixes to the prompt buffer come out in the next version of
Neovim, I'm really not sure what advantages we get from using the prompt
buffer. And we will continue to have disadvantages because it does *not*
function like a normal buffer. If anyone is using it and has a good
reason for it, please let me know. Otherwise, I'll be removing that
functionality in a later commit so I don't have to support two
implementations.
2021-12-17 12:33:50 -08:00