dgy
/
hexagons
Archived
1
0
Fork 0
This repository has been archived on 2021-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
hexagons/.config/nvim/init.vim

106 lines
3.3 KiB
VimL

" Important {{{
let g:loaded_python_provider=1 " Disable python 2 interface
let g:python_host_skip_check=1 " Skip python 2 host check
if filereadable('bin/python3')
let g:python3_host_prog = '/bin/python3'
endif
let g:node_host_prog = '~/.local/share/npm/bin/neovim-node-host'
let $GIT_EDITOR = 'nvr -cc split --remote-wait'
let mapleader="\<SPACE>"
let maplocalleader=','
" }}}
" {{{ Ale
let g:ale_lint_delay = 0
let g:ale_disable_lsp = 1
let g:ale_fix_on_save = 1
let g:ale_linters_explicit = 1
let g:ale_use_global_executables = 1
let g:ale_close_preview_on_insert = 1
let g:ale_sign_highlight_linenrs = 1
let g:ale_set_highlights = 1
let g:ale_set_signs = 1
let g:ale_javascript_eslint_suppress_missing_config = 1
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'] }
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 <silent> <F7> <Plug>(ale_previous_wrap)
nmap <silent> <F8> <Plug>(ale_next_wrap)
" }}}
" CoC {{{
let g:coc_global_extensions = ['coc-lists', 'coc-highlight', 'coc-explorer', 'coc-snippets', 'coc-tsserver', 'coc-css', 'coc-html', 'coc-json', 'coc-emmet']
" Lists
nnoremap <silent><F1> :<C-u>CocList -S --ignore-case helptags<CR>
nnoremap <silent><F2> :<C-u>CocList -S --ignore-case files<CR>
nnoremap <silent><F3> :<C-u>CocList --normal buffers<CR>
nnoremap <silent><F4> :<C-u>CocList windows<CR>
nnoremap <silent><F10> :<C-u>CocList snippets<CR>
" Explorer
nnoremap <silent><F5> :CocCommand explorer<CR>
" Config
nnoremap <silent><F6> :CocConfig<CR>
inoremap <silent><expr> <TAB>
\ pumvisible() ? coc#_select_confirm() :
\ coc#expandableOrJumpable() ? "\<C-r>=coc#rpc#request('doKeymap', ['snippets-expand-jump',''])\<CR>" :
\ <SID>check_back_space() ? "\<TAB>" :
\ coc#refresh()
function! s:check_back_space() abort
let col = col('.') - 1
return !col || getline('.')[col - 1] =~# '\s'
endfunction
let g:coc_snippet_next = '<tab>'
" <CR> to confirm completion
inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<CR>"
" Use <c-space> to trigger completion.
inoremap <silent><expr> <c-space> coc#refresh()
" GoTo code navigation.
nnoremap <silent> gd <Plug>(coc-definition)
nnoremap <silent> gr <Plug>(coc-references)
" Use D to show documentation in preview window.
nnoremap <silent> D :call <SID>show_documentation()<CR>
function! s:show_documentation()
if (index(['vim','help'], &filetype) >= 0)
execute 'h '.expand('<cword>')
else
call CocAction('doHover')
endif
endfunction
" Symbol renaming.
nnoremap <leader>rn <Plug>(coc-rename)
"}}}
"{{{ Polyglot
let g:vim_markdown_toc_autofit = 1
let g:markdown_fenced_languages = ['vim', 'help']
let g:javascript_plugin_jsdoc = 1
"}}}
" Plugins {{{
packadd! pear-tree
packadd! loupe
packadd! vim-commentary
packadd! gina.vim
" }}}
" Colors {{{
set termguicolors
let g:srcery_transparent_background = 1
let g:srcery_italic = 1
let g:srcery_underline = 1
let g:srcery_undercurl = 1
colorscheme srcery
" }}}
" vim:foldmethod=marker:foldlevel=0