Commit Graph

79 Commits

Author SHA1 Message Date
Folke Lemaitre
cd8c4977a0 feat(lsp): lsp keymaps can now be configured with lsp-config.opts.servers['*'].keys like for lsp servers 2025-10-25 16:57:16 +02:00
Folke Lemaitre
9c611b0c57 fix(options): track some initial options right after loading options.lua. See #6463 2025-09-19 20:26:36 +02:00
Folke Lemaitre
2401d5fca6 fix(options): set_default option 2025-09-18 23:51:32 +02:00
Folke Lemaitre
ccbaf55c2f feat(options): don't overwrite indentexpr/foldexpr/foldmethod when set by plugins. Fixes #6464 2025-09-18 22:19:03 +02:00
Folke Lemaitre
5bf237820d fix(snacks): safe wrapper around snacks statuscolumn to prevent errors when LazyVim is still installing 2025-09-18 09:49:54 +02:00
Folke Lemaitre
72e1ee5b0d refactor(treesitter): cleanup 2025-09-17 15:33:37 +02:00
Iordanis Petkakis
773f28b491 fix(mason): migrate to mason v2 (#6053)
## Description
`mason-lspconfig` v2 made changes to conform with latest Neovim
`vim.lsp.config`/`vim.lsp.enable` API.

- Lock `mason` and `mason-lspconfig` to v1 versions for Neovim <0.11 and
latest HEAD for Neovim >=0.11.
- Change `:get_install_path()` method in LazyVim to use
`LazyVim.get_pkg_path()` and also update name references to new ones.
- Change `nvim-lspconfig` from `LazyFile` to `{ "BufReadPre",
"BufNewFile", "BufWritePre" }` for Neovim >=0.11, since on `BufReadPost`
the LSP would not attach on the first buffer. Previously the
`setup.handlers()` function from `mason-lspconfig` would take care of
that, but that has been removed on v2. I fail to think if there's a
better way to handle this.

Most of the changes in `/lsp/init.lua` are thanks to @williamboman
comment
[here](https://github.com/LazyVim/LazyVim/pull/6041#issuecomment-2857266471).

I've also seen that both `mason-lspconfig` and `rustaceanvim` now have
as minimum requirements Neovim >=0.11.
As such I would suggest, instead of all the conditional checks for
Neovim versions to create a stable release where we pin `mason` and
`mason-lspconfig` to v1 versions and then only incorporate William's
suggestions in a new release and mention in the README that users who
are on Neovim <0.11 should use the stable release where the plugin
versions are pinned to v1. Not sure how you want to tackle this, so this
is merely just a suggestion from my part.

Both #6041 and #6045 tackle only with the new name references and the
offending line that was causing the error, but don't take into
consideration the LSP servers configurations. `opts.setup` would not
execute on both, since that was handled by `setup_handlers()` function
in the past. I checked with Typescript lang and with those PRs there are
no Javascript settings in `vtsls` (by checking with
`:=LazyVim.opts("nvim-lspconfig").servers.vtsls`).
#6045 also tried to change the method `:get_install_pkg()` by using
`vim.fn.exepath`, but to my understanding that only returns the binary
path not the package installation path and that is later concatenated to
find other paths, which I believe is not correct.

PS: There are 2 commits, because my LazyVim fork was not up to date and
updated it and then merged the branch I had into a new branch. Sorry if
that causes any inconvenience.
<!-- Describe the big picture of your changes to communicate to the
maintainers
  why we should accept this pull request. -->

## Related Issue(s)
Fixes #6039
<!--
  If this PR fixes any issues, please link to the issue here.
  - Fixes #<issue_number>
-->

## Screenshots

<!-- Add screenshots of the changes if applicable. -->

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.

---------

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
Co-authored-by: William Boman <william@redwill.se>
Co-authored-by: Luis Durão <kpvrzlzzx@mozmail.com>
2025-09-15 12:08:19 +02:00
Folke Lemaitre
525377dee9 feat(extras): big rework of default extras 2025-02-08 15:04:46 +01:00
Folke Lemaitre
0416376733 feat(util): has_extra now also checks for manual imports in lazy.lua 2025-02-08 13:49:05 +01:00
Folke Lemaitre
009e3587be fix(cmp): wrong extras check for nvim-cmp 2024-12-13 19:53:18 +01:00
Folke Lemaitre
2cbfb9b6b7 feat(cmp)!: moved nvim-cmp to extras and prefer blink.cmp on Neovim >= 0.10 as default completion engine 2024-12-12 13:47:29 +01:00
Folke Lemaitre
2f4697443c feat(core)!: move a bunch of LazyVim features to snacks.nvim (#4706)
## Description

LazyVim comes with a bunch of smaller QoL plugin like features, but it's
not easy for non LazyVim users to use them.

That's why I started working on
[snacks.nvim](https://github.com/folke/snacks.nvim), a collection of
small QoL plugins for Neovim.

Snacks also includes a bunch of new improvements to these features.

This PR fully integrates with snacks.

## Todo

- [ ] add proper deprecations where needed
- [ ] create snacks docs
- [ ] document all the new improvements relevant to LazyVim users

## Closes

- [ ] #4492 
- [ ] #4333
- [ ] #4687

## Screenshots

<!-- Add screenshots of the changes if applicable. -->

## Checklist

- [ ] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2024-11-07 15:54:47 +01:00
dotfrag
71390adcbe refactor(util): use available get_plugin() function (#3687)
## What is this PR for?

Small refactor to use the already available `get_plugin()` function.

## Does this PR fix an existing issue?

No.

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2024-06-16 09:06:53 +02:00
Folke Lemaitre
425e6e0ea3 fix(pick): use LazyVim.pick instead of M since dashboard dumps/loadstrings functions. Why though... Fixes #3617 2024-06-13 06:13:39 +02:00
Folke Lemaitre
39a908c9fa feat(pick): move pickers to extras (telescope still the default) (#3606)
## What is this PR for?

Refactoring of pickers in LazyVim:

- [x] telescope moved to extras
- [x] dressing was moved to the telescope extra. Not needed with fzf-lua
and noice
- [x] when none of the two is enabled, then telescope will be enabled
- [x] when using `:LazyExtras` to enable fzf-lua, the telescope spec
will never be parsed
- [x] when not using `:LazyExras`, the spec will be parsed, but one of
the two will be disabled.
- [x] only one picker extra can be used to prevent issues
- [ ] cleanup lsp keymaps
2024-06-13 06:07:02 +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