From 2f183094f0acd70f70891e44ca9e32039d0372e0 Mon Sep 17 00:00:00 2001 From: Harri Lahtinen Date: Fri, 15 Nov 2019 23:29:04 +0200 Subject: [PATCH] fixing, tweaking.. --- .Xresources | 4 +- .config/nvim/config/main.vim | 1 - .config/nvim/config/plugin-settings.vim | 274 +++++++++++++++++++++++- 3 files changed, 272 insertions(+), 7 deletions(-) diff --git a/.Xresources b/.Xresources index 7013dae..72a3913 100644 --- a/.Xresources +++ b/.Xresources @@ -26,8 +26,8 @@ !! Transparency (0-1): st.alpha: 0.9 !! Set a default font and font size as below: -st.font: Ubuntu Mono derivative Powerline:pixelsize=26:antialias=true:autohint=true; -st.boldFont: Ubuntu Mono derivative Powerline:pixelsize=26:bold:antialias=true:autohint=true; +st.font: Ubuntu Mono derivative Powerline:pixelsize=28:antialias=true:autohint=true; +st.boldFont: Ubuntu Mono derivative Powerline:pixelsize=28:bold:antialias=true:autohint=true; st.bold_font: 1 st.borderpx: 10 ! This option is can be preedit style. Available values: `root` `overthespot` ( Default taken `root`) diff --git a/.config/nvim/config/main.vim b/.config/nvim/config/main.vim index 970cb11..fa1d059 100644 --- a/.config/nvim/config/main.vim +++ b/.config/nvim/config/main.vim @@ -148,4 +148,3 @@ augroup END execute "digraphs vs " . 0x1D65 execute "digraphs xs " . 0x2093 "}}} - diff --git a/.config/nvim/config/plugin-settings.vim b/.config/nvim/config/plugin-settings.vim index 463c330..2109250 100644 --- a/.config/nvim/config/plugin-settings.vim +++ b/.config/nvim/config/plugin-settings.vim @@ -6,10 +6,9 @@ " /___/ /___/ " "***************************************************************************************** - -""""""""""" -" Tmuxline" -" """"""""" +""""""""""""""" +" Tmuxline " +" """"""""""""" let g:tmuxline_preset = { \'a' : '#S', \'b' : '#W', @@ -19,6 +18,36 @@ let g:tmuxline_preset = { \'y' : ['%R', '%a', '%Y'], \'z' : '#H'} +"""""""""""""""" +" Git Gutter " +""""""""""""""" +let g:gitgutter_enabled = 1 +let g:gitgutter_grep='' + +""""""""""" +" VimTex " +""""""""""" +let g:latex_view_general_viewer = "zathura" +let g:vimtex_view_method = "zathura" +let g:tex_flavor = "latex" +let g:vimtex_quickfix_open_on_warning = 0 +let g:vimtex_quickfix_mode = 2 +let g:vimtex_compiler_method = "latexmk" +let g:vimtex_compiler_progname = 'nvr' +let g:vimtex_compiler_latexmk = { + \ 'background' : 1, + \ 'build_dir' : '', + \ 'callback' : 1, + \ 'continuous' : 1, + \ 'executable' : 'latexmk', + \ 'options' : [ + \ '-verbose', + \ '-file-line-error', + \ '-synctex=1', + \ '-interaction=nonstopmode', + \ ], + \} + """"""""""" " Goyo " """"""""""" @@ -136,3 +165,240 @@ noremap :call comfortable_motion#flick(40) noremap :call comfortable_motion#flick(-40) let g:comfortable_motion_friction = 50.0 let g:comfortable_motion_air_drag = 1.0 + +"""""""""" +" Emoji " +"""""""""" +set completefunc=emoji#complete + + +""""""""""""""""" +"Indent Guides " +""""""""""""""""" +"let g:indentLine_char = '▏' +let g:indentLine_char_list = ['|', '¦', '┆', '┊'] + +let g:indent_guides_auto_colors = 1 +let g:indentLine_fileTypeExclude = [ + \'defx', + \'markdown', + \'denite', + \'startify', + \'tagbar', + \'vista_kind', + \'vista' + \] + +""""""""""""" +"Autopairs " +""""""""""""" +let g:AutoPairsFlyMode = 1 + +""""""""""""" +"Ultinsips " +""""""""""""" +" These were interfering with coc.nvims completion keybinds +"let g:UltiSnipsExpandTrigger="" +"let g:UltiSnipsJumpForwardTrigger="" +"let g:UltiSnipsJumpBackwardTrigger="" +"let g:UltiSnipsListSnippets="" + +"""""""""""" +"Startify " +"""""""""""" +function! s:center(lines) abort + let longest_line = max(map(copy(a:lines), 'strwidth(v:val)')) + let centered_lines = map(copy(a:lines), + \ 'repeat(" ", (&columns / 2) - (longest_line / 2)) . v:val') + return centered_lines +endfunction +let s:header= [ + \"▄▀▀▄ ▄▀▀▄ ▄▀▀█▀▄ ▄▀▀▄ ▄▀▄ ▄▀▀▄▀▀▀▄ ▄▀▀█▄▄▄▄ ▄▀▀█▄ ▄▀▀▄▀▀▀▄ ▄▀▀█▄▄▄▄ ▄▀▀▄▀▀▀▄ ", + \"█ █ █ █ █ █ █ █ ▀ █ █ █ █ ▐ ▄▀ ▐ ▐ ▄▀ ▀▄ █ █ █ ▐ ▄▀ ▐ █ █ █ ", + \"▐ █ █ ▐ █ ▐ ▐ █ █ ▐ █▀▀█▀ █▄▄▄▄▄ █▄▄▄█ ▐ █▀▀▀▀ █▄▄▄▄▄ ▐ █▀▀█▀ ", + \" █ ▄▀ █ █ █ ▄▀ █ █ ▌ ▄▀ █ █ █ ▌ ▄▀ █ ", + \" ▀▄▀ ▄▀▀▀▀▀▄ ▄▀ ▄▀ █ █ ▄▀▄▄▄▄ █ ▄▀ ▄▀ ▄▀▄▄▄▄ █ █ ", + \" █ █ █ █ ▐ ▐ █ ▐ ▐ ▐ █ █ ▐ ▐ ▐ ", + \" ▐ ▐ ▐ ▐ ▐ ▐ ▐ ", + \"", + \"", + \" ;::::;", + \" ;::::; :;", + \" ;:::::' :;", + \" ;:::::; ;.", + \" ,:::::' ; OOO\ ", + \" ::::::; ; OOOOO\ ", + \" ;:::::; ; OOOOOOOO", + \" ,;::::::; ;' / OOOOOOO", + \" ;:::::::::`. ,,,;. / / DOOOOOO", + \" .';:::::::::::::::::;, / / DOOOO", + \" ,::::::;::::::;;;;::::;, / / DOOO", + \" ;`::::::`'::::::;;;::::: ,#/ / DOOO", + \" :`:::::::`;::::::;;::: ;::# / DOOO", + \" ::`:::::::`;:::::::: ;::::# / DOO", + \" `:`:::::::`;:::::: ;::::::#/ DOO", + \" :::`:::::::`;; ;:::::::::## OO", + \" ::::`:::::::`;::::::::;:::# OO", + \" `:::::`::::::::::::;'`:;::# O", + \" `:::::`::::::::;' / / `:#", + \" ::::::`:::::;' / / `#", + \] + +let g:startify_change_to_dir = 1 +let g:startify_custom_header = s:center(s:header) +" Optionally create and use footer +"let s:header= [] +"let g:startify_custom_footer = s:center(s:footer) + +""""""" +"COC " +""""""" + +" Define Error Symbols and colors +let g:coc_status_warning_sign = '' +let g:coc_status_error_sign = '' +hi CocWarningSign ctermfg=blue +hi CocErrorSign ctermfg=red +hi CocInfoSign ctermfg=yellow +hi CocHintSign ctermfg=green + +" Transparent popup window +hi! Pmenu ctermbg=black +hi! PmenuSel ctermfg=2 +hi! PmenuSel ctermbg=0 + +" Brighter line numbers +hi! LineNr ctermfg=NONE guibg=NONE + +" KEY REMAPS "" +set updatetime=300 +let g:ycm_server_python_interpreter = '/usr/bin/python3' +let g:coc_snippet_next = '' +let g:coc_snippet_prev = '' + +" Extensions. Some need configuration. +" coc-java needs a valid JVM filepath defined in coc-settings +" coc-ccls needs ccls (available on aur) +" coc-eslint needs eslint npm package installed globally +let g:coc_global_extensions = [ + \'coc-html', + \'coc-xml', + \'coc-java', + \'coc-ccls', + \'coc-powershell', + \'coc-r-lsp', + \'coc-vimlsp', + \'coc-lua', + \'coc-sql', + \'coc-go', + \'coc-css', + \'coc-sh', + \'coc-snippets', + \'coc-prettier', + \'coc-eslint', + \'coc-emmet', + \'coc-tsserver', + \'coc-translator', + \'coc-fish', + \'coc-docker', + \'coc-pairs', + \'coc-json', + \'coc-python', + \'coc-imselect', + \'coc-highlight', + \'coc-git', + \'coc-github', + \'coc-gitignore', + \'coc-emoji', + \'coc-lists', + \'coc-post', + \'coc-stylelint', + \'coc-yaml', + \'coc-template', + \'coc-tabnine', + \'coc-utils' + \] + +" Remap keys for gotos +nmap gd (coc-definition) +nmap gy (coc-type-definition) +nmap gi (coc-implementation) +nmap gr (coc-references) +inoremap pumvisible() ? "\" : "\u\" +" Remap for rename current word +nmap rn (coc-rename) + +" Remap for format selected region +xmap f (coc-format-selected) +nmap f (coc-format-selected) + +" Fix autofix problem of current line +nmap qf (coc-fix-current) + +augroup MyAutoCmd + 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 + +" Highlight symbol under cursor on CursorHold +"autocmd CursorHold * silent call CocActionAsync('highlight') + +" map to trigger completion and navigate to the next item +inoremap + \ pumvisible() ? "\" : + \ check_back_space() ? "\" : + \ coc#refresh() +inoremap pumvisible() ? "\" : "\" + +function! s:check_back_space() abort + let col = col('.') - 1 + return !col || getline('.')[col - 1] =~# '\s' +endfunction + +""""""""""""""""" +"Nerd Commenter " +""""""""""""""""" +" Add spaces after comment delimiters by default +let g:NERDSpaceDelims = 1 +" Use compact syntax for prettified multi-line comments +let g:NERDCompactSexyComs = 1 +" Allow commenting and inverting empty lines (useful when commenting a region) +" + + +""""""""""""""""" +" Fuzzy Finding " +""""""""""""""""" +let g:fzf_colors = +\ { 'fg': ['bg', 'Normal'], +\ 'bg': ['bg', 'Normal'], +\ 'hl': ['fg', 'Comment'], +\ 'fg+': ['fg', 'CursorLine', 'CursorColumn', 'Normal'], +\ 'bg+': ['fg', 'CursorLine', 'CursorColumn'], +\ 'hl+': ['fg', 'Statement'], +\ 'info': ['fg', 'PreProc'], +\ 'border': ['fg', 'Ignore'], +\ 'prompt': ['fg', 'Conditional'], +\ 'pointer': ['fg', 'Exception'], +\ 'marker': ['fg', 'Keyword'], +\ 'spinner': ['fg', 'Label'], +\ 'header': ['fg', 'Comment'] } + +" Hide status bar while using fzf commands +if has('nvim') || has('gui_running') + autocmd! FileType fzf + autocmd FileType fzf set laststatus=0 | autocmd WinLeave set laststatus=2 +endif + + +""""""""""""""""" +" Autosaving " +""""""""""""""""" +let g:auto_save = 1 +let g:auto_save_silent = 1 +let g:auto_save_events = ["InsertLeave", "TextChanged", "FocusLost"] + +