Compare commits
5 Commits
9ef45b8529
...
2700c07cc1
Author | SHA1 | Date |
---|---|---|
Wouter Gordts | 2700c07cc1 | |
waldek | 26caf09948 | |
waldek | 7973bf32b3 | |
waldek | afb046ece3 | |
waldek | f0b2f87537 |
|
@ -54,6 +54,8 @@ set autowriteall
|
||||||
set sw=4
|
set sw=4
|
||||||
set ts=4
|
set ts=4
|
||||||
set sts=4
|
set sts=4
|
||||||
|
set autoindent
|
||||||
|
set expandtab
|
||||||
|
|
||||||
" mouse usage can be handy, especially when using LspPeekDefinition
|
" mouse usage can be handy, especially when using LspPeekDefinition
|
||||||
set mouse=a
|
set mouse=a
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
" set a colorscheme
|
" set a colorscheme
|
||||||
silent! colorscheme solarized
|
silent! colorscheme solarized
|
||||||
set background=dark
|
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
|
" do soft wrap of text but not in the middle of words
|
||||||
set wrap linebreak nolist
|
set wrap linebreak nolist
|
||||||
|
|
|
@ -19,12 +19,14 @@ Plugin 'preservim/nerdtree'
|
||||||
Plugin 'jeetsukumaran/vim-buffergator'
|
Plugin 'jeetsukumaran/vim-buffergator'
|
||||||
|
|
||||||
" IDE like plugins
|
" IDE like plugins
|
||||||
Plugin 'prabirshrestha/asyncomplete.vim'
|
|
||||||
Plugin 'prabirshrestha/vim-lsp'
|
Plugin 'prabirshrestha/vim-lsp'
|
||||||
|
Plugin 'prabirshrestha/asyncomplete.vim'
|
||||||
Plugin 'prabirshrestha/asyncomplete-lsp.vim'
|
Plugin 'prabirshrestha/asyncomplete-lsp.vim'
|
||||||
Plugin 'mattn/vim-lsp-settings'
|
Plugin 'mattn/vim-lsp-settings'
|
||||||
"Plugin 'yami-beta/asyncomplete-omni.vim'
|
"Plugin 'yami-beta/asyncomplete-omni.vim'
|
||||||
Plugin 'prabirshrestha/asyncomplete-file.vim'
|
Plugin 'prabirshrestha/asyncomplete-file.vim'
|
||||||
|
Plugin 'dense-analysis/ale'
|
||||||
|
Plugin 'rhysd/vim-lsp-ale'
|
||||||
|
|
||||||
" Language autocomplete for English
|
" Language autocomplete for English
|
||||||
Plugin 'htlsne/asyncomplete-look'
|
Plugin 'htlsne/asyncomplete-look'
|
||||||
|
@ -32,6 +34,11 @@ Plugin 'htlsne/asyncomplete-look'
|
||||||
" an additional colorscheme I like
|
" an additional colorscheme I like
|
||||||
Plugin 'altercation/vim-colors-solarized'
|
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"
|
let _plugins_list = _vimrc_dir . "/" . $USER . "_plugins.list"
|
||||||
if filereadable(_plugins_list)
|
if filereadable(_plugins_list)
|
||||||
"echomsg "found user plugins " . _plugins_list
|
"echomsg "found user plugins " . _plugins_list
|
||||||
|
@ -66,7 +73,7 @@ autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTr
|
||||||
" the definition of a function or class
|
" the definition of a function or class
|
||||||
function! s:on_lsp_buffer_enabled() abort
|
function! s:on_lsp_buffer_enabled() abort
|
||||||
setlocal omnifunc=lsp#complete
|
setlocal omnifunc=lsp#complete
|
||||||
setlocal signcolumn=no " messes with some autocomplete!
|
"setlocal signcolumn=no " messes with some autocomplete!
|
||||||
if exists('+tagfunc') | setlocal tagfunc=lsp#tagfunc | endif
|
if exists('+tagfunc') | setlocal tagfunc=lsp#tagfunc | endif
|
||||||
nmap <buffer> gd <plug>(lsp-definition)
|
nmap <buffer> gd <plug>(lsp-definition)
|
||||||
nmap <buffer> gpd <plug>(lsp-peek-definition)
|
nmap <buffer> gpd <plug>(lsp-peek-definition)
|
||||||
|
|
|
@ -10,7 +10,20 @@ Plugin 'majutsushi/tagbar'
|
||||||
"Plugin 'scrooloose/nerdcommenter'
|
"Plugin 'scrooloose/nerdcommenter'
|
||||||
"Plugin 'kalafut/vim-taskjuggler'
|
"Plugin 'kalafut/vim-taskjuggler'
|
||||||
Plugin 'iamcco/markdown-preview.nvim'
|
Plugin 'iamcco/markdown-preview.nvim'
|
||||||
|
"Plugin 'godlygeek/tabular'
|
||||||
|
"Plugin 'preservim/vim-markdown'
|
||||||
|
|
||||||
" debugging inside vim
|
" debugging inside vim
|
||||||
"Plugin 'Shougo/vimproc.vim'
|
"Plugin 'Shougo/vimproc.vim'
|
||||||
"Plugin 'idanarye/vim-vebugger'
|
"Plugin 'idanarye/vim-vebugger'
|
||||||
|
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'
|
||||||
|
|
|
@ -71,6 +71,18 @@ autocmd! BufRead,BufNewFile *.ics setfiletype icalendar
|
||||||
au BufRead,BufNewFile *.pde set filetype=arduino
|
au BufRead,BufNewFile *.pde set filetype=arduino
|
||||||
au BufRead,BufNewFile *.ino 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
|
" vimscript
|
||||||
" ----
|
" ----
|
||||||
|
|
||||||
|
@ -88,19 +100,71 @@ set foldmethod=expr
|
||||||
\ foldexpr=lsp#ui#vim#folding#foldexpr()
|
\ foldexpr=lsp#ui#vim#folding#foldexpr()
|
||||||
\ foldtext=lsp#ui#vim#folding#foldtext()
|
\ foldtext=lsp#ui#vim#folding#foldtext()
|
||||||
|
|
||||||
|
let g:lsp_hover_conceal=1
|
||||||
|
let g:markdown_syntax_conceal=1
|
||||||
|
|
||||||
" lsp-settings
|
" 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 <silent> <C-k> <Plug>(ale_previous_wrap)
|
||||||
|
nmap <silent> <C-j> <Plug>(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']},
|
" 'cmd': {server_info->['/home/waldek/.virtualenvs/configuration-language-server-/bin/confls']},
|
||||||
|
|
||||||
|
|
||||||
au User lsp_setup
|
"au User lsp_setup
|
||||||
\ call lsp#register_server({
|
" \ call lsp#register_server({
|
||||||
\ 'name': 'confls',
|
" \ 'name': 'confls',
|
||||||
\ 'tcp': '127.0.0.1:9999',
|
" \ 'tcp': '127.0.0.1:9999',
|
||||||
\ 'cmd': {server_info->['pyls']},
|
" \ 'cmd': {server_info->['pyls']},
|
||||||
\ 'allowlist': ['systemd']
|
" \ 'allowlist': ['systemd']
|
||||||
\ })
|
" \ })
|
||||||
|
|
||||||
"if executable('/home/waldek/.virtualenvs/configuration-language-server-/bin/confls')
|
"if executable('/home/waldek/.virtualenvs/configuration-language-server-/bin/confls')
|
||||||
" " pip install python-language-server
|
" " pip install python-language-server
|
||||||
|
@ -127,7 +191,32 @@ let g:NERDDefaultAlign = 'left'
|
||||||
" vebugger
|
" vebugger
|
||||||
" --------
|
" --------
|
||||||
|
|
||||||
let g:vebugger_leader='<Leader>d'
|
"let g:vebugger_leader='<Leader>d'
|
||||||
|
|
||||||
|
" vimspector
|
||||||
|
" --------
|
||||||
|
|
||||||
|
let g:vimspector_enable_mappings = 'HUMAN'
|
||||||
|
set signcolumn=yes
|
||||||
|
|
||||||
|
sign define vimspectorBP text=\ ● texthl=WarningMsg
|
||||||
|
sign define vimspectorBPCond text=\ ◆ texthl=WarningMsg
|
||||||
|
sign define vimspectorBPLog text=\ ◆ texthl=SpellRare
|
||||||
|
sign define vimspectorBPDisabled text=\ ● texthl=LineNr
|
||||||
|
sign define vimspectorPC text=\ ▶ texthl=MatchParen linehl=CursorLine
|
||||||
|
sign define vimspectorPCBP text=●▶ texthl=MatchParen linehl=CursorLine
|
||||||
|
sign define vimspectorCurrentThread text=▶ texthl=MatchParen linehl=CursorLine
|
||||||
|
sign define vimspectorCurrentFrame text=▶ texthl=Special linehl=CursorLine
|
||||||
|
|
||||||
|
|
||||||
|
" asyncrun
|
||||||
|
" --------
|
||||||
|
|
||||||
|
let $PYTHONUNBUFFERED=1
|
||||||
|
let g:asyncrun_open = 8
|
||||||
|
"autocmd filetype python noremap <F5> :AsyncRun -cwd=$(VIM_FILEDIR) -raw python3 "$(VIM_FILEPATH)"<CR>
|
||||||
|
"noremap <F6> :AsyncStop<CR>
|
||||||
|
"noremap <F10> :cclose<CR>
|
||||||
|
|
||||||
" marker specific
|
" marker specific
|
||||||
" ---------------
|
" ---------------
|
||||||
|
@ -161,7 +250,7 @@ let g:SignatureMap = {
|
||||||
|
|
||||||
" set to 1, nvim will open the preview window after entering the markdown buffer
|
" set to 1, nvim will open the preview window after entering the markdown buffer
|
||||||
" default: 0
|
" default: 0
|
||||||
let g:mkdp_auto_start = 1
|
let g:mkdp_auto_start = 0
|
||||||
|
|
||||||
" set to 1, the nvim will auto close current preview window when change
|
" set to 1, the nvim will auto close current preview window when change
|
||||||
" from markdown buffer to another buffer
|
" from markdown buffer to another buffer
|
||||||
|
@ -250,6 +339,6 @@ let g:mkdp_page_title = '${name}'
|
||||||
" these filetypes will have MarkdownPreview... commands
|
" these filetypes will have MarkdownPreview... commands
|
||||||
let g:mkdp_filetypes = ['markdown']
|
let g:mkdp_filetypes = ['markdown']
|
||||||
|
|
||||||
autocmd FileType mail nmap <F5> <Plug>MarkdownPreview
|
autocmd FileType markdown nmap <F5> <Plug>MarkdownPreview
|
||||||
autocmd FileType mail nmap <F6> <Plug>MarkdownPreviewStop
|
autocmd FileType markdown nmap <F6> <Plug>MarkdownPreviewStop
|
||||||
autocmd FileType mail nmap <F7> <Plug>MarkdownPreviewToggle
|
autocmd FileType markdown nmap <F7> <Plug>MarkdownPreviewToggle
|
||||||
|
|
Loading…
Reference in New Issue