Update nvim config

This commit is contained in:
samedamci 2020-05-26 12:30:46 +02:00
parent e8702f963d
commit 455a7862f8
No known key found for this signature in database
GPG Key ID: FCB4A9A20D00E894
5 changed files with 30 additions and 16 deletions

3
.config/flake8 Normal file
View File

@ -0,0 +1,3 @@
[flake8]
max-line-length = 88
extend-ignore = E203

View File

@ -65,3 +65,11 @@ map k gk
let g:SuperTabMappingTabLiteral = '<a-tab>'
let g:SuperTabDefaultCompletionType = 'context'
let g:SuperTabContextDefaultCompletionType = '<c-n>'
" neosnippets
smap <expr><TAB> neosnippet#expandable_or_jumpable() ?
\ "\<Plug>(neosnippet_expand_or_jump)" : "\<TAB>"
imap <C-k> <Plug>(neosnippet_expand_or_jump)
smap <C-k> <Plug>(neosnippet_expand_or_jump)
xmap <C-k> <Plug>(neosnippet_expand_target)

View File

@ -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

View File

@ -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

View File

@ -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'))