diff --git a/nvim/init.lua b/nvim/init.lua index 58bef99b..1197264d 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -120,7 +120,6 @@ set.sidescrolloff = 5 set.smartcase = true set.splitright = true set.splitbelow = true -set.timeoutlen = 300 set.updatetime = 300 set.virtualedit = 'all' set.visualbell = true diff --git a/nvim/lua/plugins/which-key.lua b/nvim/lua/plugins/which-key.lua index 19f50eb7..f5c12297 100644 --- a/nvim/lua/plugins/which-key.lua +++ b/nvim/lua/plugins/which-key.lua @@ -1,5 +1,8 @@ local wk = require('which-key') +vim.opt.timeout = true +vim.opt.timeoutlen = 500 + wk.register({ ['-'] = { 'FloatermNew nnn', 'invoke floaterm with nnn as file picker' }, [';'] = { ':', 'Colon with semicolon' }, @@ -14,6 +17,7 @@ wk.register({ ['¬'] = { '>>', 'bubbling lines with alt-hjkl', noremap = false }, g = { + name = 'code-related mappings', a = { 'lua vim.lsp.buf.code_action()', 'run code action' }, b = { 'Gitsigns blame_line', 'git blame line' }, d = { 'lua vim.lsp.buf.definition()', 'show/go to definition' }, @@ -65,6 +69,7 @@ wk.register({ l = { 'FloatermNew lazygit', 'open lazygit' }, t = { 'FloatermNew', 'open new terminal' }, v = { + name = 'vim related', e = { 'e $MYVIMRC', 'edit vimrc' }, r = { 'source $MYVIMRC', 'source vimrc' }, },