Commit graph

1398 commits

Author SHA1 Message Date
Folke Lemaitre
c20c402295
fix(mason): rename and pin to v1 2025-05-12 10:39:04 +02:00
Tomas Slusny
b0334fd57c
fix(copilot-chat): switch from deprecated picker integrations (#5707)
- Instead of using picker integrations (that are now deprecated), switch
to using CopilotChat.select_prompt() that is using `vim.ui.select` which
brings the selector integration responsibility to pickers instead of
plugin
- Use vim.ui.input instead of vim.fn.input for consistency

Reason why this was deprecated in CopilotChat.nvim (by me) and will be
removed in future is because these integrations never made any sense
anyway when `vim.ui.select` overrides exist.

## Screenshots

Using fzf-lua in my config, outside of LazyNvim but same thing applies:


![image](https://github.com/user-attachments/assets/a5171ffe-63a6-4b79-9925-fd8bef52e52f)

## Checklist

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

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
2025-03-01 15:21:12 +01:00
Iordanis Petkakis
771089f692
fix(blink): make sure to use LazyVim.config.icons.kinds (#5668)
## Description
This blink
[commit](010d939e7f)
made a change, so that third party sources can provide their own
`item.kind_icon` and `item.kind_name`. The problem is that these icons
will take precedence over `config.kind_icons[kind]`, which LazyVim sets
[here](541b83276e/lua/lazyvim/plugins/extras/coding/blink.lua (L164-L164)).

I noticed that `blink-cmp-copilot` also started providing its own in the
items that it returns. I noticed this because I have the following in my
configuration `columns = { { "label", "label_description", gap = 1 }, {
"kind_icon", "kind" } }`. The icon that it uses is a smaller icon one
character long, which by default it will scale up and show normally like
the LazyVim icon. But when you put another component next to it (like
`kind`) in the `columns` field, then it shows the normal size of the
icon next to the `kind` and it looks kinda weird compared to the default
LazyVim icon.
<!-- Describe the big picture of your changes to communicate to the
maintainers
  why we should accept this pull request. -->

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

## Screenshots
Before (the default icon provided by `blink-cmp-copilot`)

![2025-02-22_02-17](https://github.com/user-attachments/assets/aa7da566-a577-4d32-822c-f2d891b3c047)

After (the LazyVim icon)

![2025-02-22_02-18](https://github.com/user-attachments/assets/342580a9-5a36-47fa-aad7-c139f2765d74)

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

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2025-02-22 07:47:27 +01:00
Thomas Vandal
759a19e785
feat(chezmoi): enhance fzf-lua chezmoi picker and add snacks.dasbhoard entry (#5275)
## Description

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

This PR enhances the fzf-lua picker for chezmoi by using the built-in
`files` picker and by opening the selected file with `ChezmoiEdit` and
`vimcmd_entry` to parse the entry. This simplifies the code and adds
icons and file preview.

The PR also replaces the config entry in snacks.dashboard with the
chezmoi picker, similar to what was already implemented for
dashboard-nvim

## Screenshots

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

Current picker:


![image](https://github.com/user-attachments/assets/d0be9279-f199-4349-8055-04d8a351c6f9)


New picker:


![image](https://github.com/user-attachments/assets/c68fcb6a-79fa-4f65-8c48-60ce64450350)

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2025-02-21 14:28:05 +01:00
Folke Lemaitre
606b96466e
fix(snacks.picker): remove redundant leader-gc keymap. Closes #5646 2025-02-18 23:10:56 +01:00
Iordanis Petkakis
16a772452a
feat(octo): add support for snacks picker (#5625)
## Description
A [PR](https://github.com/pwntester/octo.nvim/pull/858) has landed in
`octo.nvim` that adds initial support for `snacks.picker`. Enable it in
`octo.nvim` Extra if user uses `snacks.picker`.

I also changed the checks to use `has_extra`. This was needed for
`snacks.picker`, since `has("snacks.nvim")` doesn't ensure that user
also has `snacks.picker` enabled. For the others I just changed it for
conformity, but if you think there might be something wrong about that
(that I'm unable to think of), please feel free to change them back.
<!-- Describe the big picture of your changes to communicate to the
maintainers
  why we should accept this pull request. -->

## Related Issue(s)
None
<!--
  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.
2025-02-16 12:20:06 +01:00
abeldekat
f2f2aea672
feat(snippets): mini.snippets standalone and blink.resubscribe (#5507)
## Description


When using blink.cmp and mini.snippets, the same problem regarding
outdated completion items as solved in
[nvim-cmp](https://github.com/hrsh7th/nvim-cmp/pull/2126) can arise.

[This](https://github.com/Saghen/blink.cmp/pull/1035) PR has been
included into main.
When the PR is included into the next stable release, this PR can be
merged.
Current blink release: 0.11.0


## Checklist

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

Co-authored-by: abeldekat <abel@nomail.com>
2025-02-16 09:06:35 +01:00
Iordanis Petkakis
5b94baa1d2
fix(blink): remove unnecessary sources from cmdline (#5620)
## Description
Like Saghen already mentioned in the other PR, this
[commit](19f60a675e)
does a check based on the `enabled` field before adding sources, so it's
no longer needed to define it.
<!-- Describe the big picture of your changes to communicate to the
maintainers
  why we should accept this pull request. -->

## Related Issue(s)
None
<!--
  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.
2025-02-16 08:05:52 +01:00
Iordanis Petkakis
e7f8e4faba
fix(blink): enable Neovim native mapping with <Tab> (#5617)
## Description
Another blink fix unfortunately. 

I noticed that native Neovim `<Tab>` completion didn't work after the
breaking commit.

I checked the commit and noticed it had a boolean `enabled` field, so I
thought maybe that would disable the blink cmdline since we already have
`sources = {}`, but it didn't work. Looking through the commit, I
stumbled upon this piece of
[code](93215d8034 (diff-f313d6f0270f6fed848f1cb7e62c82d3cfaf9b6c7e0072266908eeaf202f11d5R66-R68))
and it seems that it's only checked for applying the blink cmdline
mappings.

So, it seems both `enabled = false` (for Neovim native cmdline mapping)
and `sources = {}` are needed to have default Neovim cmdline experience.

PS: Apparently I don't know how to link from the commit the necessary
part of the commit, so I'm just referencing here the part of the code
[directly in the
file](426a605518/lua/blink/cmp/keymap/init.lua (L66-L70)).
<!-- Describe the big picture of your changes to communicate to the
maintainers
  why we should accept this pull request. -->

## Related Issue(s)
None
<!--
  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.
2025-02-15 23:47:17 +01:00
Iordanis Petkakis
b35015ac59
fix(blink): blink released new version, remove previous hack (#5616)
## Description
`blink.cmp` just made a new stable release. So, remove the hack and
define the option properly in `opts`.

If I knew it would make a release tonight, I'd definitely hold off my
recent PR.
<!-- Describe the big picture of your changes to communicate to the
maintainers
  why we should accept this pull request. -->

## Related Issue(s)
None
<!--
  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.
2025-02-15 22:51:17 +01:00
Iordanis Petkakis
0458e46dcc
fix(blink): cmdline is now top-level on main branch (#5615)
## Description
This `blink.cmp`
[commit](93215d8034)
introduced a breaking change on main branch. `cmdline` is now top-level
and the option is `opts.cmdline.sources = {}`.

I also added a note to remove this hack when the next blink stable
release comes out, which should be greater than current 0.11.0 and just
do it normally in `opts` instead.
<!-- Describe the big picture of your changes to communicate to the
maintainers
  why we should accept this pull request. -->

## Related Issue(s)
None.
<!--
  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.
2025-02-15 21:57:48 +01:00
Folke Lemaitre
4aff0063a4
feat(snacks.picker): move trouble keymap from ctrl+t -> alt+t 2025-02-15 15:46:51 +01:00
Jinfeng Guo
401ef48fcd
feat(snacks.picker): added support for Project shortcuts in other dashboards (#5607)
…shboard-nvim, and mini-starter

## Description

Though the snacks.picker extra provides a project picker, it only adds
the 'Projects' shortcut to snacks' dashboard, and no to the other three
dashboard extra: alpha, dashboard-nvim and mini-starter. In this PR, I
added the 'Projects' shortcuts to these three dashboard extras.

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

## Related Issue(s)

<!--
  If this PR fixes any issues, please link to the issue here.
  - Fixes #<issue_number>
-->

- Fixes #5465

## Screenshots

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

alpha


![image](https://github.com/user-attachments/assets/c050f260-8602-4660-a386-62ab8400ef87)

dashboard-nvim


![image](https://github.com/user-attachments/assets/8973cd62-ba97-4330-9462-74163b58dca9)

mini.starter


![image](https://github.com/user-attachments/assets/a31ec27d-7efb-4aa3-a136-2a4ffedf5ba1)

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2025-02-15 08:30:45 +01:00
Roland Kaminski
5788b9d1e0
feat(extras): setup neogen and mini.snippets integration (#5594)
## Description

Configure neogen and mini.snippets integration.

See also #5593.

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2025-02-14 17:32:33 +01:00
Beartama
0a5965b787
feat(editor): update parameter for fzf-lua (#5584)
## Description

`fzf-lua` renames their parameter in
7cede182cf,
so this PR updates the parameter also to stop the deprecation warning.

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2025-02-12 14:21:29 +01:00
Folke Lemaitre
7529773371
feat(lsp): use lsp_config picker instead of LspInfo 2025-02-11 14:00:03 +01:00
Folke Lemaitre
121a2e27ef
fix(extras): disable import handling when loading :LazyExtras + changed some recommendations 2025-02-10 23:27:24 +01:00
Folke Lemaitre
2a608f00d4
fix(copilot-chat): added support for snacks picker. Closes #5432. Closes #5552 2025-02-08 18:32:46 +01:00
Folke Lemaitre
2b3bcf36b2
fix(snacks.picker): move dashboard shortcut to picker extra. Closes #5549 2025-02-08 15:27:26 +01:00
Folke Lemaitre
2d6b49281d
fix(snacks.explorer): no longer needed to disable neo-tree 2025-02-08 15:25:10 +01:00
Folke Lemaitre
525377dee9
feat(extras): big rework of default extras 2025-02-08 15:04:46 +01:00
cjon256
5c9732733d
fix(go): update go.lua to eliminate fieldalignment from analyses (#5170)
## Description

Removed a setting from the go lang plugin. The setting now just causes
an error:
LSP[gopls] Invalid settings: setting option "analyses": this setting is
deprecated, use "the 'fieldalignment' analyzer was removed in
gopls/v0.17.0; instead, hover over struct fields to see size/offset
information (https://go.dev/issue/66861)" instead

## Checklist

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

Note: submitted similar request as f96aac6 but was rejected by CI/CD for
naming reasons. Changing the name did not help. Retrying.
2025-02-08 00:09:03 +01:00
RohitB
23a1bbdae9
feat(refactoring): fallback to using vim ui select for refactoring.nvim (#5540)
## Description

Fallback to using `require("refactoring").select_refactor()` if neither
of `telescope` or `fzf-lua` is installed. Since `select_refactor()` uses
`vim.ui.select` internally, it can use `snacks.picker` if it is enabled.
## Related Issue(s)

<!--
  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.
2025-02-06 21:39:37 +01:00
Folke Lemaitre
3e8fddcd54
style(snacks.picker): buffer diagnostics keymap desc 2025-02-05 14:41:30 +01:00
Folke Lemaitre
ab30442652
feat(snacks.picker): some extra keymaps 2025-02-05 08:00:58 +01:00
Folke Lemaitre
fb256f2b68
feat(snacks.picker): add projects picker to dashboard if snacks picker is enabled 2025-02-02 23:34:07 +01:00
Folke Lemaitre
1a4d948e0d
perf(snacks_picker): lazy-load trouble open action 2025-02-02 18:03:13 +01:00
Folke Lemaitre
3500d6a826
feat(bufferline): support for snacks picker sidebars 2025-01-31 20:33:15 +01:00
Folke Lemaitre
8f4e9b8c1e
fix(copilot): remove load on BufReadPost instead of InsertEnter 2025-01-31 20:10:50 +01:00
abeldekat
4a81a370d7
feat(snippets): mini.snippets is out of beta (#5505)
## Description

mini.snippets is out of beta, so I adjusted the description for the
extra accordingly


## Checklist

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

---------

Co-authored-by: abeldekat <abel@nomail.com>
2025-01-31 17:11:26 +01:00
Folke Lemaitre
0e94534dd9
style(picker.explorer): use shortcut 2025-01-31 08:33:15 +01:00
Folke Lemaitre
4f006f1fba
feat(snacks.explorer): enabled netrw integration 2025-01-31 08:32:48 +01:00
Folke Lemaitre
e9db488aca
feat(markdown): added markdown support for codecompanion 2025-01-30 21:38:56 +01:00
Folke Lemaitre
e20d9afcbc
feat(snacks): extra for snacks explorer (replacement for neo-tree) 2025-01-30 15:21:01 +01:00
Folke Lemaitre
b5cd0d0e27
fix(snacks.picker): flash integration 2025-01-29 23:21:59 +01:00
Folke Lemaitre
3de7b24cf6
fix(snacks.picker): snacks => flash 2025-01-29 21:06:38 +01:00
Folke Lemaitre
5d24aa6311
feat(snacks.picker): flash.nvim integration 2025-01-29 20:18:43 +01:00
Iordanis Petkakis
f0d2629bd8
fix(snacks): use Snacks.picker for recent files (#5485)
## Description
Use `Snacks.picker` for recent files instead of `LazyVim.pick`, because
`root_dir` is being propagated to `opts.cwd` and does not correctly
filter out recent files when inside nested directories.
<!-- Describe the big picture of your changes to communicate to the
maintainers
  why we should accept this pull request. -->

## Related Issue(s)
None
<!--
  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.
2025-01-28 18:55:02 +01:00
Folke Lemaitre
01a70cc60e
feat(snacks.picker): use snacks picker for notifications when enabled 2025-01-28 17:22:17 +01:00
Iordanis Petkakis
0350934d56
fix(luasnip): schedule jump to be compatible with blink, nvim-cmp still works after change (#5470)
## Description
Schedule `jump` in Luasnip `snippet_forward`, so that it doesn't get
stuck before the last placeholder.
<!-- Describe the big picture of your changes to communicate to the
maintainers
  why we should accept this pull request. -->

## Related Issue(s)
Fixes #5469
<!--
  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.
2025-01-28 09:19:01 +01:00
Folke Lemaitre
83bf6360a1
feat(snacks.picker): added leader-fB to find any buffer (including hidden & nofile) 2025-01-23 19:22:47 +01:00
Folke Lemaitre
7cf4185dc4
feat(snacks.picker): added leader-sp to search for plugin spec 2025-01-23 19:22:19 +01:00
Jorge Villalobos
eea52be344
feat(snacks.picker): added <leader>si to search icons (#5460)
## Description

As it reads on the tin can.

## Related Issue(s)

N/A

## Screenshots

![Screenshot 2025-01-23 at 11 49
49](https://github.com/user-attachments/assets/6c4d0e9a-0a8e-4128-9ef1-b7954ece2bc7)

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2025-01-23 19:19:48 +01:00
Jorge Villalobos
332b32080c
feat(snacks.picker): added <leader>su to search undotree (#5447)
## Description

As it reads on the title ;)

## Related Issue(s)

None.

## Screenshots

![Screenshot 2025-01-22 at 14 02
30](https://github.com/user-attachments/assets/f8d2ba88-f279-4715-8120-7610c58bd269)
![Screenshot 2025-01-22 at 14 03
04](https://github.com/user-attachments/assets/08bc1b26-f49c-4f25-ad66-1166a3f72605)

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2025-01-23 16:51:36 +01:00
abeldekat
8b4e6ff70d
feat(snippets): an extra for mini.snippets (#5274)
## Description

Mini.snippets, a plugin to manage and expand snippets, is currently in
[beta](https://github.com/echasnovski/mini.nvim/issues/1428).

I think the plugin is a very interesting alternative to `luasnip`.

The following `lazydoc` will be added:

```lua
if lazyvim_docs then
  -- Set to `false` to prevent "non-lsp snippets"" from appearing inside completion windows
  -- Motivation: Less clutter in completion windows and a more direct usage of snippits
  vim.g.lazyvim_mini_snippets_in_completion = true

  -- Using default mini.snippets, completion suggestions might appear directly after inserting a snippet
  -- This extra prevents that from happening.
  -- Motivation: A better display of the current snippet.
  -- Also, those completions do not appear when using luasnip or native snippets
  --
  -- Set to `false` to enable completion suggestions directly after inserting a snippet
  vim.g.lazyvim_mini_snippets_override_expand_insert = true

  -- NOTE: Please also read:
  -- https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-snippets.md#expand
  -- :h MiniSnippets-session

  -- Example override for your own config:
  --[[
  return {
    {
      "echasnovski/mini.snippets",
      opts = function(_, opts)
        -- By default, for opts.snippets, the extra for mini.snippets only adds gen_loader.from_lang()
        -- This provides a sensible quickstart, integrating with friendly-snippets
        -- and your own language-specific snippets
        --
        -- In order to change opts.snippets, replace the entire table inside your own opts

        local snippets, config_path = require("mini.snippets"), vim.fn.stdpath("config")

        opts.snippets = { -- override opts.snippets provided by extra...
          -- Load custom file with global snippets first (order matters)
          snippets.gen_loader.from_file(config_path .. "/snippets/global.json"),

          -- Load snippets based on current language by reading files from
          -- "snippets/" subdirectories from 'runtimepath' directories.
          snippets.gen_loader.from_lang(), -- this is the default in the extra...
        }
      end,
    },
  }
--]]
end

```

It's possible to use the code from this PR directly in your own
configuration:

1. Copy the code to lua/extras/coding/mini_snippets.lua in your config
folder
2. Restart nvim and enable the "user" extra for `mini.snippets`
3. Restart nvim
 
## Checklist

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

---------

Co-authored-by: abeldekat <abel@nomail.com>
2025-01-23 12:03:36 +01:00
Folke Lemaitre
1e83b4f843
fix(sql): better nvim-cmp check. Closes #5188 2025-01-20 20:32:17 +01:00
Folke Lemaitre
c7a7ab5112
fix(vscode): diabled some snacks plugins. Fixes #5364 2025-01-20 20:30:39 +01:00
Folke Lemaitre
6be7c4fee4
feat(snacks.picker): added alt-c to toggle between cwd/root dir 2025-01-20 20:21:23 +01:00
Junyi Liu
66c3577bc7
perf(java): setting opts.dap_main to false to disable main class scan (#5391)
## Description

For large Java project, calling
`require("jdtls.dap").setup_dap_main_class_configs(opts.dap_main)` has a
huge performance impact on the LSP. I tested on a Java project with 3.7K
java source files and 12K other files, a simple go_definition can take
about 20-30 seconds.

This change allow user to set the `opts.dap_main` to false so we can
skip the main class scan. By using the `.lazy.lua` project specific
setting, we can easily customize this option per project.

## Related Issue(s)

#5387 

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2025-01-20 13:16:14 +01:00
Daniel Chong
eb7b453b48
fix(snacks.picker): fix mapping for Projects for consistency (#5433)
## Description

`<leader>fp` is the mapping for Telescope and fzf for
[Projects](https://www.lazyvim.org/extras/util/project). This PR makes
this shortcut consistent for snacks picker.

## Related Issue(s)

## Screenshots

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2025-01-20 11:55:51 +01:00