ugly: fix which-keys
warnings
This commit is contained in:
parent
32371d317f
commit
0e6b7e2558
34
lua/lsp.lua
34
lua/lsp.lua
@ -43,22 +43,30 @@ local on_attach = function(_, bufnr)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- document existing key chains
|
-- document existing key chains
|
||||||
require('which-key').register {
|
require('which-key').add {
|
||||||
['<leader>c'] = { name = '[C]ode', _ = 'which_key_ignore' },
|
{ "<leader>c", group = "[C]ode" },
|
||||||
['<leader>d'] = { name = '[D]ocument', _ = 'which_key_ignore' },
|
{ "<leader>c_", hidden = true },
|
||||||
['<leader>g'] = { name = '[G]it', _ = 'which_key_ignore' },
|
{ "<leader>d", group = "[D]ocument" },
|
||||||
['<leader>h'] = { name = 'Git [H]unk', _ = 'which_key_ignore' },
|
{ "<leader>d_", hidden = true },
|
||||||
['<leader>r'] = { name = '[R]ename', _ = 'which_key_ignore' },
|
{ "<leader>g", group = "[G]it" },
|
||||||
['<leader>s'] = { name = '[S]earch', _ = 'which_key_ignore' },
|
{ "<leader>g_", hidden = true },
|
||||||
['<leader>t'] = { name = '[T]oggle', _ = 'which_key_ignore' },
|
{ "<leader>h", group = "Git [H]unk" },
|
||||||
['<leader>w'] = { name = '[W]orkspace', _ = 'which_key_ignore' },
|
{ "<leader>h_", hidden = true },
|
||||||
|
{ "<leader>r", group = "[R]ename" },
|
||||||
|
{ "<leader>r_", hidden = true },
|
||||||
|
{ "<leader>s", group = "[S]earch" },
|
||||||
|
{ "<leader>s_", hidden = true },
|
||||||
|
{ "<leader>t", group = "[T]oggle" },
|
||||||
|
{ "<leader>t_", hidden = true },
|
||||||
|
{ "<leader>w", group = "[W]orkspace" },
|
||||||
|
{ "<leader>w_", hidden = true },
|
||||||
}
|
}
|
||||||
-- register which-key VISUAL mode
|
-- register which-key VISUAL mode
|
||||||
-- required for visual <leader>hs (hunk stage) to work
|
-- required for visual <leader>hs (hunk stage) to work
|
||||||
require('which-key').register({
|
require('which-key').add {
|
||||||
['<leader>'] = { name = 'VISUAL <leader>' },
|
{ "<leader>", group = "VISUAL <leader>", mode = "v" },
|
||||||
['<leader>h'] = { 'Git [H]unk' },
|
{ "<leader>h", desc = "Git [H]unk", mode = "v" },
|
||||||
}, { mode = 'v' })
|
}
|
||||||
|
|
||||||
-- mason-lspconfig requires that these setup functions are called in this order
|
-- mason-lspconfig requires that these setup functions are called in this order
|
||||||
-- before setting up the servers.
|
-- before setting up the servers.
|
||||||
|
@ -14,11 +14,15 @@ vim.api.nvim_create_autocmd({ "FileType" }, {
|
|||||||
})
|
})
|
||||||
|
|
||||||
-- document existing key chains
|
-- document existing key chains
|
||||||
require('which-key').register {
|
require('which-key').add {
|
||||||
['<leader>n'] = { name = '[N]eorg', _ = 'which_key_ignore' },
|
{ "<leader>l", group = "neorg [L]ist" },
|
||||||
['<leader>m'] = { name = 'neorg [M]ode', _ = 'which_key_ignore' },
|
{ "<leader>l_", hidden = true },
|
||||||
['<leader>l'] = { name = 'neorg [L]ist', _ = 'which_key_ignore' },
|
{ "<leader>m", group = "neorg [M]ode" },
|
||||||
['<leader>ne'] = { name = '[N]eorg [E]xport', _ = 'which_key_ignore' },
|
{ "<leader>m_", hidden = true },
|
||||||
|
{ "<leader>n", group = "[N]eorg" },
|
||||||
|
{ "<leader>n_", hidden = true },
|
||||||
|
{ "<leader>ne", group = "[N]eorg [E]xport" },
|
||||||
|
{ "<leader>ne_", hidden = true },
|
||||||
}
|
}
|
||||||
|
|
||||||
vim.api.nvim_set_keymap("n", "<Leader>ni", ":Neorg index<CR>",
|
vim.api.nvim_set_keymap("n", "<Leader>ni", ":Neorg index<CR>",
|
||||||
|
@ -87,4 +87,7 @@ local options = {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-- XXX: temporary until upgrading the deprecated configuration above…
|
||||||
|
options = {}
|
||||||
|
|
||||||
return options
|
return options
|
||||||
|
Loading…
Reference in New Issue
Block a user