mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-23 17:28:57 +02:00
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.
This commit is contained in:
parent
75750be1c0
commit
2f4697443c
29 changed files with 277 additions and 1066 deletions
|
@ -129,8 +129,6 @@ return {
|
|||
LazyVim.lsp.setup()
|
||||
LazyVim.lsp.on_dynamic_capability(require("lazyvim.plugins.lsp.keymaps").on_attach)
|
||||
|
||||
LazyVim.lsp.words.setup(opts.document_highlight)
|
||||
|
||||
-- diagnostics signs
|
||||
if vim.fn.has("nvim-0.10.0") == 0 then
|
||||
if type(opts.diagnostics.signs) ~= "boolean" then
|
||||
|
|
|
@ -25,17 +25,17 @@ function M.get()
|
|||
{ "<leader>ca", vim.lsp.buf.code_action, desc = "Code Action", mode = { "n", "v" }, has = "codeAction" },
|
||||
{ "<leader>cc", vim.lsp.codelens.run, desc = "Run Codelens", mode = { "n", "v" }, has = "codeLens" },
|
||||
{ "<leader>cC", vim.lsp.codelens.refresh, desc = "Refresh & Display Codelens", mode = { "n" }, has = "codeLens" },
|
||||
{ "<leader>cR", LazyVim.lsp.rename_file, desc = "Rename File", mode ={"n"}, has = { "workspace/didRenameFiles", "workspace/willRenameFiles" } },
|
||||
{ "<leader>cR", function() Snacks.rename.rename_file() end, desc = "Rename File", mode ={"n"}, has = { "workspace/didRenameFiles", "workspace/willRenameFiles" } },
|
||||
{ "<leader>cr", vim.lsp.buf.rename, desc = "Rename", has = "rename" },
|
||||
{ "<leader>cA", LazyVim.lsp.action.source, desc = "Source Action", has = "codeAction" },
|
||||
{ "]]", function() LazyVim.lsp.words.jump(vim.v.count1) end, has = "documentHighlight",
|
||||
desc = "Next Reference", cond = function() return LazyVim.lsp.words.enabled end },
|
||||
{ "[[", function() LazyVim.lsp.words.jump(-vim.v.count1) end, has = "documentHighlight",
|
||||
desc = "Prev Reference", cond = function() return LazyVim.lsp.words.enabled end },
|
||||
{ "<a-n>", function() LazyVim.lsp.words.jump(vim.v.count1, true) end, has = "documentHighlight",
|
||||
desc = "Next Reference", cond = function() return LazyVim.lsp.words.enabled end },
|
||||
{ "<a-p>", function() LazyVim.lsp.words.jump(-vim.v.count1, true) end, has = "documentHighlight",
|
||||
desc = "Prev Reference", cond = function() return LazyVim.lsp.words.enabled end },
|
||||
{ "]]", function() Snacks.words.jump(vim.v.count1) end, has = "documentHighlight",
|
||||
desc = "Next Reference", cond = function() return Snacks.words.is_enabled() end },
|
||||
{ "[[", function() Snacks.words.jump(-vim.v.count1) end, has = "documentHighlight",
|
||||
desc = "Prev Reference", cond = function() return Snacks.words.is_enabled() end },
|
||||
{ "<a-n>", function() Snacks.words.jump(vim.v.count1, true) end, has = "documentHighlight",
|
||||
desc = "Next Reference", cond = function() return Snacks.words.is_enabled() end },
|
||||
{ "<a-p>", function() Snacks.words.jump(-vim.v.count1, true) end, has = "documentHighlight",
|
||||
desc = "Prev Reference", cond = function() return Snacks.words.is_enabled() end },
|
||||
}
|
||||
|
||||
return M._keys
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue