## Description
This fixes the keymaps for `refactoring.nvim` to work with the latest
version (see issue linked below)
## Related Issue(s)
- #5881
## Checklist
- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
## Description
Installing the Haskell extras currently installs telescope.nvim as well,
since the dependency is not marked optional. This marks it optional so
telescope.nvim is no longer pulled in automatically.
## Checklist
- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
Co-authored-by: Christoph Schmidpeter <christoph.schmidpeter@gmail.com>
Fix:
```
Failed to run `config` for nvim-jdtls
...im/lazy/LazyVim/lua/lazyvim/plugins/extras/lang/java.lua:113: attempt to call field 'root_dir' (a nil value)
- /LazyVim/lua/lazyvim/plugins/extras/lang/java.lua:113 _in_ **full_cmd**
- /LazyVim/lua/lazyvim/plugins/extras/lang/java.lua:169 _in_ **attach_jdtls**
- /LazyVim/lua/lazyvim/plugins/extras/lang/java.lua:286 _in_ **config**
- ~/.local/share/bob/nightly/share/nvim/runtime/filetype.lua:36
- vim/shared.lua:0
- ~/.local/share/bob/nightly/share/nvim/runtime/filetype.lua:35
- vim/_editor.lua:0 _in_ **cmd**
- /persistence.nvim/lua/persistence/init.lua:88 _in_ **load**
- lua:1
- vim/_editor.lua:0 _in_ **action**
- /snacks.nvim/lua/snacks/dashboard.lua:693
```
## Description
<!-- 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>
-->
## 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
As per
[comment](23b9cdeb34 (r165830889)),
use `root_dir` with `util.root_pattern` instead of `root_markers` for
globs support.
I don't actually do Ocaml to thoroughly test it, but it should work in
theory 😛
<!-- 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
`vim.lsp.config` doesn't provide `on_new_config`, which is causing
`b0o/SchemaStore.nvim` fail to load.
This PR replaces `on_new_config` with `before_init` fixing the issue.
## Checklist
- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
## Description
<!-- Describe the big picture of your changes to communicate to the
maintainers
why we should accept this pull request. -->
Nvim 0.11 had some breaking changes in lsp related parts. And one of
them is that if the root_dir field of lsp config is a function, the
bufnr and a function would be passed instead of the file name in nvim
0.10. As a result, the configurations of extra.lang.clangd broke.
However, before the breaking changes of mason and mason-lspconfig, the
configurations of clangd still worked. So maybe what really broke the
configurations is mason-lspconfig, which uses a new way to enable lsp in
v2.
I rewrite the root_dir function and make it work both on 0.11 and 0.10.
It would check whether the first argument is a string to decide whether
to adapt the new interface.
To test whether it works, you can just add a plugin/clangd.lua to you
personal config with the content below:
```lua
return {
"neovim/nvim-lspconfig",
opts = {
servers = {
clangd = {
root_dir = function(bufnr, ondir)
local root_directory = function(fname)
return require("lspconfig.util").root_pattern(
"Makefile",
"configure.ac",
"configure.in",
"config.h.in",
"meson.build",
"meson_options.txt",
"build.ninja"
)(fname) or require("lspconfig.util").root_pattern("compile_commands.json", "compile_flags.txt")(
fname
) or require("lspconfig.util").find_git_ancestor(fname)
end
if type(bufnr) == "string" then
return root_directory(bufnr)
else
local fname = vim.api.nvim_buf_get_name(bufnr)
ondir(root_directory(fname))
end
end,
},
},
},
}
```
## Checklist
- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
## 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>
## Description
Seems like since the move of `neo-tree` into Extras, its plugin spec is
loaded after edgy's and that causes problems. Give `neo-tree` Extra
higher prio than edgy Extra.
<!-- Describe the big picture of your changes to communicate to the
maintainers
why we should accept this pull request. -->
## Related Issue(s)
Fixes#5762
<!--
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
Enable the `venv-selector` plugin even when the telescope plugin is not
available. Now the `venv-selector` plugin supports `fzf-lua` and native
selection, and by default, it chooses the previous, if available.
More on this PR:
https://github.com/linux-cultist/venv-selector.nvim/pull/188
Edit: Use the main branch of the repo since it is now the most updated
branch
## Related Issue(s)
None
## Screenshots
N/A
## Checklist
- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
## Description
Latest version of blink.cmp renamed the keymap.presets table which
breaks LazyVim's access to presets. This fixes it by using the
`presets.get()` method instead, which internally resolves to the correct
table and looks like the right API.
## Related Issue(s)
N/A
## Screenshots
N/A
## Checklist
- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
## Description
Following copilot.lua refactoring in
https://github.com/zbirenbaum/copilot.lua/pull/431, lualine is unable to
refresh.
We face the following error
```
Error 15:55:22 msg_show.lua_error Error executing vim.schedule lua callback: ...share/nvim/lazy/lualine.nvim/lua/lualine/utils/utils.lua:211: lualine: Failed to refresh statusline:
.../.local/share/nvim/lazy/lualine.nvim/lua/lualine.lua:415: Error executing lua: ...m/lazy/LazyVim/lua/lazyvim/plugins/extras/ai/copilot.lua:54: attempt to index field 'status' (a nil value)
stack traceback:
...m/lazy/LazyVim/lua/lazyvim/plugins/extras/ai/copilot.lua:54: in function 'status'
...cal/share/nvim/lazy/LazyVim/lua/lazyvim/util/lualine.lua:17: in function 'cond'
...l/share/nvim/lazy/lualine.nvim/lua/lualine/component.lua:275: in function 'draw'
...are/nvim/lazy/lualine.nvim/lua/lualine/utils/section.lua:26: in function 'draw_section'
.../.local/share/nvim/lazy/lualine.nvim/lua/lualine.lua:167: in function 'statusline'
.../.local/share/nvim/lazy/lualine.nvim/lua/lualine.lua:309: in function <...gaze/.local/share/nvim/lazy/lualine.nvim/lua/lualine.lua:290>
[C]: in function 'nvim_win_call'
.../.local/share/nvim/lazy/lualine.nvim/lua/lualine.lua:415: in function 'refresh'
.../.local/share/nvim/lazy/lualine.nvim/lua/lualine.lua:491: in function <.../.local/share/nvim/lazy/lualine.nvim/lua/lualine.lua:490>
[C]: in function 'pcall'
...share/nvim/lazy/lualine.nvim/lua/lualine/utils/utils.lua:214: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>
```
## Related Issue(s)
#5899
## Screenshots

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