Commit graph

65 commits

Author SHA1 Message Date
Folke Lemaitre
b2b6ff0738 feat(pick): move pickers to extras telescope & fzf-lua and include telescope by default 2024-06-12 18:20:16 +02:00
Folke Lemaitre
14d47f650c
refactor: memoize 2024-06-11 06:51:30 +02:00
Aofei Sheng
335487282a
fix(util): ensure unique cache keys in LazyVim.memoize (#3576)
## What is this PR for?

This PR fixes a bug in the `LazyVim.memoize` function that was causing
unexpected behavior in my configuration. The issue was discovered when
setting `vim.g.lazyvim_prettier_needs_config = true` in my
`lua/config/options.lua`, which did not work as expected.

The root cause was an issue with `LazyVim.memoize` cache key generation,
which led to `M.has_config(ctx)` always returning the same result as
`M.has_parser(ctx)`. This happened because `LazyVim.memoize` generates
cache keys based on the function parameters, and both functions were
being called with identical parameters:


7d30360df2/lua/lazyvim/plugins/extras/formatting/prettier.lua (L77-L81)

By improving the cache key generation to include function information,
we can ensure unique keys for different functions even if their
parameters are identical, thereby fixing the issue.

## Does this PR fix an existing issue?

N/A

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2024-06-11 06:41:37 +02:00
Folke Lemaitre
6ab404134d
feat(extras): added fzf-lua (#3555)
New extra with an initial implementation of fzf-lua.

## Todo

- [x] check all places that currently depend on telescope and provide an
alternative or disable
- [x] disable telescope spec completely. (currently only removed its
keymaps)
- [x] trouble integration
- [x] https://github.com/ibhagwan/fzf-lua/issues/1241

---------

Co-authored-by: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com>
2024-06-10 21:58:33 +02:00
Folke Lemaitre
5a11d740e1
feat(util): added LazyVim.memoize 2024-06-07 23:02:47 +02:00
Folke Lemaitre
b714f28662
feat(util): added LazyVim.has_extra 2024-06-07 23:02:47 +02:00
Folke Lemaitre
73c767c2f3
fix(util): don't print warning message in headless 2024-06-05 18:15:45 +02:00
Folke Lemaitre
d64d761539
feat: enabled ts-plugin support for astro and svelte 2024-06-05 11:09:12 +02:00
Folke Lemaitre
596c439db5
feat(util): utility methods for lazy plugins 2024-06-02 09:33:19 +02:00
Folke Lemaitre
c33d6578a8
fix(util): make sure doc gen works 2024-06-01 10:25:10 +02:00
Folke Lemaitre
a6df15a63f
fix(util): make sure mason is loaded when getting package paths 2024-06-01 08:48:29 +02:00
Folke Lemaitre
276b50e389
style: docs for LazyVim.extend 2024-06-01 08:42:00 +02:00
Folke Lemaitre
683aaeb75b
feat(astro): added support for ts-plugin, but won't work till mason-registry PR is merged. See #3364 2024-06-01 08:33:24 +02:00
Folke Lemaitre
9d999fa210
refactor: refactored mason/typescript/vue support 2024-06-01 08:31:10 +02:00
Folke Lemaitre
9f2cc30246
fix(lsp): better way of extending deeply nested lists. Fixes #3398 2024-05-31 13:52:43 +02:00
Folke Lemaitre
39f3ebcadf
feat(cmp): move cmp autobracket support to util class 2024-05-19 21:46:54 +02:00
Folke Lemaitre
3a4672de3f
fix(util): fixup 2024-05-18 23:54:17 +02:00
Folke Lemaitre
673975ebbe
feat(cmp): create undo point right before confirming a completion 2024-05-18 23:28:38 +02:00
Folke Lemaitre
4105c0ad3a
feat(util): added Util.is_loaded 2024-05-18 21:53:26 +02:00
Folke Lemaitre
14872fa816
fix(util): get opts from parsing specs instead of plugins 2024-05-16 22:14:57 +02:00
Folke Lemaitre
20081460b6 feat(extras): added extra for the nvim-treesitter rewrite. Some plugins are not compatible and will be disabled. 2024-05-16 21:25:51 +02:00
Folke Lemaitre
349ae03f09
fix: merge conflict 2024-03-29 09:45:31 +01:00
Folke Lemaitre
7d0dbc6ded
feat(lazygit): lazygit now automatically uses colors from your Neovim colorscheme
Disable by setting `vim.g.lazygit_theme = false` in your `options.lua`
2024-03-26 12:43:07 +01:00
Folke Lemaitre
7a5dbeae75
feat: use LazyVim everywhere instead of require("lazyvim.util") 2024-03-22 09:15:09 +01:00
Folke Lemaitre
3a87c08cda
feat: use vim.uv everywhere instead of vim.loop 2024-03-22 09:02:34 +01:00
Folke Lemaitre
8af7309c7e
feat(lualine): pretty_path now highlights file basename when modified 2023-10-15 22:37:49 +02:00
Folke Lemaitre
1a4342abae
refactor: move cmp status lualine component to util 2023-10-14 18:02:47 +02:00
Folke Lemaitre
7c7b4be8db
fix(toggle): dont show incorrect deprecation warning for toggle. Fixes #1679 2023-10-12 17:59:48 +02:00
Folke Lemaitre
2a0b7a88ba
fix(config): make lazyvim.json idempotent, pretty-printed and remove full paths 2023-10-12 17:48:52 +02:00
Folke Lemaitre
73acab1675
feat: added NEWS.md and option to automatically show when changed (enabled by default) 2023-10-12 14:38:25 +02:00
Folke Lemaitre
e239235cd3 feat(util): inject module 2023-10-12 11:48:02 +02:00
Folke Lemaitre
c4e55e4d67 feat(ui): added :LazyExtras to manage enabled extras in LazyVim 2023-10-12 11:48:02 +02:00
Folke Lemaitre
70f91956e7 perf(plugin): move all lazy.nvim related code to lazyvim.util.plugin 2023-10-12 11:48:02 +02:00
Folke Lemaitre
c8c929c9fd perf(util): split lazyvim.util in smaller separate modules 2023-10-12 11:48:02 +02:00
Folke Lemaitre
4e8a88fc1f
fix(util): dont schedule on_load 2023-10-09 22:09:39 +02:00
Folke Lemaitre
1eac633c4f
perf(util): closure for get_clients to prevent loading vim.lsp cascade early 2023-10-08 20:24:45 +02:00
Folke Lemaitre
eebdceca17
fix(util): fixup typo vim.lsp.get_active_clients 2023-10-08 12:56:27 +02:00
Folke Lemaitre
6b837e9165
style: lua annotations and handle deprecated methods 2023-10-08 10:45:38 +02:00
Folke Lemaitre
21ee35f710
fix(util): fixed lsp willRenameFiles support check 2023-10-08 10:44:17 +02:00
Folke Lemaitre
25f3587f3f
refactor(keymaps): move safe keymap.set wrapper to util and add message not to use it in a personal config 2023-10-08 10:28:01 +02:00
Folke Lemaitre
4ff51cd678
feat(mini.files): added lsp rename support to mini.files 2023-10-02 11:02:56 +02:00
Folke Lemaitre
df0818880e
fix(util): fixed line number toggling. Closes #1173 2023-07-20 23:38:43 +02:00
Folke Lemaitre
9387ab388e
feat: added leader-L to show the LazyVim changelog 2023-07-13 08:18:02 +02:00
Folke Lemaitre
9fd89701da
feat(util): added util.on_load to execute code when a plugin loads 2023-07-12 17:25:35 +02:00
Folke Lemaitre
bcff5a1937
fix(util): use spec to check if a plugin is enabled 2023-07-06 15:35:34 +02:00
Folke Lemaitre
ebd002f135
fix(keymaps): disable ctrl-hjkl for lazygit. Fixes #905 2023-06-16 19:06:27 +02:00
Folke Lemaitre
41f515caae
feat(util): LazyVim terminals can now be opened/reopened with a count 2023-06-16 14:52:13 +02:00
Folke Lemaitre
5a47492535
feat(util): LazyVim terminals are now persistent by default (toggleterm) 2023-06-03 10:49:58 +02:00
André Freitas
d35d982984
chore: remove unused upvalue function (#823) 2023-05-25 20:05:02 +02:00
Folke Lemaitre
89db0157b1
feat(mini.comment): added ts-context-commentstring back and made it work with mini.comment 2023-05-23 08:41:44 +02:00