diff options
author | Matthew Lemon <y@yulqen.org> | 2024-05-31 08:44:44 +0100 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2024-05-31 08:44:44 +0100 |
commit | c6c08f5b7a89dd437c113f3f535b091666b4628f (patch) | |
tree | a9860b5fa5d0296440c3752010cf659de096f5af | |
parent | 6211a126ae959ebb344ef4c8b4501d04ee992241 (diff) |
Playing with minimal vimrc again
-rw-r--r-- | vim-minimal-example | 70 | ||||
-rw-r--r-- | vimrc-bare | 11 |
2 files changed, 77 insertions, 4 deletions
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 <buffer> gi <plug>(lsp-definition) + nmap <buffer> gd <plug>(lsp-declaration) + nmap <buffer> gr <plug>(lsp-references) + nmap <buffer> gl <plug>(lsp-document-diagnostics) + nmap <buffer> <f2> <plug>(lsp-rename) + nmap <buffer> <f3> <plug>(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 @@ -1,9 +1,10 @@ filetype plugin on filetype plugin indent on -source ~/.vim/grep.vim +"source ~/.vim/grep.vim set autoread +set foldmethod=manual set autowrite set backspace=indent,eol,start "set colorcolumn=80 @@ -45,10 +46,12 @@ set ttimeout set ttimeoutlen=100 set viminfo= set wildmenu +set wildoptions=pum set wildmode=full set wrap -syntax enable +"set gp=git\ grep\ -n +packadd! matchit -set background=light -colorscheme delek +set background=dark +syntax off |