Commit graph

287 commits

Author SHA1 Message Date
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
dotfrag
21617a9d60
feat(lualine): show readonly icon (#3567)
Adds a configurable lock icon when a file is opened as read only. Mimics
`vi -R <file>` status line.
2024-06-10 22:06:09 +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
7793942eba
feat(octo): re-open octo windows when restoring session + cleanup 2024-06-09 11:42:58 +02:00
Folke Lemaitre
d90930b13e
fix(typescript): implemented move to new file. Fixes #3534 2024-06-08 07:30:49 +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
81370cf714
fix(octo): fixed octo's rendering of comment signs when lines are wrapped 2024-06-06 16:05:55 +02:00
Folke Lemaitre
100c5793c8
feat(extras): added extra for octo.nvim. Make sure to update lazy.nvim, which-key.nvim and also update tokyonight if you use that theme. 2024-06-06 12:25:11 +02:00
Folke Lemaitre
c4ccd7cbce
feat(git): added leader-gB to browse remotes of the current repo 2024-06-06 10:46:56 +02:00
Aleksey Imuzov
2c2b6f200c
fix(ui): remove extra space in extras ui (#3481)
Remove extra space between icon and text (for source label).

## Before:
<img width="1893" alt="image"
src="7778e103-729a-4231-bb23-0482ae9d8506">

## After:
<img width="1893" alt="image"
src="b8e6b4d3-2554-4312-b7d3-7fd5b8c146d4">
2024-06-06 06:09:58 +02:00
Folke Lemaitre
502602e4a2
feat(extras): allow recommended to be the args for LazyVim.extras.wants 2024-06-05 23:35:14 +02:00
Folke Lemaitre
a636bf2022
feat(typescript): open locations from lsp execute command with trouble for vtsls 2024-06-05 22:19:19 +02:00
Folke Lemaitre
1bd4d2fc72
feat(lsp): simpler API to deal with code actions 2024-06-05 22:18:14 +02:00
Folke Lemaitre
73c767c2f3
fix(util): don't print warning message in headless 2024-06-05 18:15:45 +02:00
Phúc H. Lê Khắc
fa706b320b
feat(statuscol): statuscolumn options for open fold indicator and fold hl (#2923)
* feat(statuscol): fold open indicator

* fix: make it configurable

---------

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2024-06-05 11:23:19 +02:00
Folke Lemaitre
d64d761539
feat: enabled ts-plugin support for astro and svelte 2024-06-05 11:09:12 +02:00
Folke Lemaitre
e32d1918ae
fix(python): removed the python-semshi extra 2024-06-05 11:01:10 +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
596c439db5
feat(util): utility methods for lazy plugins 2024-06-02 09:33:19 +02:00
Folke Lemaitre
b2858a297a
feat(extras): show extras imported in other extras 2024-06-01 11:22:17 +02:00
Folke Lemaitre
45b92aa381
feat(extras): split enabled in enabled plugins/languages 2024-06-01 11:21:28 +02:00
Folke Lemaitre
c33d6578a8
fix(util): make sure doc gen works 2024-06-01 10:25:10 +02:00
Folke Lemaitre
4e62df4269
fix(health): remove old deprecated module checks 2024-06-01 08:48:44 +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
Iordanis Petkakis
060f56d6d4
fix(extras): underline = false for setting diagnostics (#3379)
Similar to ea7b9c3c3f#
I only noticed this, because in my main config I have some Extras not
managed by `LazyExtras`.
2024-05-30 16:08:34 +02:00
Folke Lemaitre
95d055dcf7
feat: trouble v3 2024-05-30 14:41:13 +02:00
Folke Lemaitre
c4b7505969
fix(extras): show recommended languages above enabled plugins 2024-05-30 11:17:23 +02:00
Folke Lemaitre
7414e84af9
fix(root): escape glob expressions 2024-05-30 11:17:23 +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
Folke Lemaitre
f6bcf6f12c
fix(lsp): fix ts/deno both attaching 2024-05-29 15:39:17 +02:00
Folke Lemaitre
b949dba489
feat(lsp): added leader-cR to rename the current file and to lsp rename operations 2024-05-29 14:45:55 +02:00
Folke Lemaitre
4bbeb37a18
fix(lsp): fix LazyVim's on_file_rename to work according to the lsp spec 2024-05-29 14:45:55 +02:00
Folke Lemaitre
1b86d7b2ad
fix(snippets): fix snippets with multiple placeholders for the same tabstop 2024-05-28 19:32:21 +02:00
Folke Lemaitre
eb0da3c92f
feat(snippets): try to use the snippet parse to get a preview 2024-05-28 19:31:59 +02:00
Folke Lemaitre
425dadef72
fix(snippets): show actual error for failed snippet 2024-05-28 19:31:22 +02:00
Folke Lemaitre
cf4374867d
feat(snippets): re-number tabstops for invalid snippets 2024-05-28 16:12:35 +02:00
Folke Lemaitre
0a63734b78
fix(lsp): double check for documentHighlight. See #3246 2024-05-27 18:22:44 +02:00
Folke Lemaitre
eb1c04bd31
fix(terminal): make gf behave. Fixes #3335 2024-05-27 17:38:51 +02:00
Folke Lemaitre
dbed614655
fix(laygit): normalize paths. Fixes #3327 2024-05-27 05:35:47 +02:00
Folke Lemaitre
d23e8572e8
fix(laygit): use correct .git root for git blame 2024-05-27 07:13:43 +02:00
Folke Lemaitre
53911748dd
fix(snippet): always use top-level snippet session. Fixes #3199 2024-05-26 18:51:14 +02:00
Folke Lemaitre
3a30070a4c
feat: lazyrc files are now a lazy.nvim feature 2024-05-26 16:49:48 +02:00