From 7035480dba8fc78148092bf738194485093fa65e Mon Sep 17 00:00:00 2001 From: Marc Coquand Date: Sun, 30 Jun 2024 17:20:53 -0500 Subject: More config --- config/foot/foot.ini | 6 +-- vimrc | 142 +++++++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 125 insertions(+), 23 deletions(-) diff --git a/config/foot/foot.ini b/config/foot/foot.ini index 4345785..5adfb93 100644 --- a/config/foot/foot.ini +++ b/config/foot/foot.ini @@ -1,14 +1,14 @@ pad=8x4 -font=Iosevka Term:size=15:weight=light +font=KpMono:size=17:weight=light line-height=20 underline-thickness=1px underline-offset=4px box-drawings-uses-font-glyphs=yes +resize-by-cells=false [cursor] blink=true -style=beam -beam-thickness=2px +style=block [colors] foreground=333333 # Text diff --git a/vimrc b/vimrc index 966bfdf..3a39621 100644 --- a/vimrc +++ b/vimrc @@ -11,8 +11,10 @@ set cindent " Theme syntax on set background=light +set rnu colorscheme quiet hi Normal ctermfg=black ctermbg=white +"hi Keyword ctermfg=black cterm=bold hi SpellBad term=reverse cterm=underline ctermfg=124 ctermbg=white hi SpellCap term=reverse cterm=underline ctermfg=25 ctermbg=white hi SpellRare term=reverse cterm=underline ctermfg=30 ctermbg=white @@ -23,34 +25,132 @@ let &t_SI = "\[6 q" let &t_SR = "\[4 q" let &t_EI = "\[2 q" +" Pesky swap +set backupdir=~/.vim/backup// +set directory=~/.vim/swap// +set undodir=~/.vim/undo// + +" Netrw +let g:netrw_keepdir = 0 +let g:netrw_banner = 0 +let g:netrw_localcopydircmd = 'cp -r' +hi! link netrwMarkFile Search +nnoremap - :Explore + " LSP packadd lsp -call LspAddServer([#{ - \ name: 'caml', - \ filetype: ['ocaml'], - \ path: '/home/mccd/.opam/5.2.0/bin/ocamllsp', - \ args: [], - \ syncInit: v:true - \ }]) - -call LspAddServer([#{ - \ name: 'golang', - \ filetype: ['go', 'gomod'], - \ path: '/usr/bin/gopls', - \ args: ['serve'], - \ syncInit: v:true - \ }]) +if exists('g:loaded_lsp') + call LspOptionsSet(#{ + \ aleSupport: v:false, + \ autoComplete: v:false, + \ autoHighlight: v:false, + \ autoHighlightDiags: v:true, + \ autoPopulateDiags: v:true, + \ completionMatcher: 'case', + \ completionMatcherValue: 1, + \ diagSignErrorText: 'E', + \ diagSignHintText: 'H', + \ diagSignInfoText: 'I', + \ diagSignWarningText: 'W', + \ echoSignature: v:false, + \ hideDisabledCodeActions: v:false, + \ highlightDiagInline: v:true, + \ hoverInPreview: v:false, + \ ignoreMissingServer: v:true, + \ keepFocusInDiags: v:true, + \ keepFocusInReferences: v:true, + \ completionTextEdit: v:true, + \ diagVirtualTextAlign: 'above', + \ diagVirtualTextWrap: 'default', + \ noNewlineInCompletion: v:false, + \ omniComplete: v:null, + \ outlineOnRight: v:true, + \ outlineWinSize: 20, + \ semanticHighlight: v:false, + \ showDiagInBalloon: v:true, + \ showDiagInPopup: v:true, + \ showDiagOnStatusLine: v:false, + \ showDiagWithSign: v:false, + \ showDiagWithVirtualText: v:false, + \ showInlayHints: v:false, + \ showSignature: v:true, + \ snippetSupport: v:false, + \ ultisnipsSupport: v:false, + \ useBufferCompletion: v:false, + \ usePopupInCodeAction: v:false, + \ useQuickfixForLocations: v:false, + \ vsnipSupport: v:false, + \ bufferCompletionTimeout: 100, + \ customCompletionKinds: v:false, + \ completionKinds: {}, + \ filterCompletionDuplicates: v:false, + \ }) +end + +" Ocaml +if exists('g:loaded_lsp') + call LspAddServer([#{ + \ name: 'caml', + \ filetype: ['ocaml'], + \ path: 'ocamllsp', + \ args: [], + \ syncInit: v:true + \ }]) +end +autocmd Filetype ocaml autocmd BufWritePre :LspFormat + +" Go +if exists('g:loaded_lsp') + call LspAddServer([#{ + \ name: 'golang', + \ filetype: ['go', 'gomod'], + \ path: '/usr/bin/gopls', + \ args: ['serve'], + \ syncInit: v:true + \ }]) +end + +autocmd Filetype go set makeprg=go\ build +autocmd Filetype go autocmd BufWritePre :LspFormat + +" Nix +if exists('g:loaded_lsp') + call LspAddServer([#{ + \ name: 'nix', + \ filetype: ['nix'], + \ path: 'nixd', + \ args: [], + \ syncInit: v:true + \ }]) +end +autocmd Filetype nix autocmd BufWritePre :LspFormat + +" Markdown +if exists('g:loaded_lsp') + call LspAddServer([#{ + \ name: 'marksman', + \ filetype: ['markdown'], + \ path: 'marksman', + \ args: ['server'], + \ syncInit: v:true }]) +end + " Keybindings let mapleader=" " noremap , : noremap e :e **/ -noremap gd mB:LspGotoDefinition +noremap gd mB:LspGotoDefinition +noremap gs mB:LspDocumentSymbol +noremap gr mB:LspGotoImpl noremap ca :LspCodeAction -noremap k :LspDiagCurrent +noremap cr :LspRename +noremap m :make +noremap k :LspDiagCurrent +noremap K :LspHover nnoremap l :ls:b -nnoremap = :LspFormat +nnoremap = :LspFormat " Spell au BufEnter *.org set spell @@ -58,7 +158,9 @@ au BufEnter *.org set spell " Wildmenu set wildmenu set wildmode=longest:full,lastused -set wildignore=_build/**,release/** -set grepprg=git\ grep\ -nH +set wildignore=_build/**,release/**,node_modules/** +set wildoptions+=fuzzy +" Grep +set grepprg=git\ grep\ -nH -- cgit v1.2.3