From 190348d62cc13637f3b9f756ca18be9f002c65d2 Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Sat, 16 Apr 2022 13:07:21 -0400 Subject: [PATCH] nvim: modularize which-key as well --- home/neovim.nix | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/home/neovim.nix b/home/neovim.nix index bd864bb..ce4ccb3 100644 --- a/home/neovim.nix +++ b/home/neovim.nix @@ -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 + let g:mapleader = "\" + let g:maplocalleader = ',' + nnoremap :WhichKey '' + nnoremap :WhichKey ',' + ]]) + ''; + } + # 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 - let g:mapleader = "\" - let g:maplocalleader = ',' - nnoremap :WhichKey '' - nnoremap :WhichKey ',' - lua << EOF ${builtins.readFile ./neovim.lua} EOF