LazyVim.LazyVim/lua/lazyvim/plugins
Tim Macfarlane 85e4118065
fix(lsp): don't leak keymaps from LSP server configs (#4849)
## Description

I found an issue where if I'm editing files of different types, say for
example `.cs` and `.py` files, they will naturally load the
corresponding LSPs for each language. However, if one of those LSPs has
keys defined in their `server` config section, then those key maps will
leak into the other, so in this case, the `gd` (go to definition)
mapping intended for `.cs` buffers is now present in `.py` buffers,
causing it not to work. This is currently the case with the `omnisharp`
LSP, as it defines a `gd` key map, see:
63150fa4c5/lua/lazyvim/plugins/extras/lang/omnisharp.lua (L53-L61)

The fix here is to shallow clone the "global" LSP keymaps before adding
the LSP server-specific keymaps so the LSP keymaps aren't added to the
global ones.

## Related Issue(s)

## Screenshots

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2024-11-25 14:59:55 +01:00
..
compat fix(extras): better reasons as to why some extras are included in your config. 2024-06-14 11:14:00 +02:00
extras fix(java): minisurround jdtls keybind conflict (#4886) 2024-11-25 14:57:17 +01:00
lsp fix(lsp): don't leak keymaps from LSP server configs (#4849) 2024-11-25 14:59:55 +01:00
coding.lua fix(lazydev): use luals' bundled luv library 2024-11-24 23:03:03 +01:00
colorscheme.lua feat(colorscheme): enable catppuccin snacks integration by default (#4882) 2024-11-24 17:28:26 +01:00
editor.lua feat(core)!: move a bunch of LazyVim features to snacks.nvim (#4706) 2024-11-07 15:54:47 +01:00
formatting.lua fix(conform): changes for new conform.nvim config 2024-07-20 17:14:07 +02:00
init.lua fix(snacks): make sure early notifications show up in noice 2024-11-19 09:03:00 +01:00
linting.lua fix(lint): make prepend_args opt work when default args is empty (#3828) 2024-06-27 17:31:11 +02:00
treesitter.lua feat(keymaps): dynamic which-key icons/descriptions for toggles (#4050) 2024-07-15 15:47:44 +02:00
ui.lua fix(snacks): alignment of header 2024-11-19 09:35:42 +01:00
util.lua feat(persistence): added leader-qS to select a session 2024-08-31 09:27:14 +02:00
xtras.lua feat(vscode): automatically enable the vscode extra when running in vscode 2024-11-16 07:35:47 +01:00