From 9385de25d149877b11f8b6c7823878e1a3351a99 Mon Sep 17 00:00:00 2001 From: Imbus <> Date: Sun, 14 Jul 2024 01:14:05 +0200 Subject: [PATCH 1/3] New which-key api --- init.lua | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/init.lua b/init.lua index 0720a6a..ace4e15 100644 --- a/init.lua +++ b/init.lua @@ -214,19 +214,17 @@ require('lazy').setup({ require('which-key').setup() -- Document existing key chains - require('which-key').register { - ['c'] = { name = '[C]ode', _ = 'which_key_ignore' }, - ['d'] = { name = '[D]ocument', _ = 'which_key_ignore' }, - ['r'] = { name = '[R]ename', _ = 'which_key_ignore' }, - ['s'] = { name = '[S]earch', _ = 'which_key_ignore' }, - ['w'] = { name = '[W]orkspace', _ = 'which_key_ignore' }, - ['t'] = { name = '[T]oggle', _ = 'which_key_ignore' }, - ['h'] = { name = 'Git [H]unk', _ = 'which_key_ignore' }, + require('which-key').add { + { + { 'c', group = '[C]ode' }, + { 'd', group = '[D]ocument' }, + { 'r', group = '[R]ename' }, + { 's', group = '[S]earch' }, + { 'w', group = '[W]orkspace' }, + { 't', group = '[T]oggle' }, + { 'h', group = 'Git [H]unk', mode = { 'n', 'v' } }, + }, } - -- visual mode - require('which-key').register({ - ['h'] = { 'Git [H]unk' }, - }, { mode = 'v' }) end, }, From 3bc5d56e9476ae0605a29e2cc1a707b5e49f97ca Mon Sep 17 00:00:00 2001 From: Imbus <> Date: Sun, 14 Jul 2024 01:14:57 +0200 Subject: [PATCH 2/3] neodev -> lazydev --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index ace4e15..30262ae 100644 --- a/init.lua +++ b/init.lua @@ -354,7 +354,7 @@ require('lazy').setup({ -- `neodev` configures Lua LSP for your Neovim config, runtime and plugins -- used for completion, annotations and signatures of Neovim apis - { 'folke/neodev.nvim', opts = {} }, + { 'folke/lazydev.nvim', opts = {} }, }, config = function() -- Brief aside: **What is LSP?** From ed72526d26512168cec114d9c265839c36b79cbf Mon Sep 17 00:00:00 2001 From: Imbus <> Date: Sun, 14 Jul 2024 01:15:05 +0200 Subject: [PATCH 3/3] ZLS added --- init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/init.lua b/init.lua index 30262ae..88e11af 100644 --- a/init.lua +++ b/init.lua @@ -501,6 +501,7 @@ require('lazy').setup({ gopls = {}, pyright = {}, rust_analyzer = {}, + zls = {}, -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs -- -- Some languages (like typescript) have entire language plugins that can be useful: