diff options
author | Julian T <julian@jtle.dk> | 2020-04-21 21:57:54 +0200 |
---|---|---|
committer | Julian T <julian@jtle.dk> | 2020-04-21 21:57:54 +0200 |
commit | 373e4c4bc85547253ae68866f1459f68dea549e7 (patch) | |
tree | c253ee8264b9498607f0fabc40ce65ab28b109ee | |
parent | e865e1765043df76bc6e080323bca5c85fd3cec7 (diff) |
Back on lsp and trying vimwiki
-rw-r--r-- | vim/.vimrc | 33 |
1 files changed, 29 insertions, 4 deletions
@@ -16,7 +16,7 @@ set shellslash " Completion Plugin 'prabirshrestha/async.vim' Plugin 'prabirshrestha/vim-lsp' - " Plugin 'fatih/vim-go' + Plugin 'fatih/vim-go' Plugin 'ajh17/VimCompletesMe' " Plugin 'ludovicchabant/vim-gutentags' @@ -51,6 +51,8 @@ set shellslash " Plugin 'rust-lang/rust.vim' " Plugin 'racer-rust/vim-racer' + Plugin 'vimwiki/vimwiki' + " Snippets are separated from the engine. Add this if you want them: " Plugin 'honza/vim-snippets' @@ -65,10 +67,21 @@ set shellslash " let g:rustfmt_autosave = 1 autocmd FileType c let b:vcm_tab_complete = 'omni' + autocmd FileType py let b:vcm_tab_complete = 'omni' autocmd FileType go let b:vcm_tab_complete = 'omni' autocmd FileType vim let b:vcm_tab_complete = 'vim' " Setup lsp servers + let g:lsp_diagnostics_echo_cursor = 0 + let g:lsp_signature_help_enabled = 0 + let g:lsp_insert_text_enabled = 0 + if executable('pyls') + au User lsp_setup call lsp#register_server({ + \ 'name': 'python', + \ 'cmd': {server_info->['pyls']}, + \ 'whitelist': ['python'], + \ }) + endif if executable('clangd') au User lsp_setup call lsp#register_server({ \ 'name': 'clangd', @@ -76,6 +89,13 @@ set shellslash \ 'whitelist': ['c', 'cpp'], \ }) endif + if executable('gopls') + au User lsp_setup call lsp#register_server({ + \ 'name': 'golang', + \ 'cmd': {server_info->['gopls']}, + \ 'whitelist': ['go'], + \ }) + endif " Enable csp if available, stolen from lsp github function! s:on_lsp_buffer_enabled() abort @@ -93,9 +113,6 @@ set shellslash autocmd User lsp_buffer_enabled call s:on_lsp_buffer_enabled() augroup END - let g:lsp_log_verbose = 1 - let g:lsp_log_file = expand('/tmp/vim-lsp.log') - " General vim settings syntax enable set number @@ -105,6 +122,7 @@ set shellslash set shiftwidth=4 set softtabstop=4 set noexpandtab + set colorcolumn=80 " Remove statusline set laststatus=1 @@ -125,6 +143,12 @@ set shellslash " Persistent undo set undofile + " Exit insert mode on inactivity + " au CursorHoldI * stopinsert + +" Vimwiki stuff + let g:vimwiki_list = [{'path': '~/Documents/vimwiki', 'path_html': '~/Documents/vimwiki/export'}] + " Latex stuff let g:tex_flavor='latex' @@ -164,6 +188,7 @@ set shellslash map <leader>mm :make V=1<CR> map <leader>mf :make flash V=1<CR> map <leader>t :terminal<CR>i + map <leader>s :!echo > jtle_build_it<CR> " Enforcing filetypes autocmd BufRead,BufNewFile *.ino set filetype=c |