fix the whichkey new version
This commit is contained in:
parent
2c166c6c62
commit
82c18c9988
44
init.lua
44
init.lua
|
@ -5,7 +5,7 @@ vim.g.mapleader = ' '
|
|||
vim.g.maplocalleader = ' '
|
||||
|
||||
-- Set to true if you have a Nerd Font installed and selected in the terminal
|
||||
vim.g.have_nerd_font = false
|
||||
vim.g.have_nerd_font = true
|
||||
|
||||
-- [[ Setting options ]]
|
||||
-- See `:help vim.opt`
|
||||
|
@ -13,10 +13,10 @@ vim.g.have_nerd_font = false
|
|||
-- For more options, you can see `:help option-list`
|
||||
|
||||
-- Make line numbers default
|
||||
vim.opt.number = true
|
||||
-- vim.opt.number = true
|
||||
-- You can also add relative line numbers, to help with jumping.
|
||||
-- Experiment for yourself to see if you like it!
|
||||
-- vim.opt.relativenumber = true
|
||||
vim.opt.relativenumber = true
|
||||
|
||||
-- Enable mouse mode, can be useful for resizing splits for example!
|
||||
vim.opt.mouse = 'a'
|
||||
|
@ -139,6 +139,7 @@ vim.opt.rtp:prepend(lazypath)
|
|||
--
|
||||
-- NOTE: Here is where you install your plugins.
|
||||
require('lazy').setup({
|
||||
{ 'catppuccin/nvim', name = 'catppuccin', priority = 1000 },
|
||||
{
|
||||
'zbirenbaum/copilot.lua',
|
||||
cmd = 'Copilot',
|
||||
|
@ -244,20 +245,26 @@ 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 {
|
||||
['<leader>c'] = { name = '[C]ode', _ = 'which_key_ignore' },
|
||||
['<leader>d'] = { name = '[D]ocument', _ = 'which_key_ignore' },
|
||||
['<leader>r'] = { name = '[R]ename', _ = 'which_key_ignore' },
|
||||
['<leader>s'] = { name = '[S]earch', _ = 'which_key_ignore' },
|
||||
['<leader>w'] = { name = '[W]orkspace', _ = 'which_key_ignore' },
|
||||
['<leader>t'] = { name = '[T]oggle', _ = 'which_key_ignore' },
|
||||
['<leader>h'] = { name = 'Git [H]unk', _ = 'which_key_ignore' },
|
||||
require('which-key').add {
|
||||
{ '<leader>c', group = '[C]ode' },
|
||||
{ '<leader>c_', hidden = true },
|
||||
{ '<leader>d', group = '[D]ocument' },
|
||||
{ '<leader>d_', hidden = true },
|
||||
{ '<leader>h', group = 'Git [H]unk' },
|
||||
{ '<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 },
|
||||
}
|
||||
|
||||
require('which-key').add {
|
||||
{ '<leader>h', group = 'Git [H]unk', mode = 'v' },
|
||||
}
|
||||
-- visual mode
|
||||
require('which-key').register({
|
||||
['<leader>h'] = { 'Git [H]unk' },
|
||||
}, { mode = 'v' })
|
||||
end,
|
||||
},
|
||||
|
||||
|
@ -730,7 +737,7 @@ require('lazy').setup({
|
|||
-- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps
|
||||
},
|
||||
sources = {
|
||||
{ name = 'copilot', group_index = 2 },
|
||||
{ name = 'copilot' },
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'luasnip' },
|
||||
{ name = 'path' },
|
||||
|
@ -750,7 +757,8 @@ require('lazy').setup({
|
|||
-- Load the colorscheme here.
|
||||
-- Like many other themes, this one has different styles, and you could load
|
||||
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
|
||||
vim.cmd.colorscheme 'tokyonight-night'
|
||||
-- vim.cmd.colorscheme 'tokyonight-night'
|
||||
vim.cmd.colorscheme 'catppuccin-frappe'
|
||||
|
||||
-- You can configure highlights by doing something like:
|
||||
vim.cmd.hi 'Comment gui=none'
|
||||
|
|
Loading…
Reference in New Issue