Update NeoVim configuration

This commit is contained in:
Wiktor Zykubek 2020-07-08 09:57:04 +02:00
parent 2e0c2b569c
commit 950d4f9687
3 changed files with 34 additions and 14 deletions

View File

@ -5,11 +5,18 @@
let mapleader = "\<Space>"
let g:move_key_modifier = 'A'
" Enable/disable autopairs
nmap <Leader>ap :CloseTagToggleBuffer<CR>:call AutoPairsToggle()<CR>:echo "Auto closing tags toggled."<CR>
" Enable/disable deoplete
map <Leader>d :call deoplete#toggle()<CR>:echo "Deoplete toggled."<CR>
"~~~~~~~~~~~~~~~~~
" File Management
"~~~~~~~~~~~~~~~~~
" fzf
nmap <silent> <Leader>f :Files<CR>
nmap <silent> <Leader>F :Files ~<CR>
"~~~~~~~~~
" Linters
@ -17,9 +24,6 @@ nmap <silent> <Leader>f :Files<CR>
" Deletes all trailing whitespaces
noremap <leader>c :%s/\s\+$//e<cr>
" Enable/disable deoplete
map <Leader>d :call deoplete#toggle()<CR>
" ALE
map fw :FixWhitespace<CR>
map <Leader>af :ALEFix<CR>
@ -48,6 +52,12 @@ noremap <C-A-t> :split term://zsh<cr>:resize 10<cr>
" Exit from terminal mode
tnoremap <C-e> <C-\><C-n>
" Split management
nnoremap <C-j> <C-w><C-j>
nnoremap <C-k> <C-w><C-k>
nnoremap <C-l> <C-w><C-l>
nnoremap <C-h> <C-w><C-h>
"~~~~~~~
" Other
"~~~~~~~

View File

@ -60,8 +60,8 @@ hi MyStatuslineFiletype ctermfg=9 ctermbg=none cterm=italic
hi MyStatuslineLineCol ctermfg=1 ctermbg=none cterm=none
hi MyStatuslineLinePerc ctermfg=2 ctermbg=none cterm=none
hi CursorLine ctermbg=8 cterm=NONE
hi CursorColumn ctermbg=8 cterm=NONE
" hi CursorLine ctermfg=none ctermbg=none cterm=none
" hi CursorColumn ctermbg=8 cterm=NONE
" ALE
hi ALEWarning cterm=undercurl
@ -75,12 +75,12 @@ hi LspHintText ctermfg=3 ctermbg=none cterm=none
hi LspErrorLine ctermfg=red cterm=undercurl
hi LspErrorText ctermfg=red ctermbg=none
" Cursorline highlight
augroup CursorLine
au!
au VimEnter,WinEnter,BufWinEnter * setlocal cursorline
au WinLeave * setlocal nocursorline
augroup END
" " Cursorline highlight
" augroup CursorLine
" au!
" au VimEnter,WinEnter,BufWinEnter * setlocal cursorline
" au WinLeave * setlocal nocursorline
" augroup END
" Files
hi Win ctermfg=white ctermbg=none cterm=none

View File

@ -29,15 +29,15 @@ call plug#begin('~/.config/nvim/bundle')
Plug 'ryanolsonx/vim-lsp-javascript'
Plug 'ervandew/supertab'
Plug 'honza/vim-snippets'
Plug 'Shougo/neosnippet.vim'
Plug 'Shougo/neosnippet-snippets'
Plug 'samedamci/snippets'
Plug 'mattn/emmet-vim'
Plug 'tpope/vim-surround'
Plug 'tpope/vim-commentary'
Plug 'jiangmiao/auto-pairs'
Plug 'alvan/vim-closetag'
Plug 'sheerun/vim-polyglot'
Plug 'luochen1990/rainbow'
@ -119,7 +119,7 @@ let g:user_emmet_install_global = 0
autocmd FileType html,css EmmetInstall
" deoplete
let g:deoplete#enable_at_startup = 1
let g:deoplete#enable_at_startup = 0
let g:deoplete#enable_ignore_case = 1
set completeopt-=preview
@ -168,6 +168,16 @@ let g:lsp_highlight_references_enabled = 1
" autopairs
let g:AutoPairs={'(':')', '[':']', '{':'}', "'":"'", '"':'"', "`":"`", '```':'```', '"""':'"""', "'''":"'''"} "'<':'>',
" let b:AutoPairs={}
" vim-closetag
let g:closetag_filenames = '*.html,*.xhtml,*.phtml'
let g:closetag_xhtml_filenames = '*.xhtml,*.jsx'
let g:closetag_filetypes = 'html,xhtml,phtml'
let g:closetag_xhtml_filetypes = 'xhtml,jsx'
let g:closetag_emptyTags_caseSensitive = 1
let g:closetag_shortcut = '>'
let g:closetag_close_shortcut = '<leader>>'
" LaTeX
let g:livepreview_previewer = 'zathura'