From c6c08f5b7a89dd437c113f3f535b091666b4628f Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Fri, 31 May 2024 08:44:44 +0100 Subject: Playing with minimal vimrc again --- vim-minimal-example | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 vim-minimal-example (limited to 'vim-minimal-example') diff --git a/vim-minimal-example b/vim-minimal-example new file mode 100644 index 0000000..b196c91 --- /dev/null +++ b/vim-minimal-example @@ -0,0 +1,70 @@ +" from https://github.com/nir9/poc/blob/master/.vimrc + +set number + +color desert + +syntax on + +filetype plugin indent on +set tabstop=4 +set shiftwidth=4 + +set wildmenu +set hidden + +set wildignore=*.exe,*.dll,*.pdb + +set guifont=Cascadia_Mono:h24 + +set guioptions-=m +set guioptions-=T +set guioptions-=r + +set cursorline + +function InitLspPlugins() + call plug#begin('~/vimplugins') + + Plug 'prabirshrestha/vim-lsp' + Plug 'mattn/vim-lsp-settings' + + call plug#end() +endfunction + +" If you want just a simple Vim config with no plugins, just comment the +" following line +call InitLspPlugins() + +" By default I want no LSP, sometimes when needed, I can simply call StartLsp +" to start it +function g:StartLsp() + function! OnLspBufferEnabled() abort + setlocal omnifunc=lsp#complete + setlocal signcolumn=yes + nmap gi (lsp-definition) + nmap gd (lsp-declaration) + nmap gr (lsp-references) + nmap gl (lsp-document-diagnostics) + nmap (lsp-rename) + nmap (lsp-hover) + endfunction + + augroup lsp_install + au! + autocmd User lsp_buffer_enabled call OnLspBufferEnabled() + augroup END + +endfunction + +set spell + +set is + +set ignorecase +set smartcase + +set gp=git\ grep\ -n +set ruler + +packadd! matchit -- cgit v1.2.3