diff --git a/init.lua b/init.lua index 77a2d18a..de8e602e 100644 --- a/init.lua +++ b/init.lua @@ -282,20 +282,24 @@ require('lazy').setup({ config = function() -- This is the function that runs, AFTER loading 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' }, + local wk = require 'which-key' + wk.add { + { 'c', group = '[C]ode' }, + { 'c_', hidden = true }, + { 'd', group = '[D]ocument' }, + { 'd_', hidden = true }, + { 'h', group = 'Git [H]unk' }, + { 'h_', hidden = true }, + { 'r', group = '[R]ename' }, + { 'r_', hidden = true }, + { 's', group = '[S]earch' }, + { 's_', hidden = true }, + { 't', group = '[T]oggle' }, + { 't_', hidden = true }, + { 'w', group = '[W]orkspace' }, + { 'w_', hidden = true }, + { 'h', desc = 'Git [H]unk', mode = 'v' }, } - -- visual mode - require('which-key').register({ - ['h'] = { 'Git [H]unk' }, - }, { mode = 'v' }) end, }, @@ -838,7 +842,7 @@ require('lazy').setup({ 'nvim-treesitter/nvim-treesitter', build = ':TSUpdate', opts = { - ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'vim', 'vimdoc' }, + ensure_installed = { 'bash', 'c', 'diff', 'groovy', 'html', 'lua', 'luadoc', 'markdown', 'python', 'terraform', 'vim', 'vimdoc' }, -- Autoinstall languages that are not installed auto_install = true, highlight = { diff --git a/lua/custom/plugins/neogit.lua b/lua/custom/plugins/neogit.lua index 5bab2622..7037297b 100644 --- a/lua/custom/plugins/neogit.lua +++ b/lua/custom/plugins/neogit.lua @@ -7,6 +7,7 @@ return { 'sindrets/diffview.nvim', 'nvim-telescope/telescope.nvim', }, + lazy = true, keys = { { 'ng', ':Neogit cwd=%:p:h', desc = 'Open neogit repository for current buffer' }, }, diff --git a/lua/custom/plugins/telescope-file-browser.lua b/lua/custom/plugins/telescope-file-browser.lua index f18381da..acc5f181 100644 --- a/lua/custom/plugins/telescope-file-browser.lua +++ b/lua/custom/plugins/telescope-file-browser.lua @@ -2,6 +2,7 @@ return { { 'nvim-telescope/telescope-file-browser.nvim', dependencies = { 'nvim-telescope/telescope.nvim', 'nvim-lua/plenary.nvim' }, + lazy = true, keys = { { 'fb', 'Telescope file_browser path=%:p:h select_buffer=true', desc = 'Open Telescope file browser in directory of current buffer' }, },