## Description
This PR addresses issue #5503 by modifying the behavior of `<leader>xq`
and `<leader>xl` so that they toggle the quickfix and location lists
rather than simply opening them.
To prevent the full Lua error stack from being printed when no list
exists prior to using `copen` or `lopen`, I've wrapped the commands in
`pcall` and used `vim.notify` to alert the user in the same manner as
before.
## Related Issue(s)
#5503
## Screenshots
https://github.com/user-attachments/assets/b22b1861-e6e5-4d8a-967e-f760cca15719
## Checklist
- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
## 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.
## 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.
## 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>
## 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.
## Description
The `<leader>w` mapping, described as "Windows", was causing potentially
timeout-related bugs with many other mappings that also started with
`<leader>w`.
The problems caused by this are described in detail in issue #5456 and
in discussion #4157.
@dpetka2001 Suggested removing it as an experiment, which I tried and
found to work.
<!--
- Fixes#5456
- Fixes#4157
-->
## Checklist
- [X] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
## 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.
## 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>