From bf3214c56c16f759efdcb9be0dadf37ec59e9e76 Mon Sep 17 00:00:00 2001 From: Guangxiong Lin Date: Tue, 11 Apr 2023 20:54:00 +0800 Subject: Update vim config --- .vim/after/plugin/ale.vim | 1 + .vim/after/plugin/lsp.vim | 5 +++++ 2 files changed, 6 insertions(+) (limited to '.vim/after/plugin') diff --git a/.vim/after/plugin/ale.vim b/.vim/after/plugin/ale.vim index 2bdd541..7b01aec 100644 --- a/.vim/after/plugin/ale.vim +++ b/.vim/after/plugin/ale.vim @@ -10,6 +10,7 @@ let g:ale_virtualtext_cursor = 1 let g:ale_linters = { \ 'c': ['clangd', 'cc', 'ccls'], \ 'go': [], + \ 'python': ['pylint'], \ } nmap [g (ale_previous_wrap) diff --git a/.vim/after/plugin/lsp.vim b/.vim/after/plugin/lsp.vim index c2293f1..702be8f 100644 --- a/.vim/after/plugin/lsp.vim +++ b/.vim/after/plugin/lsp.vim @@ -5,6 +5,7 @@ endif let g:lsp_diagnostics_enabled = 0 let g:lsp_document_code_action_signs_enabled = 0 let g:lsp_use_native_client = 1 +let g:lsp_fold_enabled = 1 packadd vim-lsp packadd vim-lsp-snippets @@ -85,6 +86,10 @@ function! s:on_lsp_buffer_enabled() abort nmap rn (lsp-rename) nmap K (lsp-hover) + setlocal foldmethod=expr + \ foldexpr=lsp#ui#vim#folding#foldexpr() + \ foldtext=lsp#ui#vim#folding#foldtext() + let g:lsp_format_sync_timeout = 1000 autocmd! BufWritePre *.rs,*.go call execute('LspDocumentFormatSync') endfunction -- cgit v1.2.3