From 2700c07cc1c1a197a9ab620e7d6ca5d5dabafb28 Mon Sep 17 00:00:00 2001 From: Wouter Gordts Date: Tue, 30 Jan 2024 09:10:33 +0100 Subject: [PATCH] log overdue commit --- essentials.vimrc | 2 ++ visual.vimrc | 2 ++ vundle_essentials.vimrc | 9 +++++- waldek_plugins.list | 7 ++++- waldek_plugins.vimrc | 61 +++++++++++++++++++++++++++++++++++++++++ 5 files changed, 79 insertions(+), 2 deletions(-) diff --git a/essentials.vimrc b/essentials.vimrc index 098a988..360a49c 100644 --- a/essentials.vimrc +++ b/essentials.vimrc @@ -54,6 +54,8 @@ set autowriteall set sw=4 set ts=4 set sts=4 +set autoindent +set expandtab " mouse usage can be handy, especially when using LspPeekDefinition set mouse=a diff --git a/visual.vimrc b/visual.vimrc index 2439674..9038eee 100644 --- a/visual.vimrc +++ b/visual.vimrc @@ -5,6 +5,8 @@ " set a colorscheme silent! colorscheme solarized set background=dark +highlight Normal ctermbg=black +hi Normal guibg=NONE ctermbg=NONE " do soft wrap of text but not in the middle of words set wrap linebreak nolist diff --git a/vundle_essentials.vimrc b/vundle_essentials.vimrc index 6410f78..3de7582 100644 --- a/vundle_essentials.vimrc +++ b/vundle_essentials.vimrc @@ -19,12 +19,14 @@ Plugin 'preservim/nerdtree' Plugin 'jeetsukumaran/vim-buffergator' " IDE like plugins -Plugin 'prabirshrestha/asyncomplete.vim' Plugin 'prabirshrestha/vim-lsp' +Plugin 'prabirshrestha/asyncomplete.vim' Plugin 'prabirshrestha/asyncomplete-lsp.vim' Plugin 'mattn/vim-lsp-settings' "Plugin 'yami-beta/asyncomplete-omni.vim' Plugin 'prabirshrestha/asyncomplete-file.vim' +Plugin 'dense-analysis/ale' +Plugin 'rhysd/vim-lsp-ale' " Language autocomplete for English Plugin 'htlsne/asyncomplete-look' @@ -32,6 +34,11 @@ Plugin 'htlsne/asyncomplete-look' " an additional colorscheme I like Plugin 'altercation/vim-colors-solarized' +" a nice statusbar +Plugin 'vim-airline/vim-airline' +Plugin 'vim-airline/vim-airline-themes' + +" no load my personal plugins let _plugins_list = _vimrc_dir . "/" . $USER . "_plugins.list" if filereadable(_plugins_list) "echomsg "found user plugins " . _plugins_list diff --git a/waldek_plugins.list b/waldek_plugins.list index 3065957..42e8a59 100644 --- a/waldek_plugins.list +++ b/waldek_plugins.list @@ -19,6 +19,11 @@ Plugin 'iamcco/markdown-preview.nvim' Plugin 'puremourning/vimspector' Plugin 'sagi-z/vimspectorpy', { 'do': { -> vimspectorpy#update() } } - +" asyncrun for flask debug +"Plug 'skywind3000/asyncrun.vim' Plugin 'kalafut/vim-taskjuggler' +Plugin 'liuchengxu/graphviz.vim' +Plugin 'weirongxu/plantuml-previewer.vim' +Plugin 'aklt/plantuml-syntax' +Plugin 'tyru/open-browser.vim.git' diff --git a/waldek_plugins.vimrc b/waldek_plugins.vimrc index 2ead28a..4193921 100644 --- a/waldek_plugins.vimrc +++ b/waldek_plugins.vimrc @@ -71,6 +71,18 @@ autocmd! BufRead,BufNewFile *.ics setfiletype icalendar au BufRead,BufNewFile *.pde set filetype=arduino au BufRead,BufNewFile *.ino set filetype=arduino +if executable('arduino-language-server') + let g:lsp_semantic_enabled = 0 + au User lsp_setup call lsp#register_server({ + \ 'name': 'arduino-language-server', + \ 'cmd': {server_info->['/home/waldek/bin/arduino-language-server', '-clangd', '/usr/bin/clangd', '-cli', '/home/waldek/bin/arduino-cli', '-cli-config', '/home/waldek/.arduino15/arduino-cli.yaml', '-fqbn', 'arduino:renesas_uno', '-log', '-logpath', '/tmp']}, + \ 'whitelist': ['arduino'], + \ 'workspace_config': lsp_settings#get('arduino-language-server', 'workspace_config', {}), + \ }) +endif + +"\ 'cmd': {server_info->['arduino-language-server -clangd /usr/bin/clangd -cli /home/waldek/bin/arduino-cli -cli-config /home/waldek/.arduino15/arduino-cli.yaml -fqbn arduino:mbed:nanorp2040connect'],}, +" " vimscript " ---- @@ -94,6 +106,55 @@ let g:markdown_syntax_conceal=1 " lsp-settings " ------------ +"let g:lsp_settings_filetype_python = ['pylsp-all', 'pyright-langserver'] +"let g:lsp_settings_filetype_python = ['pyright-langserver'] +let g:lsp_settings_filetype_python = ['pylsp-all'] + +"let g:lsp_settings = { +"\ 'pyls-all': { +"\ 'workspace_config': { +"\ 'pyls': { +"\ 'configurationSources': ['pycodestyle'], +"\ 'plugins': { +"\ 'pycodestyle': { +"\ 'enabled': v:false, +"\ 'ignore': ['E501'] +"\ }, +"\ "pyls_mypy": +"\ { +"\ "enabled": v:true, +"\ "live_mode": v:false +"\ }, +"\ } +"\ } +"\ } +"\ }, +"\} + +" ale-lsp settings +" ---------------- + +let g:lsp_diagnostics_enabled = 1 +let g:lsp_diagnostics_echo_cursor = 1 +let g:lsp_diagnostics_float_cursor = 1 +let g:lsp_diagnostics_highlights_enabled = 1 +let g:lsp_diagnostics_signs_enabled = 1 +let g:lsp_diagnostics_virtual_text_enabled = 1 +let g:ale_sign_column_always = 1 +nmap (ale_previous_wrap) +nmap (ale_next_wrap) +" Check Python files with flake8 and pylint. +" let b:ale_linters = ['flake8', 'pylint'] +" Fix Python files with autopep8 and yapf. +let b:ale_fixers = ['autopep8', 'yapf', 'remove_trailing_lines', 'trim_whitespace', 'black', 'pycln', 'isort'] + + +" pylint seems to not like venvs... +let g:ale_linters = { +\ 'go': ['vim-lsp'], +\ 'python': ['vim-lsp'], +\ } + " 'cmd': {server_info->['/home/waldek/.virtualenvs/configuration-language-server-/bin/confls']},