summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Lemon <matt@matthewlemon.com>2022-09-14 10:45:20 +0100
committerMatthew Lemon <matt@matthewlemon.com>2022-09-14 10:45:20 +0100
commit7351a04ebf644bfef4c2069f1f86bc38a98279fa (patch)
treeb57e3aa284281f22ed497a1aaf09801aaa4639ff
parent6cf70895100bd7f364f5adf097dfce7d8d1df22e (diff)
parentb206d24769c4372bdc44e4a5772565f2b7075bad (diff)
Merge branch 'master' of github.com:yulqen/openbsddotfiles
-rw-r--r--Xresources_openbsd4
-rw-r--r--fish/fish_variables2
-rw-r--r--fish/functions/def.fish3
-rw-r--r--fish/functions/mutt.fish2
-rw-r--r--ledgerrc2
-rw-r--r--vim/plugin/lsp.vim45
-rw-r--r--vim/vimrc3
7 files changed, 56 insertions, 5 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 ^?
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 68c3b25..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
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
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 <silent><buffer>ga <plug>(lsp-code-action)
+ endif
+
+ if has_key(l:cap, 'definitionProvider')
+ nmap <silent><buffer>gd <plug>(lsp-definition)
+ nmap <silent><buffer>gk <plug>(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 <SID>setup_ls()
+ autocmd BufEnter * call <SID>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 e498398..32b5ab5 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=<TAB>
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'}