summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris <[email protected]>2020-05-09 00:36:34 -0400
committerChris <[email protected]>2020-05-09 00:36:34 -0400
commit481d63b57e524553e6cb2624288afb160e359db7 (patch)
tree78c24f383835f9007346ea2db03ca1046a259a30
parent86bb86e4f111e4353a1ac14ac3cf2844391ee8b1 (diff)
beginning which key
-rw-r--r--general/settings.vim2
-rw-r--r--init.vim1
-rw-r--r--keys/mappings.vim4
-rw-r--r--keys/which-key.vim23
-rw-r--r--plug-config/start-screen.vim8
5 files changed, 32 insertions, 6 deletions
diff --git a/general/settings.vim b/general/settings.vim
index 49c5136f..c2f89897 100644
--- a/general/settings.vim
+++ b/general/settings.vim
@@ -1,8 +1,6 @@
" set leader key
"map <Space> <Leader>
"nmap <space> <leader>
-let mapleader=" "
-nnoremap <Space> <Nop>
set iskeyword+=- " treat dash separated words as a word text object"
if !exists('g:vscode')
diff --git a/init.vim b/init.vim
index bc7fa41f..74ceb135 100644
--- a/init.vim
+++ b/init.vim
@@ -9,6 +9,7 @@
source $HOME/.config/nvim/vim-plug/plugins.vim
source $HOME/.config/nvim/general/settings.vim
source $HOME/.config/nvim/keys/mappings.vim
+source $HOME/.config/nvim/keys/which-key.vim
source $HOME/.config/nvim/general/paths.vim
" Source depending on if VSCode is our client
diff --git a/keys/mappings.vim b/keys/mappings.vim
index 71776b08..79311e5f 100644
--- a/keys/mappings.vim
+++ b/keys/mappings.vim
@@ -1,3 +1,7 @@
+" Leader key
+let mapleader=" "
+let localleader=" "
+nnoremap <Space> <Nop>
" Better indenting
vnoremap < <gv
diff --git a/keys/which-key.vim b/keys/which-key.vim
new file mode 100644
index 00000000..2cf2e48e
--- /dev/null
+++ b/keys/which-key.vim
@@ -0,0 +1,23 @@
+" map leader to which_key
+" call which_key#register('<Space>', "g:which_key_map")
+
+nnoremap <silent> <leader> :silent WhichKey ' '<CR>
+
+" Not a fan of floating windows for this
+let g:which_key_use_floating_win = 0
+
+" highlight default link WhichKey Function
+" highlight default link WhichKeySeperator DiffAdded
+" highlight default link WhichKeyGroup Keyword
+" highlight default link WhichKeyDesc Identifier
+
+highlight default link WhichKey Operator
+highlight default link WhichKeySeperator DiffAdded
+highlight default link WhichKeyGroup Identifier
+highlight default link WhichKeyDesc Function
+
+" Hide status line
+autocmd! FileType which_key
+autocmd FileType which_key set laststatus=0 noshowmode noruler
+ \| autocmd BufLeave <buffer> set laststatus=2 noshowmode ruler
+
diff --git a/plug-config/start-screen.vim b/plug-config/start-screen.vim
index eb2d5bd7..8024fa16 100644
--- a/plug-config/start-screen.vim
+++ b/plug-config/start-screen.vim
@@ -1,9 +1,9 @@
let g:startify_custom_header = [
- \ ' _ __ _ __ ___ __ ___ ',
- \ ' / |/ / __(_)_ _ / |/ /__ _____/ / |_ |',
- \ ' / / |/ / / ` \ / /|_/ / _ `/ __/ _ \ / __/ ',
- \ '/_/|_/|___/_/_/_/_/ /_/ /_/\_,_/\__/_//_/ /____/ ',
+ \ ' _ __ _ __ ___ __ ___ ',
+ \ ' / |/ / __(_)_ _ / |/ /__ _____/ / |_ |',
+ \ ' / / |/ / / ` \ / /|_/ / _ `/ __/ _ \ / __/ ',
+ \ ' /_/|_/|___/_/_/_/_/ /_/ /_/\_,_/\__/_//_/ /____/ ',
\]
let g:startify_session_dir = '~/.config/nvim/session'