mirror of
https://github.com/elkowar/dots-of-war.git
synced 2024-12-25 05:42:22 +00:00
config nvim with fennel??
This commit is contained in:
parent
a23e8836f3
commit
8288adf664
7 changed files with 276 additions and 87 deletions
83
fnl/init.fnl
Normal file
83
fnl/init.fnl
Normal file
|
@ -0,0 +1,83 @@
|
||||||
|
|
||||||
|
(module init
|
||||||
|
{require {a aniseed.core
|
||||||
|
nvim aniseed.nvim}
|
||||||
|
require-macros [macros]
|
||||||
|
include {keybinds keybinds}})
|
||||||
|
|
||||||
|
(set nvim.g.conjure#client#fennel#aniseed#aniseed_module_prefix "aniseed.")
|
||||||
|
|
||||||
|
|
||||||
|
(local lsp (require "lspconfig"))
|
||||||
|
(local util lsp.util)
|
||||||
|
(local saga (require "lspsaga"))
|
||||||
|
(local compe (require "compe"))
|
||||||
|
|
||||||
|
|
||||||
|
(fn on_attach [client bufnr]
|
||||||
|
(if client.resolved_capabilities.document_highlight
|
||||||
|
(nvim.api.nvim_exec
|
||||||
|
"hi LspReferenceRead cterm=bold ctermbg=red guibg='#8ec07c' guifg='#282828'
|
||||||
|
hi LspReferenceText cterm=bold ctermbg=red guibg='#8ec07c' guifg='#282828'
|
||||||
|
hi LspReferenceWrite cterm=bold ctermbg=red guibg='#8ec07c' guifg='#282828'
|
||||||
|
augroup lsp_document_highlight
|
||||||
|
autocmd! * <buffer>
|
||||||
|
autocmd CursorHold <buffer> lua vim.lsp.buf.document_highlight()
|
||||||
|
autocmd CursorMoved <buffer> lua vim.lsp.buf.clear_references()
|
||||||
|
augroup END
|
||||||
|
"
|
||||||
|
false)))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
(lsp.rust_analyzer.setup { :on_attach on_attach})
|
||||||
|
(lsp.jsonls.setup { :on_attach on_attach})
|
||||||
|
(lsp.vimls.setup { :on_attach on_attach})
|
||||||
|
(lsp.tsserver.setup { :on_attach on_attach})
|
||||||
|
(lsp.bashls.setup { :on_attach on_attach})
|
||||||
|
(lsp.html.setup { :on_attach on_attach})
|
||||||
|
|
||||||
|
(lsp.denols.setup
|
||||||
|
{ :on_attach on_attach
|
||||||
|
:root_dir (lsp.util.root_pattern ".git")})
|
||||||
|
(lsp.hls.setup
|
||||||
|
{ :on_attach on_attach
|
||||||
|
:settings { :languageServerHaskell { :formattingProvider "stylish-haskell"}}})
|
||||||
|
|
||||||
|
|
||||||
|
(compe.setup
|
||||||
|
{ :enabled true
|
||||||
|
:autocomplete true
|
||||||
|
:debug false
|
||||||
|
:min_length 1
|
||||||
|
:preselect "enable"
|
||||||
|
:throttle_time 80
|
||||||
|
:source_timeout 200
|
||||||
|
:incomplete_delay 400
|
||||||
|
:max_abbr_width 100
|
||||||
|
:max_kind_width 100
|
||||||
|
:max_menu_width 100
|
||||||
|
:documentation true
|
||||||
|
:source { :path true
|
||||||
|
:buffer true
|
||||||
|
:calc true
|
||||||
|
:nvim_lsp true
|
||||||
|
:nvim_lua true
|
||||||
|
:vsnip false}})
|
||||||
|
|
||||||
|
|
||||||
|
(saga.init_lsp_saga
|
||||||
|
{ :border_style 1
|
||||||
|
:code_action_keys { :quit "<esc>" :exec "<CR>"}
|
||||||
|
:rename_action_keys { :quit "<esc>" :exec "<CR>"}
|
||||||
|
:finder_action_keys
|
||||||
|
{ :quit "<esc>"
|
||||||
|
:open "<CR>"
|
||||||
|
:vsplit "v"
|
||||||
|
:split "b"
|
||||||
|
:scroll_up "<C-u>"
|
||||||
|
:scroll_down "<C-d>"}})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
78
fnl/keybinds.fnl
Normal file
78
fnl/keybinds.fnl
Normal file
|
@ -0,0 +1,78 @@
|
||||||
|
(module keybinds
|
||||||
|
{require {a aniseed.core
|
||||||
|
nvim aniseed.nvim
|
||||||
|
util util}
|
||||||
|
require-macros [macros]})
|
||||||
|
|
||||||
|
|
||||||
|
(util.noremap :n :<leader> ":<c-u>WhichKey '<Space>'<CR>")
|
||||||
|
(util.noremap :v :<leader> ":<c-u>WhichKeyVisual '<Space>'<CR>")
|
||||||
|
|
||||||
|
|
||||||
|
(util.mapexpr :i :<C-Space> "compe#complete()")
|
||||||
|
(util.mapexpr :i :<CR> "compe#confirm('<CR>')")
|
||||||
|
(util.mapexpr :i :<esc> "compe#complete('<esc>')")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
(fn le [s] (.. ":call luaeval \"" s "\")"))
|
||||||
|
|
||||||
|
(set nvim.g.which_key_map {})
|
||||||
|
(nvim.command "call which_key#register('<Space>', \"g:which_key_map\")")
|
||||||
|
|
||||||
|
(set nvim.g.which_key_map
|
||||||
|
{ "h" [ ":bprevious" "previous buffer"]
|
||||||
|
"l" [ ":bnext" "next buffer"]
|
||||||
|
"f" "which_key_ignore"
|
||||||
|
"s" "which_key_ignore"
|
||||||
|
"[" ["<Plug>(YoinkPostPasteSwapBack)" "Swap last paste backwards"]
|
||||||
|
"]" ["<Plug>(YoinkPostPasteSwapForward)" "Swap last paste backwards"]
|
||||||
|
":" [":Commands" "Search command with fzf"]
|
||||||
|
"c" { :name "+comment_out"}
|
||||||
|
"e" { :name "+emmet"}
|
||||||
|
|
||||||
|
"z" { :name "+folds"
|
||||||
|
"c" ["foldclose" "close fold"]
|
||||||
|
"o" ["foldopen" "open fold"]}
|
||||||
|
|
||||||
|
"m" { :name "+Code-actions"
|
||||||
|
"d" [ ":Lspsaga hover_doc" "show documentation"]
|
||||||
|
"b" [ ":Lspsaga lsp_finder" "find stuff"]
|
||||||
|
"x" [ ":Lspsaga preview_definition" "Preview definition"]
|
||||||
|
"o" [ ":Telescope lsp_document_symbols" "symbols in document"]
|
||||||
|
"s" [ ":Telescope lsp_workspace_symbols" "symbols in workspace"]
|
||||||
|
"t" [ ":Lspsaga signature_help" "Show signature help"]
|
||||||
|
"n" [ ":Lspsaga rename" "rename"]
|
||||||
|
"v" [ ":Lspsaga code_action" "apply codeaction"]
|
||||||
|
"a" [ ":Lspsaga show_cursor_diagnostics" "Cursor diagnostics"]
|
||||||
|
"A" [ ":Lspsaga show_line_diagnostics" "Line diagnostics"]
|
||||||
|
"E" [ ":Telescope lsp_workspace_diagnostics" "List diagnostics"]
|
||||||
|
"e" [ (le "vim.lsp.diagnostic.goto_next()") "Jump to the next error"]
|
||||||
|
"g" [ (le "vim.lsp.buf.definition()") "go to definition"]
|
||||||
|
"i" [ (le "vim.lsp.buf.implementation()") "show implementation"]
|
||||||
|
"r" [ (le "vim.lsp.buf.references()") "show references"]
|
||||||
|
"f" [ (le "vim.lsp.buf.formatting()") "format file"]}
|
||||||
|
|
||||||
|
|
||||||
|
"f" { :name "+folds"
|
||||||
|
"o" [ ":foldopen" "open fold"]
|
||||||
|
"n" [ ":foldclose" "close fold"]
|
||||||
|
"j" [ "zj" "jump to next fold"]
|
||||||
|
"k" [ "zk" "jump to previous fold"]}
|
||||||
|
|
||||||
|
"v" { :name "+view-and-layout"
|
||||||
|
"n" [":set relativenumber!" "toggle relative numbers"]
|
||||||
|
"m" [":set nonumber! norelativenumber" "toggle numbers"]
|
||||||
|
"g" [":Goyo | set linebreak" "toggle focus mode"]
|
||||||
|
"i" [":IndentGuidesToggle" "toggle indent guides"]}})
|
||||||
|
|
||||||
|
(set nvim.o.timeoutlen 200)
|
||||||
|
|
||||||
|
; TODO
|
||||||
|
; autocmd! VimEnter * :unmap <space>ig
|
||||||
|
; autocmd! FileType which_key)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
19
fnl/macros.fnl
Normal file
19
fnl/macros.fnl
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
{:augroup
|
||||||
|
(fn [name ...]
|
||||||
|
`(do
|
||||||
|
(nvim.ex.augroup ,(tostring name))
|
||||||
|
(nvim.ex.autocmd_)
|
||||||
|
,...
|
||||||
|
(nvim.ex.augroup :END)))
|
||||||
|
|
||||||
|
:autocmd
|
||||||
|
(fn [...]
|
||||||
|
`(nvim.ex.autocmd ,...))
|
||||||
|
|
||||||
|
:_:
|
||||||
|
(fn [name ...]
|
||||||
|
`((. nvim.ex ,(tostring name)) ,...))
|
||||||
|
|
||||||
|
:viml->fn
|
||||||
|
(fn [name]
|
||||||
|
`(.. "lua require('" *module-name* "')['" ,(tostring name) "']()"))}
|
13
fnl/util.fnl
Normal file
13
fnl/util.fnl
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
(module util
|
||||||
|
{require {a aniseed.core
|
||||||
|
nvim aniseed.nvim}
|
||||||
|
require-macros [macros]})
|
||||||
|
|
||||||
|
(defn noremap [mode from to]
|
||||||
|
"Sets a mapping with {:noremap true :silent true}."
|
||||||
|
(nvim.set_keymap mode from to {:noremap true :silent true}))
|
||||||
|
|
||||||
|
(defn mapexpr [mode from to]
|
||||||
|
"Sets a mapping with {:noremap true :silent true :expr true}."
|
||||||
|
(nvim.set_keymap mode from to {:noremap true :silent true :expr true}))
|
||||||
|
|
13
init.vim
13
init.vim
|
@ -54,7 +54,7 @@ set autoindent smartindent noet expandtab
|
||||||
set nowrap
|
set nowrap
|
||||||
set noshowmode " hide the mode as shown by vim, because the status line does it better!
|
set noshowmode " hide the mode as shown by vim, because the status line does it better!
|
||||||
|
|
||||||
set completeopt=longest,menuone " Enable autocompletion
|
set completeopt=longest,menuone,noselect " Enable autocompletion
|
||||||
set laststatus=2
|
set laststatus=2
|
||||||
set noshowmode
|
set noshowmode
|
||||||
|
|
||||||
|
@ -353,14 +353,13 @@ source $VIM_ROOT/whichkeyConfig.vim
|
||||||
luafile $VIM_ROOT/lsp.lua
|
luafile $VIM_ROOT/lsp.lua
|
||||||
"source $VIM_ROOT/lsp.vim
|
"source $VIM_ROOT/lsp.vim
|
||||||
|
|
||||||
|
let g:aniseed#env = v:true
|
||||||
" this is apparently necessary for nvim-lsp stuff
|
|
||||||
set completeopt=menuone,noselect
|
|
||||||
|
|
||||||
|
|
||||||
inoremap <silent><expr> <C-Space> compe#complete()
|
|
||||||
inoremap <silent><expr> <CR> compe#confirm('<CR>')
|
"inoremap <silent><expr> <C-Space> compe#complete()
|
||||||
inoremap <silent><expr> <esc> compe#close('<esc>')
|
"inoremap <silent><expr> <CR> compe#confirm('<CR>')
|
||||||
|
"inoremap <silent><expr> <esc> compe#close('<esc>')
|
||||||
|
|
||||||
|
|
||||||
"nnoremap <silent> <C-d> <cmd>lua require('lspsaga.action').smart_scroll_with_saga(1)<CR>
|
"nnoremap <silent> <C-d> <cmd>lua require('lspsaga.action').smart_scroll_with_saga(1)<CR>
|
||||||
|
|
|
@ -10,6 +10,9 @@ call plug#begin('~/.vim/plugged')
|
||||||
Plug 'Olical/aniseed', { 'tag': 'v3.16.0' }
|
Plug 'Olical/aniseed', { 'tag': 'v3.16.0' }
|
||||||
Plug 'bakpakin/fennel.vim'
|
Plug 'bakpakin/fennel.vim'
|
||||||
|
|
||||||
|
" general purpose lua wrappers for nvim stuff
|
||||||
|
Plug 'norcalli/nvim.lua'
|
||||||
|
|
||||||
Plug 'tweekmonster/startuptime.vim'
|
Plug 'tweekmonster/startuptime.vim'
|
||||||
Plug 'tpope/vim-repeat'
|
Plug 'tpope/vim-repeat'
|
||||||
|
|
||||||
|
@ -128,11 +131,14 @@ call plug#begin('~/.vim/plugged')
|
||||||
"Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
"Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
||||||
Plug 'thyrgle/vim-dyon'
|
Plug 'thyrgle/vim-dyon'
|
||||||
|
|
||||||
|
Plug 'bakpakin/fennel.vim'
|
||||||
|
|
||||||
Plug 'tjdevries/nlua.nvim'
|
Plug 'tjdevries/nlua.nvim'
|
||||||
Plug 'nvim-lua/completion-nvim'
|
Plug 'nvim-lua/completion-nvim'
|
||||||
|
|
||||||
"Plug 'mxw/vim-prolog'
|
"Plug 'mxw/vim-prolog'
|
||||||
|
|
||||||
|
|
||||||
Plug 'neovim/nvim-lspconfig'
|
Plug 'neovim/nvim-lspconfig'
|
||||||
Plug 'hrsh7th/nvim-compe'
|
Plug 'hrsh7th/nvim-compe'
|
||||||
Plug 'glepnir/lspsaga.nvim'
|
Plug 'glepnir/lspsaga.nvim'
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
nnoremap <silent> <leader> :<c-u>WhichKey '<Space>'<CR>
|
"nnoremap <silent> <leader> :<c-u>WhichKey '<Space>'<CR>
|
||||||
vnoremap <silent> <leader> :<c-u>'WhichKeyVisual '<Space>'<CR>
|
"vnoremap <silent> <leader> :<c-u>'WhichKeyVisual '<Space>'<CR>
|
||||||
let g:which_key_map = {}
|
"let g:which_key_map = {}
|
||||||
call which_key#register('<Space>', "g:which_key_map")
|
"call which_key#register('<Space>', "g:which_key_map")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -10,18 +10,18 @@ call which_key#register('<Space>', "g:which_key_map")
|
||||||
"\ 'h' : 'which_key_ignore', 'l' : 'which_key_ignore' ,
|
"\ 'h' : 'which_key_ignore', 'l' : 'which_key_ignore' ,
|
||||||
"\ 'h' : ':bprevious', 'l' : ':bnext' ,
|
"\ 'h' : ':bprevious', 'l' : ':bnext' ,
|
||||||
"\ 'h' : [':BufferPrevious', 'prev buffer'], 'l' : [':BufferNext', 'next buffer'] ,
|
"\ 'h' : [':BufferPrevious', 'prev buffer'], 'l' : [':BufferNext', 'next buffer'] ,
|
||||||
let g:which_key_map = {
|
"let g:which_key_map = {
|
||||||
\ 'h' : [':bprevious', 'prev buffer'], 'l' : [':bnext', 'next buffer'],
|
"\ 'h' : [':bprevious', 'prev buffer'], 'l' : [':bnext', 'next buffer'],
|
||||||
\ 'f' : 'which_key_ignore', 's': 'which_key_ignore' ,
|
"\ 'f' : 'which_key_ignore', 's': 'which_key_ignore' ,
|
||||||
\ 'c' : { 'name': '+comment_out' },
|
"\ 'c' : { 'name': '+comment_out' },
|
||||||
\ 'e' : { 'name': '+emmet' },
|
"\ 'e' : { 'name': '+emmet' },
|
||||||
\ '[' : ['<Plug>(YoinkPostPasteSwapBack)', 'Swap last paste backwards' ],
|
"\ '[' : ['<Plug>(YoinkPostPasteSwapBack)', 'Swap last paste backwards' ],
|
||||||
\ ']' : ['<Plug>(YoinkPostPasteSwapForward)', 'Swap last paste backwards' ],
|
"\ ']' : ['<Plug>(YoinkPostPasteSwapForward)', 'Swap last paste backwards' ],
|
||||||
\ ':' : [':Commands' , 'Search command with fzf' ],
|
"\ ':' : [':Commands' , 'Search command with fzf' ],
|
||||||
\ 'z' : { 'name': '+folds', 'c': ['foldclose', 'close fold'],
|
"\ 'z' : { 'name': '+folds', 'c': ['foldclose', 'close fold'],
|
||||||
\ 'o': ['foldopen', 'open fold'] ,
|
"\ 'o': ['foldopen', 'open fold'] ,
|
||||||
\ }
|
"\ }
|
||||||
\ }
|
"\ }
|
||||||
|
|
||||||
"\ 's' : [ ':CocFzfList symbols' , 'list symbols' ] ,
|
"\ 's' : [ ':CocFzfList symbols' , 'list symbols' ] ,
|
||||||
|
|
||||||
|
@ -45,25 +45,26 @@ let g:which_key_map = {
|
||||||
"\ 'a' : [ ':call luaeval("vim.lsp.diagnostic.show_line_diagnostics()")' , 'diagnostics info' ] ,
|
"\ 'a' : [ ':call luaeval("vim.lsp.diagnostic.show_line_diagnostics()")' , 'diagnostics info' ] ,
|
||||||
"\ }
|
"\ }
|
||||||
|
|
||||||
let g:which_key_map['m'] = {
|
" this is the one!
|
||||||
\ 'name' : '+Code-actions' ,
|
"let g:which_key_map['m'] = {
|
||||||
\ 'd' : [ ':Lspsaga hover_doc' , 'show documentation' ] ,
|
"\ 'name' : '+Code-actions' ,
|
||||||
\ 'b' : [ ':Lspsaga lsp_finder' , 'find stuff' ] ,
|
"\ 'd' : [ ':Lspsaga hover_doc' , 'show documentation' ] ,
|
||||||
\ 'x' : [ ':Lspsaga preview_definition' , 'Preview definition' ] ,
|
"\ 'b' : [ ':Lspsaga lsp_finder' , 'find stuff' ] ,
|
||||||
\ 'o' : [ ':Telescope lsp_document_symbols' , 'symbols in document' ] ,
|
"\ 'x' : [ ':Lspsaga preview_definition' , 'Preview definition' ] ,
|
||||||
\ 's' : [ ':Telescope lsp_workspace_symbols' , 'symbols in workspace' ] ,
|
"\ 'o' : [ ':Telescope lsp_document_symbols' , 'symbols in document' ] ,
|
||||||
\ 'g' : [ ':call luaeval("vim.lsp.buf.definition()")' , 'go to definition' ] ,
|
"\ 's' : [ ':Telescope lsp_workspace_symbols' , 'symbols in workspace' ] ,
|
||||||
\ 't' : [ ':Lspsaga signature_help' , 'Show signature help' ] ,
|
"\ 'g' : [ ':call luaeval("vim.lsp.buf.definition()")' , 'go to definition' ] ,
|
||||||
\ 'i' : [ ':call luaeval("vim.lsp.buf.implementation()")' , 'show implementation' ] ,
|
"\ 't' : [ ':Lspsaga signature_help' , 'Show signature help' ] ,
|
||||||
\ 'r' : [ ':call luaeval("vim.lsp.buf.references()")' , 'show references' ] ,
|
"\ 'i' : [ ':call luaeval("vim.lsp.buf.implementation()")' , 'show implementation' ] ,
|
||||||
\ 'n' : [ ':Lspsaga rename' , 'rename' ] ,
|
"\ 'r' : [ ':call luaeval("vim.lsp.buf.references()")' , 'show references' ] ,
|
||||||
\ 'f' : [ ':call luaeval("vim.lsp.buf.formatting()")' , 'format file' ] ,
|
"\ 'n' : [ ':Lspsaga rename' , 'rename' ] ,
|
||||||
\ 'v' : [ ':Lspsaga code_action' , 'apply codeaction' ] ,
|
"\ 'f' : [ ':call luaeval("vim.lsp.buf.formatting()")' , 'format file' ] ,
|
||||||
\ 'e' : [ ':call luaeval("vim.lsp.diagnostic.goto_next()")' , 'Jump to the next error' ] ,
|
"\ 'v' : [ ':Lspsaga code_action' , 'apply codeaction' ] ,
|
||||||
\ 'E' : [ ':Telescope lsp_workspace_diagnostics' , 'List diagnostics' ] ,
|
"\ 'e' : [ ':call luaeval("vim.lsp.diagnostic.goto_next()")' , 'Jump to the next error' ] ,
|
||||||
\ 'a' : [ ':Lspsaga show_cursor_diagnostics' , 'Cursor diagnostics' ] ,
|
"\ 'E' : [ ':Telescope lsp_workspace_diagnostics' , 'List diagnostics' ] ,
|
||||||
\ 'A' : [ ':Lspsaga show_line_diagnostics' , 'Line diagnostics' ] ,
|
"\ 'a' : [ ':Lspsaga show_cursor_diagnostics' , 'Cursor diagnostics' ] ,
|
||||||
\ }
|
"\ 'A' : [ ':Lspsaga show_line_diagnostics' , 'Line diagnostics' ] ,
|
||||||
|
"\ }
|
||||||
|
|
||||||
"let g:which_key_map['m'] = {
|
"let g:which_key_map['m'] = {
|
||||||
"\ 'name' : '+Code-actions' ,
|
"\ 'name' : '+Code-actions' ,
|
||||||
|
@ -89,54 +90,44 @@ let g:which_key_map['m'] = {
|
||||||
"\ 'O' : [ '<Plug>(coc-openlink)' , 'open link under cursor' ] ,
|
"\ 'O' : [ '<Plug>(coc-openlink)' , 'open link under cursor' ] ,
|
||||||
"\}
|
"\}
|
||||||
|
|
||||||
let g:which_key_map['f'] = {
|
"let g:which_key_map['f'] = {
|
||||||
\ 'name': '+folds',
|
"\ 'name': '+folds',
|
||||||
\ 'o': [ ':foldopen' , 'open fold' ] ,
|
"\ 'o': [ ':foldopen' , 'open fold' ] ,
|
||||||
\ 'n': [ ':foldclose' , 'close fold' ] ,
|
"\ 'n': [ ':foldclose' , 'close fold' ] ,
|
||||||
\ 'j': [ 'zj' , 'jump to next fold' ] ,
|
"\ 'j': [ 'zj' , 'jump to next fold' ] ,
|
||||||
\ 'k': [ 'zk' , 'jump to previous fold' ] ,
|
"\ 'k': [ 'zk' , 'jump to previous fold' ] ,
|
||||||
\ }
|
"\ }
|
||||||
|
|
||||||
let g:which_key_map['a'] = {
|
|
||||||
\ 'name': '+Bookmarks',
|
|
||||||
\ ' ' : ['<Plug>(coc-bookmark-toggle)' , 'toggle bookmark' ] ,
|
|
||||||
\ 'a' : ['<Plug>(coc-bookmark-annotate)' , 'annotate bookmark' ] ,
|
|
||||||
\ 'j' : ['<Plug>(coc-bookmark-next)' , 'next bookmark' ] ,
|
|
||||||
\ 'k' : ['<Plug>(coc-bookmark-prev)' , 'prev bookmark' ] ,
|
|
||||||
\ 'l' : [':CocList bookmark' , 'list bookmarks' ] ,
|
|
||||||
\ 'c' : [':CocCommand bookmark.clearForCurrentFile' , 'clear for current file' ] ,
|
|
||||||
\ 'C' : [':CocCommand bookmark.clearForAllFiles' , 'clear for all files' ]
|
|
||||||
\}
|
|
||||||
|
|
||||||
" mappings for view and layout
|
"" mappings for view and layout
|
||||||
let g:which_key_map['v'] = {
|
"let g:which_key_map['v'] = {
|
||||||
\ 'name' : '+view-and-layout',
|
"\ 'name' : '+view-and-layout',
|
||||||
\ 'n' : [':set relativenumber!' , 'toggle relative numbers' ] ,
|
"\ 'n' : [':set relativenumber!' , 'toggle relative numbers' ] ,
|
||||||
\ 'm' : [':set nonumber! norelativenumber' , 'toggle numbers'] ,
|
"\ 'm' : [':set nonumber! norelativenumber' , 'toggle numbers'] ,
|
||||||
\ 'g' : [':Goyo | set linebreak' , 'toggle focus mode' ] ,
|
"\ 'g' : [':Goyo | set linebreak' , 'toggle focus mode' ] ,
|
||||||
\ 'i' : [':IndentGuidesToggle' , 'toggle indent guides' ] ,
|
"\ 'i' : [':IndentGuidesToggle' , 'toggle indent guides' ] ,
|
||||||
\ }
|
"\ }
|
||||||
|
|
||||||
" :bwipeout! bdelete!
|
"" :bwipeout! bdelete!
|
||||||
"\ 'b' : ['BufferPick' , 'select open buffer' ] ,
|
""\ 'b' : ['BufferPick' , 'select open buffer' ] ,
|
||||||
"\ 'c' : ['BufferClose', 'close open buffer' ] ,
|
""\ 'c' : ['BufferClose', 'close open buffer' ] ,
|
||||||
"\ 'w' : ['BufferWipeout', 'wipeout open buffer' ] ,
|
""\ 'w' : ['BufferWipeout', 'wipeout open buffer' ] ,
|
||||||
let g:which_key_map['b'] = {
|
"let g:which_key_map['b'] = {
|
||||||
\ 'name': '+buffers',
|
"\ 'name': '+buffers',
|
||||||
\ 'b' : [':Buffers' , 'select open buffer' ] ,
|
"\ 'b' : [':Buffers' , 'select open buffer' ] ,
|
||||||
\ 'c' : [':bdelete!', 'close open buffer' ] ,
|
"\ 'c' : [':bdelete!', 'close open buffer' ] ,
|
||||||
\ 'w' : [':bwipeout!', 'wipeout open buffer' ] ,
|
"\ 'w' : [':bwipeout!', 'wipeout open buffer' ] ,
|
||||||
\ }
|
"\ }
|
||||||
|
|
||||||
let g:which_key_map['x'] = {
|
"let g:which_key_map['x'] = {
|
||||||
\ 'name' : '+other',
|
"\ 'name' : '+other',
|
||||||
\ 'f' : ['NERDTreeToggle' , '<Ctrl+F> show file tree'],
|
"\ 'f' : ['NERDTreeToggle' , '<Ctrl+F> show file tree'],
|
||||||
\ 'p' : ['FZF' , '<Ctrl+p> search file (c-v/c-x to open in split)' ] ,
|
"\ 'p' : ['FZF' , '<Ctrl+p> search file (c-v/c-x to open in split)' ] ,
|
||||||
\ 'h' : [':History:' , 'search command history'],
|
"\ 'h' : [':History:' , 'search command history'],
|
||||||
\ 'c' : [':Commands' , 'search through commands'],
|
"\ 'c' : [':Commands' , 'search through commands'],
|
||||||
\ 's' : ['OverCommandLine', 'Substitute with preview'],
|
"\ 's' : ['OverCommandLine', 'Substitute with preview'],
|
||||||
\ 'y' : [':CocFzfList yank', 'Show yank history']
|
"\ 'y' : [':CocFzfList yank', 'Show yank history']
|
||||||
\ }
|
"\ }
|
||||||
|
|
||||||
" CocList -A --normal yank needs :CocInstall coc-yank
|
" CocList -A --normal yank needs :CocInstall coc-yank
|
||||||
|
|
||||||
|
@ -148,5 +139,5 @@ let g:which_key_map['x'] = {
|
||||||
"autocmd! FileType which_key set laststatus=2 noshowmode noruler
|
"autocmd! FileType which_key set laststatus=2 noshowmode noruler
|
||||||
"\| autocmd! BufLeave <buffer> set laststatus=2 showmode ruler
|
"\| autocmd! BufLeave <buffer> set laststatus=2 showmode ruler
|
||||||
|
|
||||||
set timeoutlen=200
|
"set timeoutlen=200
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue