mirror of
https://github.com/srid/nixos-config.git
synced 2026-01-07 00:17:24 +08:00
nvim: modularize which-key as well
This commit is contained in:
parent
7e5668a40b
commit
190348d62c
1 changed files with 19 additions and 13 deletions
|
|
@ -41,6 +41,23 @@
|
|||
tokyonight-nvim
|
||||
|
||||
# Doom-emacs like experience
|
||||
{
|
||||
plugin = vim-which-key;
|
||||
type = "lua";
|
||||
# TODO: How to port this to Lua?
|
||||
config = ''
|
||||
vim.cmd([[
|
||||
map <Space> <Leader>
|
||||
let g:mapleader = "\<Space>"
|
||||
let g:maplocalleader = ','
|
||||
nnoremap <silent> <leader> :<c-u>WhichKey '<Space>'<CR>
|
||||
nnoremap <silent> <localleader> :<c-u>WhichKey ','<CR>
|
||||
]])
|
||||
'';
|
||||
}
|
||||
# TODO: Don't know how to configure this correctly
|
||||
# nvim-whichkey-setup-lua
|
||||
|
||||
{
|
||||
plugin = telescope-nvim;
|
||||
type = "lua";
|
||||
|
|
@ -70,10 +87,6 @@
|
|||
'';
|
||||
}
|
||||
|
||||
vim-which-key
|
||||
# TODO: Don't know how to configure this correctly
|
||||
# nvim-whichkey-setup-lua
|
||||
|
||||
# Buffer tabs
|
||||
{
|
||||
plugin = bufferline-nvim;
|
||||
|
|
@ -96,16 +109,9 @@
|
|||
vim-markdown
|
||||
];
|
||||
|
||||
# Note: Lua based config is in ./neovim.lua
|
||||
# Add library code here for use in the Lua config from the
|
||||
# plugins list above.
|
||||
extraConfig = ''
|
||||
" which-key
|
||||
" TODO: How to port this to Lua?
|
||||
map <Space> <Leader>
|
||||
let g:mapleader = "\<Space>"
|
||||
let g:maplocalleader = ','
|
||||
nnoremap <silent> <leader> :<c-u>WhichKey '<Space>'<CR>
|
||||
nnoremap <silent> <localleader> :<c-u>WhichKey ','<CR>
|
||||
|
||||
lua << EOF
|
||||
${builtins.readFile ./neovim.lua}
|
||||
EOF
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue