[vim] coc-nvim plugin added, plus pyright extension

This commit is contained in:
2022-09-02 20:13:33 +03:00
parent 2c43674eb1
commit 1cadbbcf64
2 changed files with 74 additions and 0 deletions

View File

@@ -8,6 +8,9 @@ filetype plugin indent on "Включает определение типа фа
set encoding=utf-8
syntax enable
set timeoutlen=300 ttimeoutlen=0 " https://www.johnhawthorn.com/2012/09/vi-escape-delays/
" For coc-vim. Always show the signcolumn, otherwise it would shift the text each time
" diagnostics appear/become resolved.
set signcolumn=yes
set number relativenumber
set backspace=indent,eol,start
filetype plugin indent on
@@ -32,6 +35,7 @@ call plug#begin('~/.vim/bundle') "Начать искать плагины в э
Plug 'towolf/vim-helm'
Plug 'pearofducks/ansible-vim'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
call plug#end() "Перестать это делать
"
@@ -138,6 +142,20 @@ let g:ansible_extra_keywords_highlight = 1
let g:ansible_name_highlight = 'b'
let g:ansible_yamlKeyName = 'yamlKey'
"
" CoC plugin settings
"
let g:coc_global_extensions = ['coc-pyright']
source ~/.vim/coc.vim
function! s:enable_coc_for_type()
let l:filesuffix_whitelist = ['py']
if index(l:filesuffix_whitelist, expand('%:e')) == -1
let b:coc_enabled = 0
endif
endfunction
autocmd BufRead,BufNewFile * call s:enable_coc_for_type()
" YAML files config
autocmd FileType yaml,yml setlocal ts=2 sts=2 sw=2 expandtab
let g:indentLine_char = '⦙'