From 44698f9bbafedeea8370373479545a1318798e87 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Sat, 10 Sep 2022 08:10:42 +0100 Subject: fish stuff --- fish/fish_variables | 2 +- fish/functions/def.fish | 3 +++ fish/functions/mutt.fish | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 fish/functions/def.fish diff --git a/fish/fish_variables b/fish/fish_variables index 04804be..dd99f4f 100644 --- a/fish/fish_variables +++ b/fish/fish_variables @@ -40,5 +40,5 @@ SETUVAR fish_pager_color_description:B3A06D\x1eyellow SETUVAR fish_pager_color_prefix:white\x1e\x2d\x2dbold\x1e\x2d\x2dunderline SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan SETUVAR fish_pager_color_selected_background:\x2dr -SETUVAR fish_user_paths:/home/lemon/bin\x2dscripts/\x1e/home/lemon/perl5/perlbrew/bin/\x1e/usr/lib/cargo/bin/\x1e/home/lemon/go/bin\x1e/usr/local/go/bin\x1e/snap/bin\x1e/home/lemon/\x2epoetry/bin\x1e/home/lemon/\x2ecargo/bin\x1e/home/lemon/bin\x1e/home/lemon/bin/adb\x2dfastboot/platform\x2dtools/\x1e/home/lemon/\x2efzf/bin +SETUVAR fish_user_paths:/usr/local/jdk\x2d11/bin\x1e/home/lemon/bin\x2dscripts/\x1e/home/lemon/perl5/perlbrew/bin/\x1e/usr/lib/cargo/bin/\x1e/home/lemon/go/bin\x1e/usr/local/go/bin\x1e/snap/bin\x1e/home/lemon/\x2epoetry/bin\x1e/home/lemon/\x2ecargo/bin\x1e/home/lemon/bin\x1e/home/lemon/bin/adb\x2dfastboot/platform\x2dtools/\x1e/home/lemon/\x2efzf/bin SETUVAR fisher_dependency_count:Colored\x2dMan\x2dPages\x1ebass diff --git a/fish/functions/def.fish b/fish/functions/def.fish new file mode 100644 index 0000000..dce8394 --- /dev/null +++ b/fish/functions/def.fish @@ -0,0 +1,3 @@ +function def --description 'Search up words on the command line using the power of Google!' --argument word + lynx "https://www.google.com/search?q=define+$word" +end diff --git a/fish/functions/mutt.fish b/fish/functions/mutt.fish index 72c6a50..d9b9fed 100644 --- a/fish/functions/mutt.fish +++ b/fish/functions/mutt.fish @@ -1,3 +1,3 @@ function mutt --wraps='neomutt -f Mail/fastmail/INBOX/' --description 'alias mutt=neomutt -f Mail/fastmail/INBOX/' - cd ~/Downloads && neomutt -f Mail/fastmail/INBOX/ $argv; + cd ~/Downloads && neomutt -f ~/Mail/fastmail/INBOX/ $argv; end -- cgit v1.2.3 From 2ee9385753b519e7af6e26dd5c5e0572251de922 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Sat, 10 Sep 2022 08:12:47 +0100 Subject: added new go vim plugin --- vim/plugin/lsp.vim | 45 +++++++++++++++++++++++++++++++++++++++++++++ vim/vimrc | 3 ++- 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 vim/plugin/lsp.vim diff --git a/vim/plugin/lsp.vim b/vim/plugin/lsp.vim new file mode 100644 index 0000000..ea2f62d --- /dev/null +++ b/vim/plugin/lsp.vim @@ -0,0 +1,45 @@ +func! s:setup_ls(...) abort + let l:servers = lsp#get_allowed_servers() + + " key mappings + for l:server in l:servers + let l:cap = lsp#get_server_capabilities(l:server) + + if has_key(l:cap, 'completionProvider') + setlocal completefunc=lsp#complete + endif + + if has_key(l:cap, 'hoverProvider') + setlocal keywordprg=:LspHover + endif + + if has_key(l:cap, 'codeActionProvider') + nmap ga (lsp-code-action) + endif + + if has_key(l:cap, 'definitionProvider') + nmap gd (lsp-definition) + nmap gk (lsp-peek-definition) + endif + endfor +endfunc + +" register language server +augroup LSC + autocmd! + autocmd User lsp_setup call lsp#register_server({ + \ 'name': 'gopls', + \ 'cmd': {_->['gopls']}, + \ 'allowlist': ['go'] + \}) + + autocmd User lsp_server_init call setup_ls() + autocmd BufEnter * call setup_ls() +augroup END + +" disable diagnostics etc. +let g:lsp_diagnostics_enabled = 0 +let g:lsp_diagnostics_signs_enabled = 0 +let g:lsp_diagnostics_virtual_text_enabled = 0 +let g:lsp_diagnostics_highlights_enabled = 0 +let g:lsp_document_code_action_signs_enabled = 0 diff --git a/vim/vimrc b/vim/vimrc index 8a7be8f..c083015 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -89,7 +89,7 @@ noremap k gk set shell=/bin/sh set hi=500 set novisualbell -set nonumber "show line numbers +"set nonumber "show line numbers set wildmenu "enable a menu that shows tab completion options in the status bar set wildchar= set showmatch "highlights matching brackets on cursor hover @@ -144,6 +144,7 @@ autocmd BufLeave * call s:copy_filename_as_mdlink() " vim-plug call plug#begin('~/.vim/plugged') Plug 'morhetz/gruvbox' +Plug 'prabirshrestha/vim-lsp' Plug 'alok/notational-fzf-vim' Plug 'sheerun/vim-polyglot' "Plug 'neoclide/coc.nvim', {'branch': 'release'} -- cgit v1.2.3 From 1d2fc98e8375017eb19017c5f98277c7e52c5a16 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Sat, 10 Sep 2022 08:13:08 +0100 Subject: back to Terminus --- Xresources_openbsd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Xresources_openbsd b/Xresources_openbsd index 18a2cb3..b3cfe56 100644 --- a/Xresources_openbsd +++ b/Xresources_openbsd @@ -17,8 +17,8 @@ Xft.rgba : rgb !xterm*faceName: xft:monospace:pixelsize=15 !xterm*faceName : DejaVu Sans mono:size=10 !xterm*faceName : Hack-Regular:size=8 -!xterm*faceName : Terminus:size=10:style=Bold -xterm*faceName : JetBrainsMono:size=9 +xterm*faceName : Terminus:size=10 +!xterm*faceName : JetBrainsMono:size=9 XTerm*backarrowKey : false XTerm.vt100.backarrowKey: false XTerm.ttyModes : erase ^? -- cgit v1.2.3 From b206d24769c4372bdc44e4a5772565f2b7075bad Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Sat, 10 Sep 2022 08:13:26 +0100 Subject: added config to ledgerrc --- ledgerrc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ledgerrc b/ledgerrc index aac0c41..cc32106 100644 --- a/ledgerrc +++ b/ledgerrc @@ -1,2 +1,4 @@ --strict --file ~/Documents/Budget/ledger/2022/budget2022.ldg +--date-format=%d-%b-%y +--start-of-week=1 -- cgit v1.2.3