From 05613d7c7b1626f91087a5d461d9dca0a3ab7b74 Mon Sep 17 00:00:00 2001 From: Wiktor Zykubek Date: Tue, 26 May 2020 12:30:46 +0200 Subject: [PATCH] Update nvim config --- .config/flake8 | 3 +++ .config/nvim/bindings.vim | 8 ++++++++ .config/nvim/colors/biual.vim | 4 ++-- .config/nvim/init.vim | 5 +++-- .config/nvim/plugins.vim | 26 ++++++++++++++------------ 5 files changed, 30 insertions(+), 16 deletions(-) create mode 100644 .config/flake8 diff --git a/.config/flake8 b/.config/flake8 new file mode 100644 index 0000000..8dd399a --- /dev/null +++ b/.config/flake8 @@ -0,0 +1,3 @@ +[flake8] +max-line-length = 88 +extend-ignore = E203 diff --git a/.config/nvim/bindings.vim b/.config/nvim/bindings.vim index 0423bce..77f8d69 100644 --- a/.config/nvim/bindings.vim +++ b/.config/nvim/bindings.vim @@ -65,3 +65,11 @@ map k gk let g:SuperTabMappingTabLiteral = '' let g:SuperTabDefaultCompletionType = 'context' let g:SuperTabContextDefaultCompletionType = '' + +" neosnippets +smap neosnippet#expandable_or_jumpable() ? +\ "\(neosnippet_expand_or_jump)" : "\" + +imap (neosnippet_expand_or_jump) +smap (neosnippet_expand_or_jump) +xmap (neosnippet_expand_target) diff --git a/.config/nvim/colors/biual.vim b/.config/nvim/colors/biual.vim index 101e836..8e14179 100644 --- a/.config/nvim/colors/biual.vim +++ b/.config/nvim/colors/biual.vim @@ -49,8 +49,8 @@ hi DiffText ctermfg=0 ctermbg=4 hi Folded ctermbg=8 hi FoldColumn ctermbg=8 -hi Pmenu ctermfg=4 ctermbg=233 -hi PmenuSel ctermfg=4 ctermbg=8 +hi Pmenu ctermfg=12 ctermbg=234 +hi PmenuSel ctermfg=12 ctermbg=8 hi PmenuThumb ctermfg=8 ctermbg=8 hi PmenuSbar ctermfg=0 ctermbg=0 hi StatusLineNC ctermfg=8 ctermbg=NONE cterm=bold diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 14d604b..04c0f93a 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -49,8 +49,8 @@ set wildignore+=*.doc,*.pdf,*.cbr,*.cbz set wildignore+=*.zip,*.tar.gz,*.tar.bz2,*.rar,*.tar.xz,*.kgb set wildignore+=*.swp,.lock,.DS_Store,._* -highlight OverLength cterm=underline -match OverLength /\%81v.\+/ +" highlight OverLength cterm=underline +" match OverLength /\%81v.\+/ " Restore cursor position function! ResCur() @@ -71,6 +71,7 @@ let g:python_host_prog = '/usr/bin/python2' " Language-specific augroup langindentation autocmd Filetype c setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2 + autocmd Filetype python setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 autocmd Filetype cpp setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2 autocmd Filetype css setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2 autocmd Filetype javascript setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2 diff --git a/.config/nvim/plugins.vim b/.config/nvim/plugins.vim index b55219e..6ba4bf9 100644 --- a/.config/nvim/plugins.vim +++ b/.config/nvim/plugins.vim @@ -20,6 +20,7 @@ call plug#begin('~/.config/nvim/bundle') Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } Plug 'tbodt/deoplete-tabnine', { 'do': './install.sh' } Plug 'Shougo/deoplete-clangx' + Plug 'deoplete-plugins/deoplete-jedi' Plug 'deoplete-plugins/deoplete-zsh' Plug 'prabirshrestha/async.vim' Plug 'prabirshrestha/asyncomplete.vim' @@ -30,8 +31,9 @@ call plug#begin('~/.config/nvim/bundle') Plug 'ryanolsonx/vim-lsp-javascript' Plug 'ervandew/supertab' - Plug 'SirVer/ultisnips' Plug 'honza/vim-snippets' + Plug 'Shougo/neosnippet.vim' + Plug 'Shougo/neosnippet-snippets' Plug 'mattn/emmet-vim' @@ -86,7 +88,7 @@ let g:ale_fixers = { \ 'javascript': ['prettier'], \ 'json': ['prettier'], \ 'php': ['prettier'], -\ 'python': ['autopep8', 'isort', 'black', 'add_blank_lines_for_python_control_statements'], +\ 'python': ['black'], \ 'scss': ['prettier'], \ 'yaml': ['prettier'], \} @@ -134,16 +136,16 @@ call deoplete#custom#source('zsh', 'filetypes', ['sh', 'zsh']) call deoplete#custom#option('smart_case', v:false) " For python language server -if (executable('pyls')) - augroup LspPython - autocmd! - autocmd User lsp_setup call lsp#register_server({ - \ 'name': 'pyls', - \ 'cmd': {server_info->['pyls']}, - \ 'whitelist': ['python'] - \ }) - augroup END -endif +" if (executable('pyls')) +" augroup LspPython +" autocmd! +" autocmd User lsp_setup call lsp#register_server({ +" \ 'name': 'pyls', +" \ 'cmd': {server_info->['pyls']}, +" \ 'whitelist': ['python'] +" \ }) +" augroup END +" endif " for JS language server if (executable('typescript-language-server'))