dotfiles/.config/nvim/init/pluginConfig.vim

77 lines
3.6 KiB
VimL
Raw Normal View History

command! PU PlugUpdate | PlugUpgrade
lua require 'colorizer'.setup({ '*'; markdown = { names = false; }; })
let g:strip_whitespace_on_save=1
autocmd FileType taskedit,crontab,markdown DisableStripWhitespaceOnSave
let g:show_spaces_that_precede_tabs=1
let g:better_whitespace_skip_empty_lines=1
let g:better_whitespace_guicolor=$THEME == 'light' ? 'LightGrey' : 'DarkGrey'
" see https://github.com/ntpeters/vim-better-whitespace/issues/134 - autocmd OptionSet background let g:better_whitespace_guicolor=&background == 'light' ? 'LightYellow' : 'Brown'
" remap movement commands to respect CamelCase
map <silent> w <Plug>CamelCaseMotion_w
map <silent> b <Plug>CamelCaseMotion_b
map <silent> e <Plug>CamelCaseMotion_e
map <silent> ge <Plug>CamelCaseMotion_ge
omap <silent> iw <Plug>CamelCaseMotion_iw
xmap <silent> iw <Plug>CamelCaseMotion_iw
omap <silent> ib <Plug>CamelCaseMotion_ib
xmap <silent> ib <Plug>CamelCaseMotion_ib
omap <silent> ie <Plug>CamelCaseMotion_ie
xmap <silent> ie <Plug>CamelCaseMotion_ie
" firenvim
let g:firenvim_config = {
\ 'globalSettings': {
\ 'alt': 'all',
\ },
\ 'localSettings': {
\ '.*': {
\ 'cmdline': 'firenvim',
\ 'priority': 0,
2021-10-31 19:22:16 +00:00
\ 'selector': 'textarea:not([readonly]):not([class="handsontableInput"]):not([wrap="off"]):not([rows="1"]):not([title="Replace"]):not([title="Search"]):not([name="message"]),
\ div[role="textbox"]:not([aria-label="Search"])',
\ 'takeover': 'always',
\ },
2021-10-13 17:15:26 +00:00
\ '.*mail\.protonmail\.com.*': { 'priority': 9, 'takeover': 'empty', },
2021-10-31 19:22:16 +00:00
\ '.*church\.tools.*': { 'priority': 9, 'takeover': 'empty', },
\ '.*element\.io.*': { 'priority': 9, 'takeover': 'empty', },
2021-09-29 16:38:57 +00:00
\ '.*openstreetmap\.org.*': { 'priority': 9, 'takeover': 'once', },
2021-10-17 11:34:54 +00:00
\ '.*openstreetmap\.de.*': { 'priority': 9, 'takeover': 'once', },
\ '.*github\.com.*': { 'priority': 9, 'takeover': 'once', },
2021-09-29 16:38:57 +00:00
\
2021-11-16 09:22:56 +00:00
\ '.*discord\.com.*': { 'priority': 9, 'takeover': 'never', },
\ '.*twitter\.com.*': { 'priority': 9, 'takeover': 'never', },
\ '.*wikipedia\.org.*': { 'priority': 9, 'takeover': 'never', },
2021-09-18 20:03:34 +00:00
\ '.*wikidata\.org.*': { 'priority': 9, 'takeover': 'never', },
\
2021-11-16 09:22:56 +00:00
\ '.*calendar\.google\.com.*': { 'priority': 9, 'takeover': 'empty', },
\ '.*docs\.google\.com.*': { 'priority': 9, 'takeover': 'never', },
2021-07-17 20:48:33 +00:00
\ '.*contacts\.google\.com.*': { 'priority': 9, 'takeover': 'never', },
\ '.*notion\.so.*': { 'priority': 9, 'takeover': 'never', },
\ '.*cloud\.atomtoast\.xyz.*': { 'priority': 9, 'takeover': 'never', },
\ 'https://bigbluebutton.*': { 'priority': 9, 'takeover': 'never', },
\ 'https://dhall-lang.org.*': { 'priority': 9, 'takeover': 'never', },
2021-11-16 09:22:56 +00:00
\ 'https://aur.archlinux.org/account.*': { 'priority': 9, 'takeover': 'never', },
\
\ '.*stackexchange\.com.*': { 'priority': 9, 'takeover': 'never', },
\ '.*stackoverflow\.com.*': { 'priority': 9, 'takeover': 'never', },
\ '.*com/questions/[0-9]+/.*': { 'priority': 9, 'takeover': 'never', },
2021-07-29 14:06:56 +00:00
\ '.*com/posts/[0-9]+/.*': { 'priority': 9, 'takeover': 'never', },
\ }
\ }
if exists('g:started_by_firenvim')
nnoremap <Esc><Esc> :call firenvim#focus_page()<CR>
autocmd FocusLost,InsertLeave,BufLeave * ++nested call WriteSilent()
function WriteSilent()
let was_enabled=b:strip_whitespace_on_save
DisableStripWhitespaceOnSave
write
if was_enabled
EnableStripWhitespaceOnSave
endif
endfunction
endif