refactor(nvim): keybinding mess

This commit is contained in:
Moritz Böhme 2023-10-28 15:18:59 +02:00
parent 8bc546daf0
commit 528098839d
No known key found for this signature in database
GPG key ID: 970C6E89EB0547A9
4 changed files with 30 additions and 56 deletions

View file

@ -5,8 +5,6 @@ null_ls.setup({
-- Code actions
null_ls.builtins.code_actions.shellcheck,
null_ls.builtins.code_actions.statix,
-- Completion
null_ls.builtins.completion.spell,
-- Diagnostics
null_ls.builtins.diagnostics.checkmake,
null_ls.builtins.diagnostics.deadnix,
@ -19,19 +17,3 @@ null_ls.setup({
null_ls.builtins.diagnostics.yamllint,
},
})
-- disable (c)spell initially
null_ls.disable("spell")
-- make sources toggle able
require("which-key").register({
n = {
name = "null-ls",
s = {
function()
null_ls.toggle("spell")
end,
"spell",
},
},
}, { prefix = "<leader>t" })

View file

@ -32,9 +32,8 @@ local on_attach_def = function(client, bufnr)
"Hover",
},
["<leader>"] = {
l = {
name = "lsp",
d = { vim.diagnostic.open_float, "Open diagnostic window" },
c = {
name = "code",
c = { require("actions-preview").code_actions, "Code action", mode = { "v", "n" } },
r = {
function()

View file

@ -35,11 +35,9 @@ require("which-key").register({
["<leader>"] = {
f = { name = "file/find" },
g = { name = "git" },
l = { name = "lsp" },
o = { name = "org" },
c = { name = "code" },
s = { name = "search" },
t = { name = "toggle" },
x = { name = "diagnostics/quickfix" },
},
["["] = { name = "prev" },
["]"] = { name = "next" },