diff --git a/.xinitrc b/.config/X11/xinitrc
similarity index 100%
rename from .xinitrc
rename to .config/X11/xinitrc
diff --git a/.config/alacritty.yml b/.config/alacritty.yml
index 8376d4e..33cf665 100644
--- a/.config/alacritty.yml
+++ b/.config/alacritty.yml
@@ -17,19 +17,19 @@ scrolling:
# Font configuration
font:
normal:
- family: JetBrainsMono Nerd Font
+ family: PragmataPro Mono Liga
style: Regular
italic:
- family: JetBrainsMono Nerd Font
+ family: PragmataPro Mono Liga
style: Italic
bold:
- family: JetBrainsMono Nerd Font
+ family: PragmataPro Mono Liga
style: Bold
# Point size
- size: 10
+ size: 11
# Offset is the extra space around each character. `offset.y` can be thought of
# as modifying the line spacing, and `offset.x` as modifying the letter spacing.
@@ -67,7 +67,7 @@ colors:
cyan: '#6fc3df'
white: '#fcfcfc'
-background_opacity: 1
+background_opacity: 0.92
selection:
semantic_escape_chars: ""
diff --git a/.config/fontconfig/fonts.conf b/.config/fontconfig/fonts.conf
index 9476f4e..107f5f9 100644
--- a/.config/fontconfig/fonts.conf
+++ b/.config/fontconfig/fonts.conf
@@ -22,13 +22,6 @@
Noto Color Emoji
-
- monospace
-
- NotoSansMono Nerd Font
- Noto Color Emoji
-
-
diff --git a/.config/git/config b/.config/git/config
index d1e8785..a23a13c 100644
--- a/.config/git/config
+++ b/.config/git/config
@@ -1,3 +1,6 @@
+[alias]
+ st = status
+
[hub]
protocol = ssh
@@ -25,11 +28,30 @@
autocrlf = input
whitespace = warn
excludesfile = /home/deadguy/.config/git/gitignore
- pager = delta --plus-color="#012800" --minus-color="#340001"
+ pager = delta
[interactive]
diffFilter = delta --color-only
+[delta]
+ features = side-by-side line-numbers decorations
+ syntax-theme = Dracula
+ plus-style = syntax "#003800"
+ minus-style = syntax "#3f0001"
+ whitespace-error-style = 22 reverse
+
+[delta "decorations"]
+ commit-decoration-style = bold yellow box ul
+ file-style = bold yellow ul
+ file-decoration-style = none
+ hunk-header-decoration-style = cyan box ul
+
+[delta "line-numbers"]
+ line-numbers-left-style = cyan
+ line-numbers-right-style = cyan
+ line-numbers-minus-style = 124
+ line-numbers-plus-style = 28
+
[web]
browser = firefox
@@ -45,6 +67,7 @@
[diff]
tool = nvr
+ colorMoved = default
[difftool "nvr"]
cmd = nvr -s -d $LOCAL $REMOTE
diff --git a/.config/ncmpcpp/config b/.config/ncmpcpp/config
index 52b3218..c3fda5e 100644
--- a/.config/ncmpcpp/config
+++ b/.config/ncmpcpp/config
@@ -24,7 +24,7 @@ empty_tag_color = blue
state_flags_color = red
# SONG
-song_list_format = "$5{$4%a}|{$8} {$8%t}|{$2►$2}|{$5►$8 %f} $R {$7%l}"
+song_list_format = "$5{$4%a}|{$8} {$8%t}|{$2►$2}|{$5►$8 %f} $R {$7%l}"
song_status_format = {$8%b}|{$6 "%a"}$8
song_window_title_format = "{%a - }{%t}|{%f}"
song_columns_list_format = "(30)[blue]{a} (40)[red]{t|f} (30)[cyan]{br} (4f)[green]{lr}"
diff --git a/.config/nvim/after/ftplugin/css.vim b/.config/nvim/after/ftplugin/css.vim
new file mode 100644
index 0000000..cb50a73
--- /dev/null
+++ b/.config/nvim/after/ftplugin/css.vim
@@ -0,0 +1,2 @@
+let b:ale_linters = ['stylelint']
+let b:ale_fixers = ['stylelint']
diff --git a/.config/nvim/ftplugin/foxdot.vim b/.config/nvim/after/ftplugin/foxdot.vim
similarity index 100%
rename from .config/nvim/ftplugin/foxdot.vim
rename to .config/nvim/after/ftplugin/foxdot.vim
diff --git a/.config/nvim/ftplugin/help.vim b/.config/nvim/after/ftplugin/help.vim
similarity index 100%
rename from .config/nvim/ftplugin/help.vim
rename to .config/nvim/after/ftplugin/help.vim
diff --git a/.config/nvim/after/ftplugin/html.vim b/.config/nvim/after/ftplugin/html.vim
new file mode 100644
index 0000000..77325c5
--- /dev/null
+++ b/.config/nvim/after/ftplugin/html.vim
@@ -0,0 +1,2 @@
+let b:ale_linters = ['prettier_standard']
+let b:ale_fixers = ['prettier_standard']
diff --git a/.config/nvim/after/ftplugin/javascript.vim b/.config/nvim/after/ftplugin/javascript.vim
new file mode 100644
index 0000000..d8c92bf
--- /dev/null
+++ b/.config/nvim/after/ftplugin/javascript.vim
@@ -0,0 +1,2 @@
+let b:ale_linters = ['prettier_standard']
+let g:ale_fixers = ['prettier_standard']
diff --git a/.config/nvim/after/ftplugin/json.vim b/.config/nvim/after/ftplugin/json.vim
new file mode 100644
index 0000000..77325c5
--- /dev/null
+++ b/.config/nvim/after/ftplugin/json.vim
@@ -0,0 +1,2 @@
+let b:ale_linters = ['prettier_standard']
+let b:ale_fixers = ['prettier_standard']
diff --git a/.config/nvim/after/ftplugin/jsx.vim b/.config/nvim/after/ftplugin/jsx.vim
new file mode 100644
index 0000000..77325c5
--- /dev/null
+++ b/.config/nvim/after/ftplugin/jsx.vim
@@ -0,0 +1,2 @@
+let b:ale_linters = ['prettier_standard']
+let b:ale_fixers = ['prettier_standard']
diff --git a/.config/nvim/ftplugin/mail.vim b/.config/nvim/after/ftplugin/mail.vim
similarity index 100%
rename from .config/nvim/ftplugin/mail.vim
rename to .config/nvim/after/ftplugin/mail.vim
diff --git a/.config/nvim/after/ftplugin/make.vim b/.config/nvim/after/ftplugin/make.vim
new file mode 100644
index 0000000..bbd8967
--- /dev/null
+++ b/.config/nvim/after/ftplugin/make.vim
@@ -0,0 +1 @@
+setlocal noexpandtab
diff --git a/.config/nvim/ftplugin/man.vim b/.config/nvim/after/ftplugin/man.vim
similarity index 100%
rename from .config/nvim/ftplugin/man.vim
rename to .config/nvim/after/ftplugin/man.vim
diff --git a/.config/nvim/after/ftplugin/markdown.vim b/.config/nvim/after/ftplugin/markdown.vim
new file mode 100644
index 0000000..a2f9733
--- /dev/null
+++ b/.config/nvim/after/ftplugin/markdown.vim
@@ -0,0 +1,21 @@
+setlocal nonumber norelativenumber laststatus=0 showmode
+setlocal signcolumn=no textwidth=80 wrap sw=2
+setlocal tabstop=2 expandtab softtabstop=2 linebreak
+setlocal autoindent noruler colorcolumn=80
+setlocal spell spelllang=es,en_us,cjk
+set complete+=kspell
+
+" Spellcheck
+nnoremap [s
+nnoremap ]s
+nnoremap z=
+nnoremap z=1
+nnoremap zg
+
+" Todo list
+nnoremap i-[]
+nnoremap :.s/\[\]/\[x\]
+inoremap -[]
+inoremap :.s/\[\]/\[x\]
+
+let b:ale_fixers = ['prettier_standard']
diff --git a/.config/nvim/after/ftplugin/scss.vim b/.config/nvim/after/ftplugin/scss.vim
new file mode 100644
index 0000000..cb50a73
--- /dev/null
+++ b/.config/nvim/after/ftplugin/scss.vim
@@ -0,0 +1,2 @@
+let b:ale_linters = ['stylelint']
+let b:ale_fixers = ['stylelint']
diff --git a/.config/nvim/ftplugin/sh.vim b/.config/nvim/after/ftplugin/sh.vim
similarity index 88%
rename from .config/nvim/ftplugin/sh.vim
rename to .config/nvim/after/ftplugin/sh.vim
index d2a883f..1063e35 100644
--- a/.config/nvim/ftplugin/sh.vim
+++ b/.config/nvim/after/ftplugin/sh.vim
@@ -7,3 +7,4 @@ endif
let b:sh_indent_options['continuation-line'] = 4
let b:ale_linters = ['shellcheck']
+let b:ale_fixers = ['shfmt']
diff --git a/.config/nvim/after/ftplugin/typescript.vim b/.config/nvim/after/ftplugin/typescript.vim
new file mode 100644
index 0000000..9ac19ee
--- /dev/null
+++ b/.config/nvim/after/ftplugin/typescript.vim
@@ -0,0 +1,3 @@
+let b:ale_linters = ['tsserver', 'eslint']
+let b:ale_fixers = ['prettier_standard']
+
diff --git a/.config/nvim/after/ftplugin/vim.vim b/.config/nvim/after/ftplugin/vim.vim
new file mode 100644
index 0000000..cad5b94
--- /dev/null
+++ b/.config/nvim/after/ftplugin/vim.vim
@@ -0,0 +1 @@
+let b:ale_linters = ['vint']
diff --git a/.config/nvim/after/plugin/color.vim b/.config/nvim/after/plugin/color.vim
new file mode 100644
index 0000000..96696be
--- /dev/null
+++ b/.config/nvim/after/plugin/color.vim
@@ -0,0 +1,19 @@
+highlight! VertSplit ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=#080808 gui=NONE
+highlight! TabLineFill ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=#ef2f27 gui=NONE
+highlight! TablineSel ctermbg=NONE ctermfg=234 guibg=NONE guifg=#008bbd
+highlight! CocWarningHighlight ctermfg=4 cterm=undercurl guifg=#c4ab39 gui=undercurl
+highlight! CocErrorHighlight ctermfg=red cterm=undercurl guifg=#c4384b gui=undercurl
+highlight! CocUnderline cterm=undercurl gui=undercurl
+highlight! PmenuSel guibg=#111111 guifg=#6699cc
+highlight! Folded ctermbg=NONE guibg=NONE
+highlight! RedrawDebugClear guibg=#080808
+highlight! NvimInternalError guifg=#080808
+highlight! DiffAdded guifg=#333333
+highlight! PmenuThumb guifg=#333333
+highlight! link CocErrorSign WarningMsg
+highlight! link CocWarningSign Number
+highlight! link CocInfoSign Type
+
+if &diff
+ highlight! link DiffText MatchParen
+endif
diff --git a/.config/nvim/after/plugin/vim-jsx.vim b/.config/nvim/after/plugin/vim-jsx.vim
new file mode 100644
index 0000000..8a4fa1f
--- /dev/null
+++ b/.config/nvim/after/plugin/vim-jsx.vim
@@ -0,0 +1,11 @@
+" Stop the vim-jsx plug-in from aggressively blowing away our ftdetection.
+"
+" Without something like this, our ftdetect/{jest,jsx}.vim config will
+" set the filetype in test files to "javascript.jest" or
+" "javascript.jest.jsx", but then vim-jsx will come along and unconditionally
+" set it to "javascript.jsx", which isn't helpful. Currently I'm not working in
+" any projects that use a ".jsx" extension so this workaround is viable
+" (unfortunately, there's no other mechanism for disabling this functionality in
+" vim-jsx).
+let g:jsx_ext_required=1
+let g:vim_jsx_pretty_colorful_config = 1
diff --git a/.config/nvim/autoload/dead/functions.vim b/.config/nvim/autoload/dead/functions.vim
new file mode 100644
index 0000000..09f407f
--- /dev/null
+++ b/.config/nvim/autoload/dead/functions.vim
@@ -0,0 +1,18 @@
+function! dead#functions#MyHighlights() abort
+ highlight Trail ctermbg=red guibg=red
+ call matchadd('Trail', '\s\+$', 100)
+ highlight ColorColumn ctermbg=magenta
+ call matchadd('ColorColumn', '\%81v', 100)
+endfunction
+
+function! dead#functions#PopOutOfInsertMode() abort
+ if v:insertmode
+ call feedkeys("\\")
+ endif
+endfunction
+
+function! dead#functions#Relativize(v) abort
+ if &number
+ let &relativenumber = a:v
+ endif
+endfunction
diff --git a/.config/nvim/autoload/dead/statusline.vim b/.config/nvim/autoload/dead/statusline.vim
new file mode 100644
index 0000000..06d233a
--- /dev/null
+++ b/.config/nvim/autoload/dead/statusline.vim
@@ -0,0 +1,79 @@
+function! dead#statusline#ModeColor() abort
+ return get(g:modes, mode(), '%*')[0]
+endfunction
+
+function! dead#statusline#CurrentMode() abort
+ return ' ' . get(g:modes, mode(), '-')[1] . ' '
+endfunction
+
+function! dead#statusline#StatusLine() abort
+ let l:statusline=''
+ let l:statusline.=dead#statusline#ModeColor()
+ let l:statusline.=dead#statusline#CurrentMode()
+ let l:statusline.=dead#statusline#LinePasteMode()
+ let l:statusline.='%<'
+ let l:statusline.='%1* '
+ let l:statusline.='%= '
+ let l:statusline.=coc#status()
+ let l:statusline.=dead#statusline#LinterStatus()
+ let l:statusline.='%3* %p%% %c '
+ let l:statusline.=''
+ return l:statusline
+endfunction
+
+function! dead#statusline#StatusLineNC() abort
+ let l:statusline=''
+ let l:statusline.='%t'
+ let l:statusline.='%<'
+ let l:statusline.='%= '
+ return l:statusline
+endfunction
+
+function! dead#statusline#HelpStatusLine() abort
+ let l:statusline=''
+ let l:statusline.= '%#error#[HELP] %t '
+ let l:statusline.='%1* '
+ let l:statusline.='%<'
+ let l:statusline.='%= '
+ let l:statusline.=' %p%% '
+ return l:statusline
+endfunction
+
+function! dead#statusline#UpdateInactiveWindows()
+ for winnum in range(1, winnr('$'))
+ if winnum != winnr()
+ call setwinvar(winnum, '&statusline', '%!dead#statusline#StatusLineNC()')
+ endif
+ endfor
+endfunction
+
+function! dead#statusline#RefreshStatusLine(mode)
+ if (a:mode == "active" && &filetype !=? 'help')
+ setlocal statusline=%!dead#statusline#StatusLine()
+ else
+ setlocal statusline=%!dead#statusline#StatusLineNC()
+ endif
+ if &filetype ==? 'help'
+ setlocal statusline=%!dead#statusline#HelpStatusLine()
+ endif
+endfunction
+
+function! dead#statusline#LinterStatus() abort
+ let l:counts = ale#statusline#Count(bufnr(''))
+ let l:all_errors = l:counts.error + l:counts.style_error
+ let l:all_non_errors = l:counts.total - l:all_errors
+ return l:counts.total == 0 ? '' : printf(
+ \ ' :%d :%d ',
+ \ l:all_non_errors,
+ \ l:all_errors
+ \)
+endfunction
+
+function! dead#statusline#LinePasteMode() abort
+ let paste_status = &paste
+ if paste_status == 1
+ return ' paste '
+ else
+ return ''
+ endif
+endfunction
diff --git a/.config/nvim/autoload/dead/tabline.vim b/.config/nvim/autoload/dead/tabline.vim
new file mode 100644
index 0000000..fa29862
--- /dev/null
+++ b/.config/nvim/autoload/dead/tabline.vim
@@ -0,0 +1,28 @@
+scriptencoding utf-8
+
+function! dead#tabline#Tabline() abort
+ let s = ''
+ for i in range(tabpagenr('$'))
+ let tab = i + 1
+ let winnr = tabpagewinnr(tab)
+ let buflist = tabpagebuflist(tab)
+ let bufnr = buflist[winnr - 1]
+ let bufname = bufname(bufnr)
+ let bufmodified = getbufvar(bufnr, '&mod')
+
+ let s .= '%' . tab . 'T'
+ let s .= (tab == tabpagenr() ? '%#TabLineSel#' : '%#TabLine#')
+ let s .= ' ' . tab .':'
+ let s .= (bufname !=? '' ? fnamemodify(bufname, ':t') . ' ' : '[Untitled] ')
+
+ if bufmodified
+ let s .= ' + '
+ endif
+ endfor
+
+ let s .= '%#TabLineFill#'
+ if (exists('g:tablineclosebutton'))
+ let s .= '%=%999XX'
+ endif
+ return s
+endfunction
diff --git a/.config/nvim/ftdetect/arduino.vim b/.config/nvim/ftdetect/arduino.vim
deleted file mode 100644
index 75d2148..0000000
--- a/.config/nvim/ftdetect/arduino.vim
+++ /dev/null
@@ -1 +0,0 @@
-au BufRead,BufNewFile *.ino setlocal ft=arduino
diff --git a/.config/nvim/ftdetect/foxdot.vim b/.config/nvim/ftdetect/foxdot.vim
deleted file mode 100644
index aa031a9..0000000
--- a/.config/nvim/ftdetect/foxdot.vim
+++ /dev/null
@@ -1 +0,0 @@
-autocmd BufRead,BufNewFile *.foxdot setfiletype foxdot
diff --git a/.config/nvim/ftdetect/gdscript.vim b/.config/nvim/ftdetect/gdscript.vim
deleted file mode 100644
index d50f678..0000000
--- a/.config/nvim/ftdetect/gdscript.vim
+++ /dev/null
@@ -1 +0,0 @@
-au BufNewFile,BufRead *.gd set filetype=gdscript
diff --git a/.config/nvim/ftdetect/ignore.vim b/.config/nvim/ftdetect/ignore.vim
new file mode 100644
index 0000000..47c1ecf
--- /dev/null
+++ b/.config/nvim/ftdetect/ignore.vim
@@ -0,0 +1 @@
+autocmd BufNewFile,BufRead .eslintignore,.gitignore,.prettierignore set filetype=ignore
diff --git a/.config/nvim/ftdetect/jest.vim b/.config/nvim/ftdetect/jest.vim
new file mode 100644
index 0000000..7cf02ed
--- /dev/null
+++ b/.config/nvim/ftdetect/jest.vim
@@ -0,0 +1,18 @@
+autocmd FileType * call s:Test()
+
+function! s:Test()
+ if match(&filetype, '\v') == -1
+ return
+ endif
+
+ if match(&filetype, '\v') != -1
+ return
+ endif
+
+ let l:file=expand('')
+
+ if match(l:file, '\v(_spec|Spec|-test|\.test)\.(js|jsx|ts|tsx)$') != -1 ||
+ \ match(l:file, '\v/__tests__|tests?/.+\.(js|jsx|ts|tsx)$') != -1
+ noautocmd set filetype+=.jest
+ endif
+endfunction
diff --git a/.config/nvim/ftdetect/jsx.vim b/.config/nvim/ftdetect/jsx.vim
new file mode 100644
index 0000000..e948ae5
--- /dev/null
+++ b/.config/nvim/ftdetect/jsx.vim
@@ -0,0 +1,31 @@
+function! s:ScanFile()
+ let n = 1
+ let nmax = line('$')
+ if line('$') > 500
+ let nmax = 500
+ endif
+ while n < nmax
+ if getline(n) =~# "\\v"
+ return 1
+ break
+ endif
+ let n = n + 1
+ endwhile
+ return 0
+endfunction
+
+function! s:DetectJSX()
+ if match(&filetype, '\v') != -1
+ return
+ endif
+ if s:ScanFile()
+ call s:SetJSX()
+ endif
+endfunction
+
+function! s:SetJSX()
+ noautocmd set filetype+=.jsx
+endfunction
+
+autocmd BufNewFile,BufRead *.js.jsx,*.jsx call s:SetJSX()
+autocmd BufNewFile,BufRead *.html,*.js call s:DetectJSX()
diff --git a/.config/nvim/ftdetect/logfile.vim b/.config/nvim/ftdetect/logfile.vim
deleted file mode 100644
index 3c7220c..0000000
--- a/.config/nvim/ftdetect/logfile.vim
+++ /dev/null
@@ -1,14 +0,0 @@
-" Auto-detect a NeoMutt log file
-
-autocmd BufRead * call neomutt_log()
-
-function! s:neomutt_log()
- let match = '\v^\[\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d\] NeoMutt'
-
- let line = getline (1)
- if (line !~ match)
- return
- endif
-
- set filetype=neomuttlog
-endfunction
diff --git a/.config/nvim/ftdetect/mail.vim b/.config/nvim/ftdetect/mail.vim
deleted file mode 100644
index 6cbf23f..0000000
--- a/.config/nvim/ftdetect/mail.vim
+++ /dev/null
@@ -1 +0,0 @@
-au BufNewFile,BufRead neomutt-*-\w\+,neomutt[[:alnum:]_-]\\\{6\} set filetype=mail
diff --git a/.config/nvim/ftdetect/mutt.vim b/.config/nvim/ftdetect/mutt.vim
deleted file mode 100644
index f386a1d..0000000
--- a/.config/nvim/ftdetect/mutt.vim
+++ /dev/null
@@ -1,2 +0,0 @@
-" Set filetype to muttrc for files with .mutt extension.
-autocmd BufNewFile,BufRead *.mutt setfiletype muttrc
diff --git a/.config/nvim/ftdetect/neomuttrc.vim b/.config/nvim/ftdetect/neomuttrc.vim
deleted file mode 100644
index 6dec2f3..0000000
--- a/.config/nvim/ftdetect/neomuttrc.vim
+++ /dev/null
@@ -1 +0,0 @@
-au BufNewFile,BufRead [Nn]eomuttrc,.neomuttrc,.neomutt/*muttrc,.config/neomutt/*muttrc set filetype=neomuttrc
diff --git a/.config/nvim/ftdetect/supercollider.vim b/.config/nvim/ftdetect/supercollider.vim
deleted file mode 100644
index bd3c62e..0000000
--- a/.config/nvim/ftdetect/supercollider.vim
+++ /dev/null
@@ -1 +0,0 @@
-au BufRead,BufNewFile *.scd,*.sc setlocal ft=supercollider
diff --git a/.config/nvim/ftdetect/sxhkdrc.vim b/.config/nvim/ftdetect/sxhkdrc.vim
deleted file mode 100644
index 4f49476..0000000
--- a/.config/nvim/ftdetect/sxhkdrc.vim
+++ /dev/null
@@ -1,5 +0,0 @@
-if &compatible || v:version < 603
- finish
-endif
-
-autocmd BufNewFile,BufRead sxhkdrc,*.sxhkdrc set ft=sxhkdrc
diff --git a/.config/nvim/ftdetect/tsx.vim b/.config/nvim/ftdetect/tsx.vim
new file mode 100644
index 0000000..d86193a
--- /dev/null
+++ b/.config/nvim/ftdetect/tsx.vim
@@ -0,0 +1,5 @@
+function! s:SetTSX()
+ noautocmd set filetype+=.tsx
+endfunction
+
+autocmd BufNewFile,BufRead *.tsx call s:SetTSX()
diff --git a/.config/nvim/ftplugin/arduino.vim b/.config/nvim/ftplugin/arduino.vim
deleted file mode 100644
index 0ba046e..0000000
--- a/.config/nvim/ftplugin/arduino.vim
+++ /dev/null
@@ -1,26 +0,0 @@
-if exists('b:did_ftplugin')
- finish
-endif
-let b:did_ftplugin = 1
-if !exists('g:arduino_did_initialize')
- call arduino#LoadCache()
- call arduino#InitializeConfig()
- let g:arduino_did_initialize = 1
-endif
-
-" Use C rules for indentation
-setl cindent
-
-call arduino#RebuildMakePrg()
-
-if g:arduino_auto_baud
- au BufReadPost,BufWritePost *.ino call arduino#SetAutoBaud()
-endif
-
-command! -buffer -bar -nargs=? ArduinoChooseBoard call arduino#ChooseBoard()
-command! -buffer -bar -nargs=? ArduinoChooseProgrammer call arduino#ChooseProgrammer()
-command! -buffer -bar ArduinoVerify call arduino#Verify()
-command! -buffer -bar ArduinoUpload call arduino#Upload()
-command! -buffer -bar ArduinoSerial call arduino#Serial()
-command! -buffer -bar ArduinoUploadAndSerial call arduino#UploadAndSerial()
-command! -buffer -bar -nargs=? ArduinoChoosePort call arduino#ChoosePort()
diff --git a/.config/nvim/ftplugin/csh.vim b/.config/nvim/ftplugin/csh.vim
deleted file mode 100644
index 433e4cb..0000000
--- a/.config/nvim/ftplugin/csh.vim
+++ /dev/null
@@ -1,11 +0,0 @@
-setl ts=4
-setl sts=4
-setl sw=4
-setl noet
-setl tw=90
-
-if !exists("b:sh_indent_options")
- let b:sh_indent_options = {}
-endif
-
-let b:sh_indent_options['continuation-line'] = 4
\ No newline at end of file
diff --git a/.config/nvim/ftplugin/docx.vim b/.config/nvim/ftplugin/docx.vim
deleted file mode 100644
index 3831359..0000000
--- a/.config/nvim/ftplugin/docx.vim
+++ /dev/null
@@ -1,2 +0,0 @@
-autocmd BufReadPre *.docx set ro
-autocmd BufReadPost *.docx %!docx2txt.pl
\ No newline at end of file
diff --git a/.config/nvim/ftplugin/gitconfig.vim b/.config/nvim/ftplugin/gitconfig.vim
new file mode 100644
index 0000000..bbd8967
--- /dev/null
+++ b/.config/nvim/ftplugin/gitconfig.vim
@@ -0,0 +1 @@
+setlocal noexpandtab
diff --git a/.config/nvim/ftplugin/go.vim b/.config/nvim/ftplugin/go.vim
new file mode 100644
index 0000000..f9aafd3
--- /dev/null
+++ b/.config/nvim/ftplugin/go.vim
@@ -0,0 +1,3 @@
+setlocal noexpandtab
+setlocal shiftwidth=4
+setlocal tabstop=4
diff --git a/.config/nvim/ftplugin/javascriptreact.vim b/.config/nvim/ftplugin/javascriptreact.vim
new file mode 100644
index 0000000..47e5dda
--- /dev/null
+++ b/.config/nvim/ftplugin/javascriptreact.vim
@@ -0,0 +1,3 @@
+" Work around filetype that landed in upstream Vim here:
+" https://github.com/vim/vim/issues/4830
+execute 'noautocmd set filetype=' . substitute(&filetype, 'javascriptreact', 'javascript', '')
diff --git a/.config/nvim/ftplugin/json.vim b/.config/nvim/ftplugin/json.vim
new file mode 100644
index 0000000..080e567
--- /dev/null
+++ b/.config/nvim/ftplugin/json.vim
@@ -0,0 +1 @@
+let g:vim_json_syntax_conceal=0
diff --git a/.config/nvim/ftplugin/markdown.vim b/.config/nvim/ftplugin/markdown.vim
index 04ba07c..4271828 100644
--- a/.config/nvim/ftplugin/markdown.vim
+++ b/.config/nvim/ftplugin/markdown.vim
@@ -1,19 +1 @@
-setlocal nonumber norelativenumber laststatus=0 showmode
-setlocal signcolumn=no textwidth=80 wrap sw=2
-setlocal tabstop=2 expandtab softtabstop=2 linebreak
-setlocal autoindent noruler colorcolumn=80
-setlocal spell spelllang=es,en_us,cjk
-set complete+=kspell
-
-" Spellcheck
-nnoremap [s
-nnoremap ]s
-nnoremap z=
-nnoremap z=1
-nnoremap zg
-
-" Todo list
-nnoremap i-[]
-nnoremap :.s/\[\]/\[x\]
-inoremap -[]
-inoremap :.s/\[\]/\[x\]
+setlocal synmaxcol=0
diff --git a/.config/nvim/ftplugin/neomuttrc.vim b/.config/nvim/ftplugin/neomuttrc.vim
deleted file mode 100644
index 86f1cde..0000000
--- a/.config/nvim/ftplugin/neomuttrc.vim
+++ /dev/null
@@ -1,23 +0,0 @@
-" Vim filetype plugin file
-" Language: NeoMutt RC File
-" Previous Maintainer: Guillaume Brogi
-" Latest Revision: 2017-09-17
-" Original version copied from ftplugin/muttrc.vim
-
-if exists("b:did_ftplugin")
- finish
-endif
-let b:did_ftplugin = 1
-
-let s:cpo_save = &cpo
-set cpo&vim
-
-let b:undo_ftplugin = "setl com< cms< inc< fo<"
-
-setlocal comments=:# commentstring=#\ %s
-setlocal formatoptions-=t formatoptions+=croql
-
-let &l:include = '^\s*source\>'
-
-let &cpo = s:cpo_save
-unlet s:cpo_save
diff --git a/.config/nvim/ftplugin/python.vim b/.config/nvim/ftplugin/python.vim
deleted file mode 100644
index 19e789f..0000000
--- a/.config/nvim/ftplugin/python.vim
+++ /dev/null
@@ -1,35 +0,0 @@
-" Proper indentation for python files
-set fileformat=unix
-setlocal softtabstop=4 " Pressing tab during editing operations inserts 4 spaces
-setlocal tabstop=4
-setlocal shiftwidth=4 " Number of spaces used for each step of an (auto)indent action, e.g. '>>'.
-let python_highlight_all=1 " Enable python highlighting
-
-augroup PythonColorColumn
-autocmd!
- " When a Python file is read or the text changes in normal or insert mode,
- " draw a column marking the maximum line length if a line exceeds this length
- autocmd BufRead,TextChanged *.py call ShowColumnIfLineTooLong(80)
-augroup END
-
-" Color the column marking the lengthLimit when the longest line in the file
-" exceeds the lengthLimit
-function! ShowColumnIfLineTooLong(lengthLimit)
- " See https://stackoverflow.com/questions/2075276/longest-line-in-vim#2982789
- let maxLineLength = max(map(getline(1,'$'), 'len(v:val)'))
-
- if maxLineLength > a:lengthLimit
- " Draw the vertical line at the first letter that exceeds the limit
- execute "setlocal colorcolumn=" . (a:lengthLimit + 1)
- else
- setlocal colorcolumn=""
- endif
-endfunction
-
-augroup pystuff
- autocmd!
- autocmd BufNewFile *.py 0r ~/.config/nvim/templates/py.skeleton
-augroup END
-
-" Disable warnings about trailing whitespace for Python files.
-let b:ale_warn_about_trailing_whitespace = 0
diff --git a/.config/nvim/ftplugin/qf.vim b/.config/nvim/ftplugin/qf.vim
deleted file mode 100644
index 15fec7f..0000000
--- a/.config/nvim/ftplugin/qf.vim
+++ /dev/null
@@ -1,59 +0,0 @@
-scriptencoding UTF-8
-
-""
-" QuickFix custom foldtext expression.
-"
-" setlocal foldexpr=kutsan#ftplugin#qf#foldexpr()
-""
-function! qf#foldtext() abort
- let l:lines = v:foldend - v:foldstart + 1
- let l:file = substitute(getline(v:foldstart), '\v\c\|.+', '', '')
-
- return printf('%s [%s]', l:file, l:lines)
-endfunction
-
-""
-" QuickFix custom fold expression.
-"
-" setlocal foldtext=kutsan#ftplugin#qf#foldtext(v:lnum)
-"
-" @param {number} lnum Line number for the 'foldexpr'.
-""
-function! qf#foldexpr(lnum) abort
- if matchstr(getline(a:lnum), '\v\c^[^|]+') ==# matchstr(getline(a:lnum + 1), '\v\c^[^|]+')
- return 1
- else
- return '<1'
- endif
-endfunction
-
-" Disable built-in ftplugin.
-let b:did_ftplugin = v:true
-
-" Disable relative numbers and use just numbers.
-setlocal norelativenumber
-setlocal number
-
-" Use custom fold expression.
-setlocal foldmethod=expr
-setlocal foldexpr=qf#foldexpr(v:lnum)
-
-" Use custom foldtext.
-setlocal foldtext=qf#foldtext()
-
-" Start with all folds open.
-setlocal foldlevel=99
-
-" Make quickfix buffer hidden.
-setlocal nobuflisted
-
-" Set statusline.
-setlocal statusline=%{repeat('\ ',4)} " Generate space characters given number of times.
-setlocal statusline+= " Show a custom list icon.
-setlocal statusline+=%{repeat('\ ',1)}
-setlocal statusline+=%t " File name, either [Quickfix List] or [Location List].
-setlocal statusline+=%= " Align all items to right from this point on.
-setlocal statusline+=%{repeat('\ ',1)}
-setlocal statusline+=%l/%L " Current line number and total item count.
-setlocal statusline+=%{repeat('\ ',1)}
-
diff --git a/.config/nvim/ftplugin/typescriptreact.vim b/.config/nvim/ftplugin/typescriptreact.vim
new file mode 100644
index 0000000..330a824
--- /dev/null
+++ b/.config/nvim/ftplugin/typescriptreact.vim
@@ -0,0 +1,3 @@
+" Work around filetype that landed in upstream Vim here:
+" https://github.com/vim/vim/issues/4830
+execute 'noautocmd set filetype=' . substitute(&filetype, 'typescriptreact', 'typescript', '')
diff --git a/.config/nvim/ftplugin/zsh.vim b/.config/nvim/ftplugin/zsh.vim
deleted file mode 100644
index 7864e41..0000000
--- a/.config/nvim/ftplugin/zsh.vim
+++ /dev/null
@@ -1,13 +0,0 @@
-setl ts=4
-setl sts=4
-setl sw=4
-setl noet
-setl tw=90
-
-let b:ale_linters = ['shell']
-
-if !exists("b:sh_indent_options")
- let b:sh_indent_options = {}
-endif
-
-let b:sh_indent_options['continuation-line'] = 4
\ No newline at end of file
diff --git a/.config/nvim/indent/gdscript.vim b/.config/nvim/indent/gdscript.vim
deleted file mode 100644
index 098e1c1..0000000
--- a/.config/nvim/indent/gdscript.vim
+++ /dev/null
@@ -1,198 +0,0 @@
-" Vim indent file
-" Language: gdscript
-" Maintainer: Bram Moolenaar
-" Original Author: David Bustos
-" Last Change: 2013 Jul 9
-
-" Only load this indent file when no other was loaded.
-if exists("b:did_indent")
- finish
-endif
-let b:did_indent = 1
-
-" Some preliminary settings
-setlocal nolisp " Make sure lisp indenting doesn't supersede us
-setlocal autoindent " indentexpr isn't much help otherwise
-
-setlocal indentexpr=GetGdscriptIndent(v:lnum)
-setlocal indentkeys+=<:>,=elif,=except
-
-" Only define the function once.
-if exists("*get_gdscript_indent")
- finish
-endif
-let s:keepcpo= &cpo
-set cpo&vim
-
-" Come here when loading the script the first time.
-
-let s:maxoff = 50 " maximum number of lines to look backwards for ()
-
-function! GetGdscriptIndent(lnum)
-
- " if this line is explicitly joined: if the previous line was also joined,
- " line it up with that one, otherwise add two 'shiftwidth'
- if getline(a:lnum - 1) =~ '\\$'
- if a:lnum > 1 && getline(a:lnum - 2) =~ '\\$'
- return indent(a:lnum - 1)
- endif
- return indent(a:lnum - 1) + (exists("g:pyindent_continue") ? eval(g:pyindent_continue) : (shiftwidth() * 2))
- endif
-
- " if the start of the line is in a string don't change the indent.
- if has('syntax_items')
- \ && synidattr(synid(a:lnum, 1, 1), "name") =~ "string$"
- return -1
- endif
-
- " search backwards for the previous non-empty line.
- let plnum = prevnonblank(v:lnum - 1)
-
- if plnum == 0
- " this is the first non-empty line, use zero indent.
- return 0
- endif
-
- " if the previous line is inside parenthesis, use the indent of the starting
- " line.
- " trick: use the non-existing "dummy" variable to break out of the loop when
- " going too far back.
- call cursor(plnum, 1)
- let parlnum = searchpair('(\|{\|\[', '', ')\|}\|\]', 'nbw',
- \ "line('.') < " . (plnum - s:maxoff) . " ? dummy :"
- \ . " synidattr(synid(line('.'), col('.'), 1), 'name')"
- \ . " =~ '\\(comment\\|todo\\|string\\)$'")
- if parlnum > 0
- let plindent = indent(parlnum)
- let plnumstart = parlnum
- else
- let plindent = indent(plnum)
- let plnumstart = plnum
- endif
-
-
- " when inside parenthesis: if at the first line below the parenthesis add
- " two 'shiftwidth', otherwise same as previous line.
- " i = (a
- " + b
- " + c)
- call cursor(a:lnum, 1)
- let p = searchpair('(\|{\|\[', '', ')\|}\|\]', 'bw',
- \ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :"
- \ . " synidattr(synid(line('.'), col('.'), 1), 'name')"
- \ . " =~ '\\(comment\\|todo\\|string\\)$'")
- if p > 0
- if p == plnum
- " when the start is inside parenthesis, only indent one 'shiftwidth'.
- let pp = searchpair('(\|{\|\[', '', ')\|}\|\]', 'bw',
- \ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :"
- \ . " synidattr(synid(line('.'), col('.'), 1), 'name')"
- \ . " =~ '\\(comment\\|todo\\|string\\)$'")
- if pp > 0
- return indent(plnum) + (exists("g:pyindent_nested_paren") ? eval(g:pyindent_nested_paren) : shiftwidth())
- endif
- return indent(plnum) + (exists("g:pyindent_open_paren") ? eval(g:pyindent_open_paren) : (shiftwidth() * 2))
- endif
- if plnumstart == p
- return indent(plnum)
- endif
- return plindent
- endif
-
-
- " get the line and remove a trailing comment.
- " use syntax highlighting attributes when possible.
- let pline = getline(plnum)
- let pline_len = strlen(pline)
- if has('syntax_items')
- " if the last character in the line is a comment, do a binary search for
- " the start of the comment. synid() is slow, a linear search would take
- " too long on a long line.
- if synidattr(synid(plnum, pline_len, 1), "name") =~ "\\(comment\\|todo\\)$"
- let min = 1
- let max = pline_len
- while min < max
- let col = (min + max) / 2
- if synidattr(synid(plnum, col, 1), "name") =~ "\\(comment\\|todo\\)$"
- let max = col
- else
- let min = col + 1
- endif
- endwhile
- let pline = strpart(pline, 0, min - 1)
- endif
- else
- let col = 0
- while col < pline_len
- if pline[col] == '#'
- let pline = strpart(pline, 0, col)
- break
- endif
- let col = col + 1
- endwhile
- endif
-
- " if the previous line ended with a colon, indent this line
- if pline =~ ':\s*$'
- return plindent + shiftwidth()
- endif
-
- " if the previous line was a stop-execution statement...
- if getline(plnum) =~ '^\s*\(break\|continue\|raise\|return\|pass\)\>'
- " see if the user has already dedented
- if indent(a:lnum) > indent(plnum) - shiftwidth()
- " if not, recommend one dedent
- return indent(plnum) - shiftwidth()
- endif
- " otherwise, trust the user
- return -1
- endif
-
- " if the current line begins with a keyword that lines up with "try"
- if getline(a:lnum) =~ '^\s*\(except\|finally\)\>'
- let lnum = a:lnum - 1
- while lnum >= 1
- if getline(lnum) =~ '^\s*\(try\|except\)\>'
- let ind = indent(lnum)
- if ind >= indent(a:lnum)
- return -1 " indent is already less than this
- endif
- return ind " line up with previous try or except
- endif
- let lnum = lnum - 1
- endwhile
- return -1 " no matching "try"!
- endif
-
- " if the current line begins with a header keyword, dedent
- if getline(a:lnum) =~ '^\s*\(elif\|else\)\>'
-
- " unless the previous line was a one-liner
- if getline(plnumstart) =~ '^\s*\(for\|if\|try\)\>'
- return plindent
- endif
-
- " or the user has already dedented
- if indent(a:lnum) <= plindent - shiftwidth()
- return -1
- endif
-
- return plindent - shiftwidth()
- endif
-
- " when after a () construct we probably want to go back to the start line.
- " a = (b
- " + c)
- " here
- if parlnum > 0
- return plindent
- endif
-
- return -1
-
-endfunction
-
-let &cpo = s:keepcpo
-unlet s:keepcpo
-
-" vim:sw=2
diff --git a/.config/nvim/indent/sc_indent.vim b/.config/nvim/indent/sc_indent.vim
deleted file mode 100644
index 2cd9d9d..0000000
--- a/.config/nvim/indent/sc_indent.vim
+++ /dev/null
@@ -1,42 +0,0 @@
-"this indent function isn't that smart yet, hopefully it'll improve in the future
-if exists ("b:did_indent")
- finish
-endif
-let b:did_indent = 1
-
-setlocal indentexpr=GetSCIndent()
-setlocal indentkeys+=0),0],0}
-
-if exists ("*GetSCIndent")
- finish
-endif
-
-function GetSCIndent()
-
- let curr_line = getline(v:lnum)
- let lnum = prevnonblank(v:lnum - 1)
-
- if lnum == 0
- return 0
- endif
-
- let prev_line = getline(lnum)
-
- let ind = indent(lnum)
-
- if prev_line =~ '\(\/\/.*\)\@\
-set matchtime=1
-set cpoptions-=m
-set nojoinspaces
-set updatetime=300
-set synmaxcol=200
-set splitbelow
-set splitright
-set notimeout
-set ignorecase
-set scrolloff=5
-set sidescroll=5
-set shortmess+=aoOIWcs
-set foldnestmax=10
-set foldmethod=marker
-set foldclose=all
-set foldlevelstart=10
-set selectmode=key
-set keymodel=startsel
-set signcolumn=yes
-set tabstop=2
-set shiftwidth=2
-set softtabstop=2
-set shiftround
-set linebreak
-set breakindent
-set expandtab
-set nosmarttab
-set title
-set redrawtime=500
-set ttimeoutlen=10
-set nowritebackup
-set completeopt-=preview
-set nostartofline
-set undofile
-set undolevels=1000
-set undoreload=10000
-set formatoptions+=nl
-set formatoptions-=crot
-set fillchars+=vert:\
-set listchars+=precedes:<,extends:>
-set conceallevel=1
-set diffopt+=algorithm:histogram,indent-heuristic
-set pastetoggle=
-match ErrorMsg '^\(<\|=\|>\)\{7\}\([^=].\+\)\?$'
-
let mapleader="\"
let maplocalleader=','
-let formatlistpat='^\s*\(\d\+[\]:.)}\t ]\|[*-][\t ]\)\s*'
-let g:netrw_dirhistmax=0
-" }}}
-" Functions {{{
-function! MyHighlights() abort
- highlight Trail ctermbg=red guibg=red
- call matchadd('Trail', '\s\+$', 100)
- highlight ColorColumn ctermbg=magenta
- call matchadd('ColorColumn', '\%81v', 100)
-endfunction
-
-function! PopOutOfInsertMode() abort
- if v:insertmode
- call feedkeys("\\")
- endif
-endfunction
-
-function! Relativize(v) abort
- if &number
- let &relativenumber = a:v
- endif
-endfunction
-
-function! CmdLine(str)
- call feedkeys(':' . a:str)
-endfunction
-" }}}
-" AutoCommands {{{
-if !exists('autocommands_loaded') && has('autocmd')
- let autocommands_loaded = 1
-
- aug relativize
- au BufWinEnter,FocusGained,InsertLeave,WinEnter * call Relativize(1)
- au BufWinLeave,FocusLost,InsertEnter,WinLeave * call Relativize(0)
- aug END
-
- aug miscs
- au CursorHold * silent call CocActionAsync('highlight')
- au User CocJumpPlaceholder call CocActionAsync('showSignatureHelp')
- au ColorScheme * call MyHighlights()
- aug END
-
- aug inserts
- au InsertEnter * setlocal nocursorline
- au InsertLeave * setlocal cursorline nopaste
- au InsertLeave,CompleteDone * if pumvisible() == 0 | pclose | endif
- au FocusLost,TabLeave * call PopOutOfInsertMode()
- au WinLeave * setlocal nocursorline
- aug END
-
- aug file_types
- au BufNewFile ~/doc/blog/*.wiki 0r ~/.config/nvim/templates/wiki.skeleton
- au FileType typescript,json setlocal formatexpr=CocAction('formatSelected')
- au FileType gitcommit,gitrebase,gitconfig set bufhidden=delete
- au BufNewFile,BufRead requirements*.txt set syntax=python
- aug END
-
- aug statusline
- au VimEnter * call UpdateInactiveWindows()
- au VimEnter,WinEnter,BufWinEnter * call RefreshStatusLine('active')
- au WinLeave * call RefreshStatusLine('inactive')
- augroup END
-
- aug on_save
- au BufWritePre * :%s/\s\+$//e
- au BufWritePost *xresources !xrdb %
- au BufWritePost *sxhkdrc !pkill -USR1 sxhkd
- au BufWritePost *.tex !pdflatex %
- au QuitPre * if empty(&buftype) | lclose | endif
- aug END
-endif
" }}}
" {{{ Ale
let g:ale_lint_delay = 0
@@ -159,42 +24,12 @@ let g:ale_sign_error = ''
let g:ale_sign_warning = ''
let g:ale_sign_info = '●'
let g:ale_loclist_msg_format = '[%linter%] %s% (code)% [%severity%]'
-
-let g:ale_linter_aliases = {
-\ 'jsx': ['css', 'javascript'],
-\ 'vue': ['vue', 'javascript'],
-\}
-let g:ale_linters = {
-\ 'javascript': ['prettier_standard'],
-\ 'jsx': ['prettier_standard'],
-\ 'typescript': ['tsserver', 'eslint'],
-\ 'json': ['prettier_standard'],
-\ 'html': ['prettier_standard'],
-\ 'css': ['stylelint'],
-\ 'scss': ['stylelint'],
-\ 'bash': ['shellcheck'],
-\ 'sh': ['shellcheck'],
-\ 'vim': ['vint'],
-\ 'tex': ['chktex'],
-\}
-let g:ale_fixers = {
-\ '*': ['remove_trailing_lines', 'trim_whitespace'],
-\ 'jsx': ['prettier_standard'],
-\ 'javascript': ['prettier_standard'],
-\ 'typescript': ['prettier_standard'],
-\ 'json': ['prettier_standard'],
-\ 'html': ['prettier_standard'],
-\ 'scss': ['stylelint'],
-\ 'css': ['stylelint'],
-\ 'bash': ['shfmt'],
-\ 'sh': ['shfmt'],
-\ 'markdown': ['prettier_standard'],
-\}
+let g:ale_linter_aliases = { 'jsx': ['css', 'javascript'] }
+let g:ale_fixers = { '*': ['remove_trailing_lines', 'trim_whitespace'] }
let g:ale_pattern_options = {
\ '\.min\.js$': {'ale_linters': [], 'ale_fixers': []},
\ '\.min\.css$': {'ale_linters': [], 'ale_fixers': []},
\}
-
nmap (ale_previous_wrap)
nmap (ale_next_wrap)
" }}}
@@ -212,29 +47,21 @@ nnoremap :CocCommand explorer
" Config
nnoremap :CocConfig
+inoremap
+ \ pumvisible() ? coc#_select_confirm() :
+ \ coc#expandableOrJumpable() ? "\=coc#rpc#request('doKeymap', ['snippets-expand-jump',''])\" :
+ \ check_back_space() ? "\" :
+ \ coc#refresh()
+
function! s:check_back_space() abort
let col = col('.') - 1
return !col || getline('.')[col - 1] =~# '\s'
endfunction
-inoremap
- \ pumvisible() ? "\" :
- \ coc#jumpable() ? "\=coc#rpc#request('snippetNext',[])\" :
- \ check_back_space() ? "\" :
- \ coc#refresh()
-
-inoremap
- \ pumvisible() ? "\" :
- \ coc#jumpable() ? "\=coc#rpc#request('snippetPrev',[])\" :
- \ "\"
+let g:coc_snippet_next = ''
" to confirm completion
-if exists('*complete_info')
- inoremap complete_info()["selected"] != "-1" ? "\" : "\u\"
-else
- inoremap pumvisible() ? "\" : "\u\"
-endif
-
+inoremap pumvisible() ? "\" : "\"
" Use to trigger completion.
inoremap coc#refresh()
@@ -260,29 +87,13 @@ nnoremap rn (coc-rename)
let g:vim_markdown_toc_autofit = 1
let g:markdown_fenced_languages = ['vim', 'help']
let g:javascript_plugin_jsdoc = 1
-let g:vim_jsx_pretty_colorful_config = 1
-let g:jsx_ext_required = 1
-let g:tex_flavor='latex'
-let g:tex_conceal='abdmg'
-let g:Tex_DefaultTargetFormat ='pdf'
-let g:vimtex_compiler_progname = 'nvr'
-let g:vimtex_view_method = 'zathura'
-let g:vimtex_motion_matchparen = 0
-let g:vimtex_quickfix_mode = 0
-let g:vimtex_complete_enable = 1
-let g:vimtex_view_use_temp_files = 2
"}}}
" Plugins {{{
-call plug#begin(stdpath('data') . '/plugged')
-Plug 'dense-analysis/ale'
-Plug 'lervag/vimtex', {'for': 'latex'}
-Plug 'neoclide/coc.nvim', {'branch': 'release'}
-Plug 'sheerun/vim-polyglot'
-Plug 'tmsvg/pear-tree'
-Plug 'tpope/vim-commentary'
-Plug 'lambdalisue/gina.vim'
-Plug 'srcery-colors/srcery-vim'
-call plug#end()
+packadd! vim-polyglot
+packadd! pear-tree
+packadd! loupe
+packadd! vim-commentary
+packadd! gina.vim
" }}}
" Colors {{{
set termguicolors
@@ -290,324 +101,6 @@ let g:srcery_transparent_background = 1
let g:srcery_italic = 1
let g:srcery_underline = 1
let g:srcery_undercurl = 1
-let g:srcery_inverse_matches = 1
colorscheme srcery
-
-highlight! VertSplit ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=#080808 gui=NONE
-highlight! TabLineFill ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=#ef2f27 gui=NONE
-highlight! TablineSel ctermbg=NONE ctermfg=234 guibg=NONE guifg=#008bbd
-highlight! CocWarningHighlight ctermfg=4 cterm=undercurl guifg=#c4ab39 gui=undercurl
-highlight! CocErrorHighlight ctermfg=red cterm=undercurl guifg=#c4384b gui=undercurl
-highlight! CocUnderline cterm=undercurl gui=undercurl
-highlight! PmenuSel guibg=#111111 guifg=#6699cc
-highlight! Folded ctermbg=NONE guibg=NONE
-highlight! RedrawDebugClear guibg=#080808
-highlight! NvimInternalError guifg=#080808
-highlight! DiffAdded guifg=#333333
-highlight! PmenuThumb guifg=#333333
-highlight! link CocErrorSign WarningMsg
-highlight! link CocWarningSign Number
-highlight! link CocInfoSign Type
-
-if &diff
- highlight! link DiffText MatchParen
-endif
" }}}
-" Statusline {{{
-highlight User1 ctermfg=251 ctermbg=NONE guibg=NONE guifg=#c6c6c6
-highlight User2 ctermfg=234 ctermbg=NONE guibg=NONE guifg=#f74782
-highlight User3 ctermfg=234 ctermbg=4 guibg=NONE guifg=#008bb4
-highlight User4 ctermfg=234 ctermbg=251 guibg=NONE guifg=#c6c6c6
-highlight User5 ctermfg=234 ctermbg=4 guibg=NONE guifg=#e64eff
-highlight User6 ctermfg=234 ctermbg=9 guibg=NONE guifg=#fbad34
-highlight User7 ctermfg=234 ctermbg=251 guibg=NONE guifg=#407e4a
-
-let g:modes={
- \ 'n' : ['%3*', 'NORMAL'],
- \ 'no' : ['%3*', 'N·OPERATOR PENDING'],
- \ 'v' : ['%5*', 'VISUAL'],
- \ 'V' : ['%5*', 'V·LINE'],
- \ '' : ['%5*', 'V·BLOCK'],
- \ 's' : ['%7*', 'SELECT'],
- \ 'S' : ['%7*', 'S·LINE'],
- \ '' : ['%7*', 'S·BLOCK'],
- \ 'i' : ['%4*', 'INSERT'],
- \ 'R' : ['%2*', 'REPLACE'],
- \ 'Rv' : ['%2*', 'V·REPLACE'],
- \ 'c' : ['%6*', 'COMMAND'],
- \ 'cv' : ['%6*', 'VIM EX'],
- \ 'ce' : ['%6*', 'EX'],
- \ 'r' : ['%1*', 'PROMPT'],
- \ 'rm' : ['%1*', 'MORE'],
- \ 'r?' : ['%1*', 'CONFIRM'],
- \ '!' : ['%*1', 'SHELL'],
- \ 't' : ['%*1', 'TERMINAL']
- \}
-
-function! ModeColor() abort
- return get(g:modes, mode(), '%*')[0]
-endfunction
-
-function! CurrentMode() abort
- return ' ' . get(g:modes, mode(), '-')[1] . ' '
-endfunction
-
-function! StatusLine() abort
- let l:statusline=''
- let l:statusline.=ModeColor()
- let l:statusline.=CurrentMode()
- let l:statusline.=LinePasteMode()
- let l:statusline.='%<'
- let l:statusline.='%1* '
- let l:statusline.='%= '
- let l:statusline.=coc#status()
- let l:statusline.=LinterStatus()
- let l:statusline.='%3* %p%% %c '
- let l:statusline.=''
- return l:statusline
-endfunction
-
-function! StatusLineNC() abort
- let l:statusline=''
- let l:statusline.='%t'
- let l:statusline.='%<'
- let l:statusline.='%= '
- return l:statusline
-endfunction
-
-function! HelpStatusLine() abort
- let l:statusline=''
- let l:statusline.= '%#error#[HELP] %t '
- let l:statusline.='%1* '
- let l:statusline.='%<'
- let l:statusline.='%= '
- let l:statusline.=' %p%% '
- return l:statusline
-endfunction
-
-function! UpdateInactiveWindows()
- for winnum in range(1, winnr('$'))
- if winnum != winnr()
- call setwinvar(winnum, '&statusline', '%!StatusLineNC()')
- endif
- endfor
-endfunction
-
-function! RefreshStatusLine(mode)
- if (a:mode == "active" && &filetype !=? 'help')
- setlocal statusline=%!StatusLine()
- else
- setlocal statusline=%!StatusLineNC()
- endif
- if &filetype ==? 'help'
- setlocal statusline=%!HelpStatusLine()
- endif
-endfunction
-
-function! LinterStatus() abort
- let l:counts = ale#statusline#Count(bufnr(''))
- let l:all_errors = l:counts.error + l:counts.style_error
- let l:all_non_errors = l:counts.total - l:all_errors
- return l:counts.total == 0 ? '' : printf(
- \ ' :%d :%d ',
- \ l:all_non_errors,
- \ l:all_errors
- \)
-endfunction
-
-function! LinePasteMode() abort
- let paste_status = &paste
- if paste_status == 1
- return ' paste '
- else
- return ''
- endif
-endfunction
-" }}}
-" Tabline {{{
-function! Tabline()
- let s = ''
- for i in range(tabpagenr('$'))
- let tab = i + 1
- let winnr = tabpagewinnr(tab)
- let buflist = tabpagebuflist(tab)
- let bufnr = buflist[winnr - 1]
- let bufname = bufname(bufnr)
- let bufmodified = getbufvar(bufnr, '&mod')
-
- let s .= '%' . tab . 'T'
- let s .= (tab == tabpagenr() ? '%#TabLineSel#' : '%#TabLine#')
- let s .= ' ' . tab .':'
- let s .= (bufname !=? '' ? fnamemodify(bufname, ':t') . ' ' : '[Untitled] ')
-
- if bufmodified
- let s .= ' + '
- endif
- endfor
-
- let s .= '%#TabLineFill#'
- if (exists('g:tablineclosebutton'))
- let s .= '%=%999XX'
- endif
- return s
-endfunction
-set tabline=%!Tabline()
-" }}}
-"Mappings {{{
-"Normal {{{
-" Ñ master race
-nnoremap ñ ;
-nnoremap Ñ ,
-
-" Rearrange Splits
-nnoremap H
-nnoremap L
-nnoremap K
-nnoremap J
-
-" Resize splits
-nnoremap :vertical resize -2
-nnoremap :vertical resize +2
-nnoremap :resize -1
-nnoremap :resize +1
-
-" Alt to switch windows
-nnoremap
-nnoremap
-nnoremap
-nnoremap
-
-" Edit and source config file
-nnoremap ev :vsplit $MYVIMRC
-nnoremap sv :source $MYVIMRC
-
-" Gotta Go Fast (save, buffer close, quit, messages, SOF, EOF)
-nnoremap g :w!
-nnoremap b :bdelete
-nnoremap q :q!
-nnoremap Q :qa!
-nnoremap m :messages
-nnoremap gg
-nnoremap ¿ G
-
-" Splits
-nnoremap v :vnew
-nnoremap h :new
-
-" Quote words under cursor
-nnoremap " viWa"gvoi"gvo3l
-nnoremap ' viWa'gvoi'gvo3l
-
-" Move a line of text using Shift+[jk]
-nnoremap J mz:m+`z
-nnoremap K mz:m-2`z
-
-" My vim wants to enter all the time, enter all the time
-nnoremap o :call append(line('.'), '')
-nnoremap O :call append(line('.')-1, '')
-
-" Unhighlight search terms
-nnoremap :noh=has('diff')?'diffupdate':''
-
-" j = gj :: k = gk while preserving numbered jumps ie. 12j or 30k
-nnoremap j v:count ? (v:count > 5 ? "m'" . v:count : '') . 'j' : 'gj'
-nnoremap k v:count ? (v:count > 5 ? "m'" . v:count : '') . 'k' : 'gk'
-
-" Line movements
-noremap g
-noremap g
-nnoremap y 0y$
-nnoremap Y y$
-
-" Tab movement
-nnoremap tn :tabnew
-nnoremap th :tabfirst
-nnoremap tl :tablast
-nnoremap tx :tabclose
-
-" Center view on search result
-nnoremap n nzz
-nnoremap N Nzz
-nnoremap * *zz
-nnoremap # #zz
-nnoremap g* g*zz
-nnoremap g# g#zz
-
-" Prevent x from overriding what's in the clipboard.
-nnoremap x "_x
-nnoremap X "_x
-
-" Prevent selecting and pasting from overwriting what you originally copied.
-xnoremap p pgvy
-
-" Global replace
-nnoremap sw
- \ :let b:sub = input('global replacement: ')
- \ if b:sub !=? ''
- \ execute "%s//".b:sub.'/g'
- \ unlet b:sub
- \ endif
-
-" What about the Q
-nnoremap Q
-map q