Commit Graph
17 Commits
Author SHA1 Message Date
Folke Lemaitre c1b76ee235 feat(toggle): move toggle notifs to toggle function 2024-07-17 15:07:04 +02:00
Folke Lemaitre 60b10deeb0 style(toggle): types 2024-07-16 23:54:23 +02:00
Folke Lemaitre 150523b77b feat(toggle): make toggles callable. Fixes #4081 2024-07-16 23:34:27 +02:00
Folke Lemaitre a1335e59e1 style: fix toggle desc 2024-07-15 23:56:07 +02:00
Folke Lemaitre 78cf0320bf feat(keymaps): dynamic which-key icons/descriptions for toggles (#4050)
## Description

<!-- Describe the big picture of your changes to communicate to the
maintainers
  why we should accept this pull request. -->

## Related Issue(s)

- [ ] Closes #4025

## Screenshots


![image](https://github.com/user-attachments/assets/8453c23c-d560-490c-9f96-a22ea88f45fd)

## Checklist

- [ ] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2024-07-15 15:47:44 +02:00
Folke Lemaitre 452b70ad15 fix(toggle): slightly better maximize 2024-06-05 07:40:28 +02:00
Folke Lemaitre 1c583650e6 fix(toggle): un-maximize when quiting Neovim 2024-06-05 07:02:19 +02:00
Iordanis Petkakis 8971ea25f9 fix(toggle): Restore width/height values when closing while maximized is toggled on (#3453) 2024-06-05 06:54:52 +02:00
Folke Lemaitre 3ace8277e5 feat(keymaps): new keymap to toggle mazimize of current window leader-m or leader-wm 2024-05-29 22:35:40 +02:00
Iordanis Petkakis 23374f160a fix(util.toggle): correctly toggle inlay_hints (#3202)
`is_enabled` also accepts a `filter` and when we initially toggle
`inlay_hints` on
[here](https://github.com/LazyVim/LazyVim/blob/735f5905f85fec0dd5210f2c835597caa5a409fb/lua/lazyvim/plugins/lsp/init.lua#L153),
we pass a `bufnr` which sets the `inlay_hints` in the `bufstate` (see
[here](https://github.com/neovim/neovim/blob/42aa69b076cb338e20b5b4656771f1873e8930d8/runtime/lua/vim/lsp/inlay_hint.lua#L407-L432)),
but when we call `is_enabled` without a filter table the returned result
if from the `globalstate` (see
  [here](https://github.com/neovim/neovim/blob/42aa69b076cb338e20b5b4656771f1873e8930d8/runtime/lua/vim/lsp/inlay_hint.lua#L376-L388)).
2024-05-17 20:06:17 +02:00
Folke Lemaitre 960ec8079b fix: deprecation warning on diagnostic.is_disabled 2024-05-17 09:19:28 +02:00
Iordanis Petkakis 5f92dc5304 fix(toggle): use new inlay_hint.enable() signature (#3013) 2024-04-22 09:36:05 +02:00
Folke Lemaitre 7a5dbeae75 feat: use LazyVim everywhere instead of require("lazyvim.util") 2024-03-22 09:15:09 +01:00
Iordanis PetkakisandFolke Lemaitre 93342f15ba feat(toggle): use vim.diagnostic.is_disabled when available (#2217)
* feat(toggle-diagnostics): change logic based on `vim.diagnostic.is_disabled`

After discussion in #2215, I thought maybe it would be beneficial if we
could change the logic of the `toggle-diagnostics` function based on if
the user has disabled diagnostics in his own configuration.

* feat(toggle-diagnostics): revert to `enable` instead of `status`

* fix(toggle): use vim.diagnostics enabled state when possible

---------

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2024-01-21 20:41:11 +01:00
Folke Lemaitre 8baf9b5459 fix(lsp): fix inlay hints for older nightlies. See #2007 2023-11-30 21:24:07 +01:00
Gary MurrayandGary Murray 6853b785d9 fix(lsp): detect if using nvim-0.10 and use new inlay_hint.enable method (#2007)
* Detect if using nvim 0.10 and use new inlay_hint.enable method

* Add lsp util for inlay-hints and update keymap

* Remove the need to check vim version

* Support older nightly builds

* Move inlay_hint toggle in Util.toggle

---------

Co-authored-by: Gary Murray <gamurray@fanatics.com>
2023-11-30 19:53:40 +01:00
Folke Lemaitre c8c929c9fd perf(util): split lazyvim.util in smaller separate modules 2023-10-12 11:48:02 +02:00