~kota/dots

a133ca6845fa3bf7be123511e993269891dd274e — Dakota Walsh 30 days ago d5c6bd7
major neovim config change
35 files changed, 97 insertions(+), 395 deletions(-)

M .gitmodules
D neovim/.config/nvim/coc-settings.json
M neovim/.config/nvim/init.vim
D neovim/.config/nvim/pack/plugins/start/battery
D neovim/.config/nvim/pack/plugins/start/coc
D neovim/.config/nvim/pack/plugins/start/ctrlsf.vim
D neovim/.config/nvim/pack/plugins/start/fzf
D neovim/.config/nvim/pack/plugins/start/gx-extended
D neovim/.config/nvim/pack/plugins/start/splitjoin
D neovim/.config/nvim/pack/plugins/start/tabular
D neovim/.config/nvim/pack/plugins/start/undotree
D neovim/.config/nvim/pack/plugins/start/vim-airline
D neovim/.config/nvim/pack/plugins/start/vim-airline-themes
D neovim/.config/nvim/pack/plugins/start/vim-commentary
D neovim/.config/nvim/pack/plugins/start/vim-dirvish
D neovim/.config/nvim/pack/plugins/start/vim-eunuch
D neovim/.config/nvim/pack/plugins/start/vim-floaterm
D neovim/.config/nvim/pack/plugins/start/vim-fugitive
D neovim/.config/nvim/pack/plugins/start/vim-gitgutter
D neovim/.config/nvim/pack/plugins/start/vim-go
D neovim/.config/nvim/pack/plugins/start/vim-godot
D neovim/.config/nvim/pack/plugins/start/vim-hexokinase
D neovim/.config/nvim/pack/plugins/start/vim-highlightedyank
D neovim/.config/nvim/pack/plugins/start/vim-hugo-helper
D neovim/.config/nvim/pack/plugins/start/vim-repeat
D neovim/.config/nvim/pack/plugins/start/vim-speeddating
D neovim/.config/nvim/pack/plugins/start/vim-surround
D neovim/.config/nvim/pack/plugins/start/vim-tmux-navigator
D neovim/.config/nvim/pack/plugins/start/vim-toml
D neovim/.config/nvim/pack/plugins/start/vim-visual-multi
D neovim/.config/nvim/pack/plugins/start/visual-star-search
D neovim/.config/nvim/pack/plugins/start/wiki-ft.vim
D neovim/.config/nvim/pack/plugins/start/wiki.vim
D neovim/.config/nvim/pack/themes/start/black-pastel
D neovim/.config/nvim/pack/themes/start/light-pastel
M .gitmodules => .gitmodules +0 -171
@@ 1,174 1,3 @@
[submodule "zsh/.local/share/zsh/plugins/kota-prompt"]
	path = zsh/.local/share/zsh/plugins/kota-prompt
	url = https://git.sr.ht/~kota/kota-prompt
[submodule "neovim/.config/nvim/pack/themes/start/black-pastel"]
	path = neovim/.config/nvim/pack/themes/start/black-pastel
	url = https://git.sr.ht/~kota/black-pastel
[submodule "neovim/.config/nvim/pack/plugins/start/vim-speeddating"]
	path = neovim/.config/nvim/pack/plugins/start/vim-speeddating
	url = https://github.com/tpope/vim-speeddating
[submodule "neovim/.config/nvim/pack/plugins/start/vim-repeat"]
	path = neovim/.config/nvim/pack/plugins/start/vim-repeat
	url = https://github.com/tpope/vim-repeat
[submodule "neovim/.config/nvim/pack/plugins/start/vim-vinegar"]
	path = neovim/.config/nvim/pack/plugins/start/vim-vinegar
	url = https://github.com/tpope/vim-vinegar
[submodule "neovim/.config/nvim/pack/plugins/start/visual-star-search"]
	path = neovim/.config/nvim/pack/plugins/start/visual-star-search
	url = https://github.com/bronson/vim-visual-star-search
[submodule "neovim/.config/nvim/pack/plugins/start/vim-tmux-navigator"]
	path = neovim/.config/nvim/pack/plugins/start/vim-tmux-navigator
	url = https://github.com/christoomey/vim-tmux-navigator
[submodule "neovim/.config/nvim/pack/plugins/start/vim-gitgutter"]
	path = neovim/.config/nvim/pack/plugins/start/vim-gitgutter
	url = https://github.com/airblade/vim-gitgutter
[submodule "neovim/.config/nvim/pack/plugins/start/undotree"]
	path = neovim/.config/nvim/pack/plugins/start/undotree
	url = https://github.com/mbbill/undotree
[submodule "neovim/.config/nvim/pack/plugins/start/vim-commentary"]
	path = neovim/.config/nvim/pack/plugins/start/vim-commentary
	url = https://github.com/tpope/vim-commentary
[submodule "neovim/.config/nvim/pack/plugins/start/tabular"]
	path = neovim/.config/nvim/pack/plugins/start/tabular
	url = https://github.com/godlygeek/tabular
[submodule "neovim/.config/nvim/pack/plugins/start/vim-surround"]
	path = neovim/.config/nvim/pack/plugins/start/vim-surround
	url = https://github.com/tpope/vim-surround
[submodule "neovim/.config/nvim/pack/plugins/start/splitjoin"]
	path = neovim/.config/nvim/pack/plugins/start/splitjoin
	url = https://github.com/AndrewRadev/splitjoin.vim
[submodule "neovim/.config/nvim/pack/plugins/start/ack"]
	path = neovim/.config/nvim/pack/plugins/start/ack
	url = https://github.com/mileszs/ack.vim
[submodule "neovim/.config/nvim/pack/plugins/start/vim-airline"]
	path = neovim/.config/nvim/pack/plugins/start/vim-airline
	url = https://github.com/vim-airline/vim-airline
[submodule "neovim/.config/nvim/pack/plugins/start/vim-airline-themes"]
	path = neovim/.config/nvim/pack/plugins/start/vim-airline-themes
	url = https://github.com/vim-airline/vim-airline-themes
[submodule "neovim/.config/nvim/pack/plugins/start/battery"]
	path = neovim/.config/nvim/pack/plugins/start/battery
	url = https://github.com/lambdalisue/battery.vim
[submodule "neovim/.config/nvim/pack/plugins/start/vim-fugitive"]
	path = neovim/.config/nvim/pack/plugins/start/vim-fugitive
	url = https://github.com/tpope/vim-fugitive
[submodule "neovim/.config/nvim/pack/plugins/start/vim-highlightedyank"]
	path = neovim/.config/nvim/pack/plugins/start/vim-highlightedyank
	url = https://github.com/machakann/vim-highlightedyank
[submodule "neovim/.config/nvim/pack/plugins/start/coc"]
	path = neovim/.config/nvim/pack/plugins/start/coc
	url = https://github.com/neoclide/coc.nvim
[submodule "neovim/.config/nvim/pack/plugins/start/nnn"]
	path = neovim/.config/nvim/pack/plugins/start/nnn
	url = https://github.com/mcchrish/nnn.vim
[submodule "neovim/.config/nvim/pack/plugins/start/vim-hugo-helper"]
	path = neovim/.config/nvim/pack/plugins/start/vim-hugo-helper
	url = https://github.com/robertbasic/vim-hugo-helper
[submodule "neovim/.config/nvim/pack/plugins/start/fzf"]
	path = neovim/.config/nvim/pack/plugins/start/fzf
	url = https://github.com/junegunn/fzf.vim
[submodule "neovim/.config/nvim/pack/plugins/start/vim-toml"]
	path = neovim/.config/nvim/pack/plugins/start/vim-toml
	url = https://github.com/cespare/vim-toml
[submodule "neovim/.config/nvim/pack/plugins/start/vim-godot"]
	path = neovim/.config/nvim/pack/plugins/start/vim-godot
	url = https://github.com/habamax/vim-godot
[submodule "neovim-minimal/.config/nvim/pack/plugins/start/black-pastel"]
	path = neovim-minimal/.config/nvim/pack/plugins/start/black-pastel
	url = https://git.sr.ht/~kota/black-pastel
[submodule "neovim-minimal/.config/nvim/pack/plugins/start/vim-speeddating"]
	path = neovim-minimal/.config/nvim/pack/plugins/start/vim-speeddating
	url = https://github.com/tpope/vim-speeddating
[submodule "neovim-minimal/.config/nvim/pack/plugins/start/vim-vinegar"]
	path = neovim-minimal/.config/nvim/pack/plugins/start/vim-vinegar
	url = https://github.com/tpope/vim-vinegar
[submodule "neovim-minimal/.config/nvim/pack/plugins/start/vim-visual-star-search"]
	path = neovim-minimal/.config/nvim/pack/plugins/start/vim-visual-star-search
	url = https://github.com/bronson/vim-visual-star-search
[submodule "neovim-minimal/.config/nvim/pack/plugins/start/vim-tmux-navigator"]
	path = neovim-minimal/.config/nvim/pack/plugins/start/vim-tmux-navigator
	url = https://github.com/christoomey/vim-tmux-navigator
[submodule "neovim-minimal/.config/nvim/pack/plugins/start/vim-gitgutter"]
	path = neovim-minimal/.config/nvim/pack/plugins/start/vim-gitgutter
	url = https://github.com/airblade/vim-gitgutter
[submodule "neovim-minimal/.config/nvim/pack/plugins/start/undotree"]
	path = neovim-minimal/.config/nvim/pack/plugins/start/undotree
	url = https://github.com/mbbill/undotree
[submodule "neovim-minimal/.config/nvim/pack/plugins/start/vim-commentary"]
	path = neovim-minimal/.config/nvim/pack/plugins/start/vim-commentary
	url = https://github.com/tpope/vim-commentary
[submodule "neovim-minimal/.config/nvim/pack/plugins/start/tabular"]
	path = neovim-minimal/.config/nvim/pack/plugins/start/tabular
	url = https://github.com/godlygeek/tabular
[submodule "neovim-minimal/.config/nvim/pack/plugins/start/vim-surround"]
	path = neovim-minimal/.config/nvim/pack/plugins/start/vim-surround
	url = https://github.com/tpope/vim-surround
[submodule "neovim-minimal/.config/nvim/pack/plugins/start/splitjoin"]
	path = neovim-minimal/.config/nvim/pack/plugins/start/splitjoin
	url = https://github.com/AndrewRadev/splitjoin.vim
[submodule "neovim-minimal/.config/nvim/pack/plugins/start/ack"]
	path = neovim-minimal/.config/nvim/pack/plugins/start/ack
	url = https://github.com/mileszs/ack.vim
[submodule "neovim-minimal/.config/nvim/pack/plugins/start/vim-fugitive"]
	path = neovim-minimal/.config/nvim/pack/plugins/start/vim-fugitive
	url = https://github.com/tpope/vim-fugitive
[submodule "neovim-minimal/.config/nvim/pack/plugins/start/vim-highlightedyank"]
	path = neovim-minimal/.config/nvim/pack/plugins/start/vim-highlightedyank
	url = https://github.com/machakann/vim-highlightedyank
[submodule "neovim-minimal/.config/nvim/pack/plugins/start/vim-hugo-helper"]
	path = neovim-minimal/.config/nvim/pack/plugins/start/vim-hugo-helper
	url = https://github.com/robertbasic/vim-hugo-helper
[submodule "neovim-minimal/.config/nvim/pack/plugins/start/vim-toml"]
	path = neovim-minimal/.config/nvim/pack/plugins/start/vim-toml
	url = https://github.com/cespare/vim-toml
[submodule "neovim-minimal/.config/nvim/pack/plugins/start/vim-godot"]
	path = neovim-minimal/.config/nvim/pack/plugins/start/vim-godot
	url = https://github.com/habamax/vim-godot
[submodule "neovim/.config/nvim/pack/plugins/start/gemini-vim-syntax"]
	path = neovim/.config/nvim/pack/plugins/start/gemini-vim-syntax
	url = https://tildegit.org/sloum/gemini-vim-syntax
[submodule "neovim-minimal/.config/nvim/pack/plugins/start/gemini-vim-syntax"]
	path = neovim-minimal/.config/nvim/pack/plugins/start/gemini-vim-syntax
	url = https://tildegit.org/sloum/gemini-vim-syntax
[submodule "neovim/.config/nvim/pack/plugins/start/vim-eunuch"]
	path = neovim/.config/nvim/pack/plugins/start/vim-eunuch
	url = https://github.com/tpope/vim-eunuch
[submodule "neovim/.config/nvim/pack/plugins/start/vim-dirvish"]
	path = neovim/.config/nvim/pack/plugins/start/vim-dirvish
	url = https://github.com/justinmk/vim-dirvish
[submodule "neovim/.config/nvim/pack/plugins/start/vim-floaterm"]
	path = neovim/.config/nvim/pack/plugins/start/vim-floaterm
	url = https://github.com/voldikss/vim-floaterm
[submodule "neovim/.config/nvim/pack/plugins/start/vim-go"]
	path = neovim/.config/nvim/pack/plugins/start/vim-go
	url = https://github.com/fatih/vim-go
[submodule "neovim/.config/nvim/pack/plugins/start/preamble"]
	path = neovim/.config/nvim/pack/plugins/start/preamble
	url = https://github.com/vim-scripts/Preamble
[submodule "neovim/.config/nvim/pack/plugins/start/gx-extended"]
	path = neovim/.config/nvim/pack/plugins/start/gx-extended
	url = https://github.com/stsewd/gx-extended.vim
[submodule "https:/github.com/stsewd/gx-extended.vim"]
	path = https:/github.com/stsewd/gx-extended.vim
	url = https://git.sr.ht/~kota/light-pastel
[submodule "neovim/.config/nvim/pack/themes/start/light-pastel"]
	path = neovim/.config/nvim/pack/themes/start/light-pastel
	url = https://git.sr.ht/~kota/light-pastel
[submodule "neovim/.config/nvim/pack/plugins/start/vimwiki"]
	path = neovim/.config/nvim/pack/plugins/start/vimwiki
	url = https://github.com/vimwiki/vimwiki.git
[submodule "neovim/.config/nvim/pack/plugins/start/wiki.vim"]
	path = neovim/.config/nvim/pack/plugins/start/wiki.vim
	url = https://github.com/lervag/wiki.vim
[submodule "neovim/.config/nvim/pack/plugins/start/wiki-ft.vim"]
	path = neovim/.config/nvim/pack/plugins/start/wiki-ft.vim
	url = https://github.com/lervag/wiki-ft.vim
[submodule "neovim/.config/nvim/pack/plugins/start/ctrlsf.vim"]
	path = neovim/.config/nvim/pack/plugins/start/ctrlsf.vim
	url = https://github.com/dyng/ctrlsf.vim
[submodule "neovim/.config/nvim/pack/plugins/start/vim-visual-multi"]
	path = neovim/.config/nvim/pack/plugins/start/vim-visual-multi
	url = https://github.com/mg979/vim-visual-multi
[submodule "neovim/.config/nvim/pack/plugins/start/vim-hexokinase"]
	path = neovim/.config/nvim/pack/plugins/start/vim-hexokinase
	url = https://github.com/RRethy/vim-hexokinase

D neovim/.config/nvim/coc-settings.json => neovim/.config/nvim/coc-settings.json +0 -41
@@ 1,41 0,0 @@
{
	"coc.preferences.formatOnSaveFiletypes": [
		"javascript",
		"html",
		"json",
		"css",
		"scss"
	],
	"coc.preferences.colorSupport": false,
	"languageserver": {
		"godot": {
			"host": "127.0.0.1",
			"filetypes": [
				"gdscript"
			],
			"port": 6008
		},
		"golang": {
			"command": "gopls",
			"args": [
				"-remote=auto"
			],
			"rootPatterns": [
				"go.mod",
				".vim/",
				".git/",
				".hg/"
			],
			"filetypes": [
				"go"
			]
		}
	},
	"diagnostic-languageserver.filetypes": {
		"sh": "shellcheck"
	},
	"diagnostic-languageserver.formatFiletypes": {
		"lua": "lua-format",
		"sh": "shfmt"
	}
}

M neovim/.config/nvim/init.vim => neovim/.config/nvim/init.vim +97 -151
@@ 1,6 1,37 @@
" Use vim-plug
call plug#begin(stdpath('data') . '/plugged')
Plug 'https://git.sr.ht/~kota/black-pastel'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'lambdalisue/battery.vim'
Plug 'junegunn/vim-easy-align'
Plug 'tpope/vim-fugitive'
Plug 'junegunn/gv.vim'
Plug 'junegunn/fzf'
Plug 'junegunn/fzf.vim'
Plug 'dyng/ctrlsf.vim'
Plug 'bronson/vim-visual-star-search'
Plug 'AndrewRadev/splitjoin.vim'
Plug 'justinmk/vim-dirvish'
Plug 'tpope/vim-vinegar'
Plug 'tpope/vim-commentary'
Plug 'tpope/vim-surround'
Plug 'tpope/vim-speeddating'
Plug 'tpope/vim-repeat'
Plug 'mg979/vim-visual-multi', {'branch': 'master'}
Plug 'airblade/vim-gitgutter'
Plug 'rrethy/vim-hexokinase', { 'do': 'make hexokinase' }
Plug 'machakann/vim-highlightedyank'
Plug 'voldikss/vim-floaterm'
Plug 'lervag/wiki.vim'
Plug 'lervag/wiki-ft.vim'
Plug 'neovim/nvim-lspconfig'
call plug#end()

" Make vim pretty
syntax enable
set relativenumber
set encoding=utf-8
set relativenumber
set cursorline
set colorcolumn=80
set termguicolors


@@ 8,9 39,6 @@ set background=dark
colorscheme black-pastel
let g:airline_theme='base16'

" Coc Extensions
let g:coc_global_extensions = ['coc-rust-analyzer', 'coc-clangd', 'coc-vimlsp', 'coc-tsserver', 'coc-snippets', 'coc-sh', 'coc-python', 'coc-json', 'coc-java', 'coc-html', 'coc-godot', 'coc-css', 'coc-lua']

" Enable autowrite (automatically write when :make or :GoBuild are called)
set autowrite



@@ 28,6 56,9 @@ set diffopt=filler,internal,algorithm:histogram,indent-heuristic
" Unbreak vim's regex implementation
set magic

" response time
set updatetime=100

" Allow hidden buffers to be opened without a bang.
set hidden



@@ 112,139 143,11 @@ autocmd FileType wiki setlocal tw=80 et ts=2 sw=2
" Multiline indenting
set breakindent

" Use tab for trigger completion with characters ahead and navigate.
inoremap <silent><expr> <TAB>
      \ pumvisible() ? "\<C-n>" :
      \ <SID>check_back_space() ? "\<TAB>" :
      \ coc#refresh()
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"

function! s:check_back_space() abort
  let col = col('.') - 1
  return !col || getline('.')[col - 1]  =~# '\s'
endfunction

" Use <c-space> to trigger completion.
if has('nvim')
  inoremap <silent><expr> <c-space> coc#refresh()
else
  inoremap <silent><expr> <c-@> coc#refresh()
endif

" Use `[g` and `]g` to navigate diagnostics
" Use `:CocDiagnostics` to get all diagnostics of current buffer in location list.
nmap <silent> [g <Plug>(coc-diagnostic-prev)
nmap <silent> ]g <Plug>(coc-diagnostic-next)

" GoTo code navigation.
nmap <silent> gd <Plug>(coc-definition)
nmap <silent> gy <Plug>(coc-type-definition)
nmap <silent> gi <Plug>(coc-implementation)
nmap <silent> gr <Plug>(coc-references)

" Use K to show documentation in preview window.
nnoremap <silent> K :call <SID>show_documentation()<CR>

function! s:show_documentation()
  if (index(['vim','help'], &filetype) >= 0)
    execute 'h '.expand('<cword>')
  elseif (coc#rpc#ready())
    call CocActionAsync('doHover')
  else
    execute '!' . &keywordprg . " " . expand('<cword>')
  endif
endfunction

" Highlight the symbol and its references when holding the cursor.
autocmd CursorHold * silent call CocActionAsync('highlight')

" Symbol renaming.
nmap <leader>rn <Plug>(coc-rename)

" Formatting selected code.
xmap <leader>f  <Plug>(coc-format-selected)
nmap <leader>f  <Plug>(coc-format-selected)

augroup mygroup
  autocmd!
  " Setup formatexpr specified filetype(s).
  autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected')
  " Update signature help on jump placeholder.
  autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp')
augroup end

" Applying codeAction to the selected region.
" Example: `<leader>aap` for current paragraph
xmap <leader>a  <Plug>(coc-codeaction-selected)
nmap <leader>a  <Plug>(coc-codeaction-selected)

" Remap keys for applying codeAction to the current buffer.
nmap <leader>ac  <Plug>(coc-codeaction)
" Apply AutoFix to problem on the current line.
nmap <leader>qf  <Plug>(coc-fix-current)

" Map function and class text objects
" NOTE: Requires 'textDocument.documentSymbol' support from the language server.
xmap if <Plug>(coc-funcobj-i)
omap if <Plug>(coc-funcobj-i)
xmap af <Plug>(coc-funcobj-a)
omap af <Plug>(coc-funcobj-a)
xmap ic <Plug>(coc-classobj-i)
omap ic <Plug>(coc-classobj-i)
xmap ac <Plug>(coc-classobj-a)
omap ac <Plug>(coc-classobj-a)

" Remap <C-f> and <C-b> for scroll float windows/popups.
if has('nvim-0.4.0') || has('patch-8.2.0750')
  nnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
  nnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
  inoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(1)\<cr>" : "\<Right>"
  inoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(0)\<cr>" : "\<Left>"
  vnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
  vnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
endif

" Use CTRL-S for selections ranges.
" Requires 'textDocument/selectionRange' support of language server.
nmap <silent> <C-s> <Plug>(coc-range-select)
xmap <silent> <C-s> <Plug>(coc-range-select)

" Add `:Format` command to format current buffer.
command! -nargs=0 Format :call CocAction('format')

" Add `:Fold` command to fold current buffer.
command! -nargs=? Fold :call     CocAction('fold', <f-args>)

" Add `:OR` command for organize imports of the current buffer.
command! -nargs=0 OR   :call     CocAction('runCommand', 'editor.action.organizeImport')

" Mappings for CoCList
" Show all diagnostics.
nnoremap <silent><nowait> <space>a  :<C-u>CocList diagnostics<cr>
" Manage extensions.
nnoremap <silent><nowait> <space>e  :<C-u>CocList extensions<cr>
" Show commands.
nnoremap <silent><nowait> <space>c  :<C-u>CocList commands<cr>
" Find symbol of current document.
nnoremap <silent><nowait> <space>o  :<C-u>CocList outline<cr>
" Search workspace symbols.
nnoremap <silent><nowait> <space>s  :<C-u>CocList -I symbols<cr>
" Do default action for next item.
nnoremap <silent><nowait> <space>j  :<C-u>CocNext<CR>
" Do default action for previous item.
nnoremap <silent><nowait> <space>k  :<C-u>CocPrev<CR>
" Resume latest coc list.
nnoremap <silent><nowait> <space>p  :<C-u>CocListResume<CR>

" Pandoc the current file
nmap <leader>m :w<CR>:!pandoc % -o %:t:r.pdf<CR>
nmap <leader>M :!zathura %:t:r.pdf &<CR>

" FZF for file switching
" FZF
let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.8 } }
let g:fzf_preview_window = []
nnoremap <leader><leader> :Files<CR>
nnoremap <leader>[ :CtrlSF 
nnoremap <leader>[ :CtrlSF
nnoremap <leader>] :GFiles<CR>
nnoremap <leader>/ :Buffers<CR>
nnoremap <leader><CR> :FloatermNew! --height=0.9 --width=0.8 --autoclose=2<CR>


@@ 256,7 159,7 @@ nmap <leader>ww <plug>(wiki-index)\|:cd ~/docs/memex<cr>
" override <leader><leader> for wiki.vim
autocmd FileType wiki nnoremap <leader><leader> :WikiFzfPages<CR>

" terminal
" floaterm
hi FloatermBorder guibg=black guifg=grey
let g:floaterm_keymap_kill = '<leader><Esc>'



@@ 274,15 177,14 @@ command! -nargs=? -complete=dir Vexplore leftabove vsplit | silent Dirvish <args
set whichwrap=b,s,<,>,[,]

" Highlight searches
" \s to temp hide the search results
" \n to temp hide the search results
nnoremap <leader>n :noh<CR>

" Run tabular with \t
nnoremap <leader>T :Tabularize /
" Start interactive EasyAlign in visual mode (e.g. vipga)
xmap ga <Plug>(EasyAlign)

" Set f5 and \u as hotkeys to show Undo Tree
nnoremap <F5> :UndotreeToggle<CR>
nnoremap <leader>u :UndotreeToggle<CR>
" Start interactive EasyAlign for a motion/text object (e.g. gaip)
nmap ga <Plug>(EasyAlign)

" Set f3 as hotkey to show Hidden characters
nnoremap <F3> :set list!<CR>


@@ 294,12 196,6 @@ nnoremap <leader>s :set spell!<CR>
" Map %% to return my current working directory
cnoremap %% <C-R>=expand('%:h').'/'<cr>

" response time
set updatetime=100

" Switch focus to undotree on toggle
let g:undotree_SetFocusWhenToggle = 1

" Enable battery statusline
let g:airline_section_y = '%{battery#component()}'
let g:battery#component_format = "%s %v%"


@@ 317,8 213,10 @@ let g:gitgutter_sign_modified_removed='┃'
nnoremap <expr> j v:count ? (v:count > 5 ? "m'" . v:count : '') . 'j' : 'gj'
nnoremap <expr> k v:count ? (v:count > 5 ? "m'" . v:count : '') . 'k' : 'gk'

" vim-go is used instead of coc-nvim, but there's a few settings to change to
" make it a more seamless transition
" vim-visual-multi
let g:VM_leader = "\,"

" vim-go
let g:go_doc_popup_window = 1
let g:go_highlight_types = 1
let g:go_highlight_fields = 1


@@ 326,10 224,58 @@ let g:go_highlight_functions = 1
let g:go_highlight_function_calls = 1
let g:go_highlight_build_constraints = 1
autocmd FileType go nmap <leader>t <Plug>(go-test)
autocmd FileType go nmap <leader>r <Plug>(go-run-vertical)
autocmd Filetype go command! -bang A call go#alternate#Switch(<bang>1, 'edit')
autocmd Filetype go command! -bang AV call go#alternate#Switch(<bang>1, 'vsplit')
autocmd Filetype go command! -bang AS call go#alternate#Switch(<bang>1, 'split')
autocmd Filetype go command! -bang AT call go#alternate#Switch(<bang>1, 'tabe')

" vim-visual-multi
let g:VM_leader = "\,"
" nvim-lspconfig
lua << EOF
local nvim_lsp = require('lspconfig')

-- Use an on_attach function to only map the following keys
-- after the language server attaches to the current buffer
local on_attach = function(client, bufnr)
  local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end
  local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end

  -- Enable completion triggered by <c-x><c-o>
  buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc')

  -- Mappings.
  local opts = { noremap=true, silent=true }

  -- See `:help vim.lsp.*` for documentation on any of the below functions
  buf_set_keymap('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<CR>', opts)
  buf_set_keymap('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<CR>', opts)
  buf_set_keymap('n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>', opts)
  buf_set_keymap('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts)
  buf_set_keymap('n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts)
  buf_set_keymap('n', '<space>wa', '<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>', opts)
  buf_set_keymap('n', '<space>wr', '<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>', opts)
  buf_set_keymap('n', '<space>wl', '<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>', opts)
  buf_set_keymap('n', '<space>D', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts)
  buf_set_keymap('n', '<space>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
  buf_set_keymap('n', '<space>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>', opts)
  buf_set_keymap('n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts)
  buf_set_keymap('n', '<space>e', '<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>', opts)
  buf_set_keymap('n', '[d', '<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>', opts)
  buf_set_keymap('n', ']d', '<cmd>lua vim.lsp.diagnostic.goto_next()<CR>', opts)
  buf_set_keymap('n', '<space>q', '<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>', opts)
  buf_set_keymap('n', '<space>f', '<cmd>lua vim.lsp.buf.formatting()<CR>', opts)

end

-- Use a loop to conveniently call 'setup' on multiple servers and
-- map buffer local keybindings when the language server attaches
local servers = { 'clangd' }
for _, lsp in ipairs(servers) do
  nvim_lsp[lsp].setup {
    on_attach = on_attach,
    flags = {
      debounce_text_changes = 150,
    }
  }
end
EOF

D neovim/.config/nvim/pack/plugins/start/battery => neovim/.config/nvim/pack/plugins/start/battery +0 -1
@@ 1,1 0,0 @@
Subproject commit 9e93f4a0dcb3192894768ed80fe94398513830f6

D neovim/.config/nvim/pack/plugins/start/coc => neovim/.config/nvim/pack/plugins/start/coc +0 -1
@@ 1,1 0,0 @@
Subproject commit 287c743c9f227fdf0e1db452bbb8ae3c5caffc36

D neovim/.config/nvim/pack/plugins/start/ctrlsf.vim => neovim/.config/nvim/pack/plugins/start/ctrlsf.vim +0 -1
@@ 1,1 0,0 @@
Subproject commit dad53de2a58597d6bfbd873caa4455fb66144135

D neovim/.config/nvim/pack/plugins/start/fzf => neovim/.config/nvim/pack/plugins/start/fzf +0 -1
@@ 1,1 0,0 @@
Subproject commit 980cd074395110964b66bfbc5c1f1ee237be3c86

D neovim/.config/nvim/pack/plugins/start/gx-extended => neovim/.config/nvim/pack/plugins/start/gx-extended +0 -1
@@ 1,1 0,0 @@
Subproject commit a88e9b60b0b392de778d2843ab0ab9bbcfcc2377

D neovim/.config/nvim/pack/plugins/start/splitjoin => neovim/.config/nvim/pack/plugins/start/splitjoin +0 -1
@@ 1,1 0,0 @@
Subproject commit a27352edee29fad650f129a41908bc62efc82978

D neovim/.config/nvim/pack/plugins/start/tabular => neovim/.config/nvim/pack/plugins/start/tabular +0 -1
@@ 1,1 0,0 @@
Subproject commit 339091ac4dd1f17e225fe7d57b48aff55f99b23a

D neovim/.config/nvim/pack/plugins/start/undotree => neovim/.config/nvim/pack/plugins/start/undotree +0 -1
@@ 1,1 0,0 @@
Subproject commit 1cc3b9069e4356efd4ce1c3c4bdbb227fb54e1e5

D neovim/.config/nvim/pack/plugins/start/vim-airline => neovim/.config/nvim/pack/plugins/start/vim-airline +0 -1
@@ 1,1 0,0 @@
Subproject commit 2e29ab965625d1315f0ad070c928794baea3d66f

D neovim/.config/nvim/pack/plugins/start/vim-airline-themes => neovim/.config/nvim/pack/plugins/start/vim-airline-themes +0 -1
@@ 1,1 0,0 @@
Subproject commit 97cf3e6e638f936187d5f6e9b5eb1bdf0a4df256

D neovim/.config/nvim/pack/plugins/start/vim-commentary => neovim/.config/nvim/pack/plugins/start/vim-commentary +0 -1
@@ 1,1 0,0 @@
Subproject commit 349340debb34f6302931f0eb7139b2c11dfdf427

D neovim/.config/nvim/pack/plugins/start/vim-dirvish => neovim/.config/nvim/pack/plugins/start/vim-dirvish +0 -1
@@ 1,1 0,0 @@
Subproject commit b2b5709b7979bb99b0548d5879c49672891b9b5b

D neovim/.config/nvim/pack/plugins/start/vim-eunuch => neovim/.config/nvim/pack/plugins/start/vim-eunuch +0 -1
@@ 1,1 0,0 @@
Subproject commit e8b1be581b88de524fc62cd24265d602f8caac19

D neovim/.config/nvim/pack/plugins/start/vim-floaterm => neovim/.config/nvim/pack/plugins/start/vim-floaterm +0 -1
@@ 1,1 0,0 @@
Subproject commit 9716765f2af3415ad1f9091a50c334649a74e4c5

D neovim/.config/nvim/pack/plugins/start/vim-fugitive => neovim/.config/nvim/pack/plugins/start/vim-fugitive +0 -1
@@ 1,1 0,0 @@
Subproject commit e2927fb4676b499931a3c27a2dc8a8a8bc52ab55

D neovim/.config/nvim/pack/plugins/start/vim-gitgutter => neovim/.config/nvim/pack/plugins/start/vim-gitgutter +0 -1
@@ 1,1 0,0 @@
Subproject commit 256702dd1432894b3607d3de6cd660863b331818

D neovim/.config/nvim/pack/plugins/start/vim-go => neovim/.config/nvim/pack/plugins/start/vim-go +0 -1
@@ 1,1 0,0 @@
Subproject commit 4a429a0fc85c2a95b24544373516fdee805c3a56

D neovim/.config/nvim/pack/plugins/start/vim-godot => neovim/.config/nvim/pack/plugins/start/vim-godot +0 -1
@@ 1,1 0,0 @@
Subproject commit 07ae57de6f48cd8b11a12128b7000e5bd871315a

D neovim/.config/nvim/pack/plugins/start/vim-hexokinase => neovim/.config/nvim/pack/plugins/start/vim-hexokinase +0 -1
@@ 1,1 0,0 @@
Subproject commit 62324b43ea858e268fb70665f7d012ae67690f43

D neovim/.config/nvim/pack/plugins/start/vim-highlightedyank => neovim/.config/nvim/pack/plugins/start/vim-highlightedyank +0 -1
@@ 1,1 0,0 @@
Subproject commit 931cc6bd53e4a1fdbe592751f0e13c0e401f0a49

D neovim/.config/nvim/pack/plugins/start/vim-hugo-helper => neovim/.config/nvim/pack/plugins/start/vim-hugo-helper +0 -1
@@ 1,1 0,0 @@
Subproject commit 4c776e62f928338162b41152f53052a8311a2f4b

D neovim/.config/nvim/pack/plugins/start/vim-repeat => neovim/.config/nvim/pack/plugins/start/vim-repeat +0 -1
@@ 1,1 0,0 @@
Subproject commit 24afe922e6a05891756ecf331f39a1f6743d3d5a

D neovim/.config/nvim/pack/plugins/start/vim-speeddating => neovim/.config/nvim/pack/plugins/start/vim-speeddating +0 -1
@@ 1,1 0,0 @@
Subproject commit 95da3d72efc91a5131acf388eafa4b1ad6512a9b

D neovim/.config/nvim/pack/plugins/start/vim-surround => neovim/.config/nvim/pack/plugins/start/vim-surround +0 -1
@@ 1,1 0,0 @@
Subproject commit f51a26d3710629d031806305b6c8727189cd1935

D neovim/.config/nvim/pack/plugins/start/vim-tmux-navigator => neovim/.config/nvim/pack/plugins/start/vim-tmux-navigator +0 -1
@@ 1,1 0,0 @@
Subproject commit 0cabb1ef01af0986b7bf6fb7acf631debdbbb470

D neovim/.config/nvim/pack/plugins/start/vim-toml => neovim/.config/nvim/pack/plugins/start/vim-toml +0 -1
@@ 1,1 0,0 @@
Subproject commit 3c5face8e8944a217af45bc5bb708ff7dfcf1a54

D neovim/.config/nvim/pack/plugins/start/vim-visual-multi => neovim/.config/nvim/pack/plugins/start/vim-visual-multi +0 -1
@@ 1,1 0,0 @@
Subproject commit e20908963d9b0114e5da1eacbc516e4b09cf5803

D neovim/.config/nvim/pack/plugins/start/visual-star-search => neovim/.config/nvim/pack/plugins/start/visual-star-search +0 -1
@@ 1,1 0,0 @@
Subproject commit 7c32edb9e3c85d473d9be4dec721a4c9d5d4d69c

D neovim/.config/nvim/pack/plugins/start/wiki-ft.vim => neovim/.config/nvim/pack/plugins/start/wiki-ft.vim +0 -1
@@ 1,1 0,0 @@
Subproject commit 03447a72c0cfce56c605f654fa23f396ddf1ac5b

D neovim/.config/nvim/pack/plugins/start/wiki.vim => neovim/.config/nvim/pack/plugins/start/wiki.vim +0 -1
@@ 1,1 0,0 @@
Subproject commit 0f1a42eb65bc0435d5f573753deb7da010fe9761

D neovim/.config/nvim/pack/themes/start/black-pastel => neovim/.config/nvim/pack/themes/start/black-pastel +0 -1
@@ 1,1 0,0 @@
Subproject commit ce0f2eeedb6d9d7448cad366c40f3bb6aef7e8bb

D neovim/.config/nvim/pack/themes/start/light-pastel => neovim/.config/nvim/pack/themes/start/light-pastel +0 -1
@@ 1,1 0,0 @@
Subproject commit 1b5b7ddecf7d58941b65e6ac871445e6a414069d