From cdb2f0fda7af95771cc24b4723d6d43b9e71d209 Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Sat, 13 Sep 2025 11:59:07 +0200 Subject: update --- .bkignore | 1 + .config/kitty/kitty.conf | 11 +++- .nexrc | 20 +++++-- .vim/pack/mvertes/install.sh | 5 +- .vimrc | 124 +++++++++++++++++++++++-------------------- 5 files changed, 94 insertions(+), 67 deletions(-) diff --git a/.bkignore b/.bkignore index a3a55f2..b605233 100644 --- a/.bkignore +++ b/.bkignore @@ -16,6 +16,7 @@ Library/DuetExpertCenter Library/Suggestions Library/Trial Library/Weather +.cache caches Caches Cache diff --git a/.config/kitty/kitty.conf b/.config/kitty/kitty.conf index 6236cf2..62dc588 100644 --- a/.config/kitty/kitty.conf +++ b/.config/kitty/kitty.conf @@ -25,7 +25,8 @@ # font_size 11.0 # font_family Fira Code -font_size 14.0 +font_family Fixed 6x13 +font_size 13.0 #: Font size (in pts) @@ -169,7 +170,7 @@ font_size 14.0 shell_integration no-cursor # cursor #cccccc -cursor #ff0000 +# cursor #ff0000 #: Default cursor color @@ -1518,3 +1519,9 @@ allow_remote_control yes #: }}} #: }}} + + +# BEGIN_KITTY_THEME +# Alabaster +include current-theme.conf +# END_KITTY_THEME diff --git a/.nexrc b/.nexrc index 3978cec..f6e9e30 100644 --- a/.nexrc +++ b/.nexrc @@ -4,10 +4,20 @@ set wrapscan set extended set iclower set noflash +set tabstop=4 +set shiftwidth=4 set filec= -" Edit the content of current word as a file -map ge yeopI:e! "add@a -" Create an entry in tags for the current file -map gt :!echo '% % 1' >>tags; sort -o tags -Vu tags +" set filec=\ +" set cedit=\ + " Open the long word under the cursor -map ,o "ayEo"apI:!open "add@a +map go "ayEo"apI:!open "add@a + +" Jump to WikiWord and create files on the fly using tags +map gt mz"zyeo"zpA "zpA 1:.w!>>tags :!LC_ALL=C sort -o tags -u tags ddo"zpI:ta "zdd`z@z + +" Search next WikiWord +map gn /[A-Z][A-Za-z0-9_]+[A-Z]/ + +" Jump to go identifier definition using dynamic tag. +map gd D:+1,$d :1,$!wc -c 0cw:!gotag % "yddu..@y :ta _ diff --git a/.vim/pack/mvertes/install.sh b/.vim/pack/mvertes/install.sh index 8843982..e9cfa0e 100755 --- a/.vim/pack/mvertes/install.sh +++ b/.vim/pack/mvertes/install.sh @@ -2,10 +2,11 @@ plugins=' git@github.com:junegunn/fzf.vim -#git@github.com:fatih/vim-go +git@github.com:fatih/vim-go git@github.com:mvertes/vimki -git@github.com:prabirshrestha/vim-lsp ' +# git@github.com:prabirshrestha/vim-lsp + ht='test -d doc && vim -c "helptags doc" -c "q"' mkdir -p start diff --git a/.vimrc b/.vimrc index 3f29700..96983d3 100644 --- a/.vimrc +++ b/.vimrc @@ -93,7 +93,7 @@ hi SpellBad gui=undercurl noremap n :bn noremap :bd noremap o :!open & -noremap :tag +noremap :tag noremap :Files noremap e :cn " go to quickfix next error @@ -123,62 +123,69 @@ endfunction noremap :call CloseOnLast() -" vim-lsp settings -let g:lsp_diagnostics_enabled = 0 -let g:lsp_document_code_action_signs_enabled = 0 -let g:lsp_document_highlight_enabled = 0 -"let g:lsp_log_verbose = 1 -"let g:lsp_log_file = expand('~/vim-lsp.log') - -if executable('gopls') - au User lsp_setup call lsp#register_server({ - \ 'name': 'gopls', - \ 'cmd': {server_info->['gopls', '-remote=auto']}, - \ 'allowlist': ['go', 'gomod', 'gohtmltmpl', 'gotexttmpl'], - \ }) - autocmd BufWritePre *.go - \ call execute('LspDocumentFormatSync') | - \ call execute('LspCodeActionSync source.organizeImports') -endif - -if executable('gnopls') - au User lsp_setup call lsp#register_server({ - \ 'name': 'gnopls', - \ 'cmd': {server_info->['gnopls']}, - \ 'allowlist': ['gno'], - \ }) - autocmd BufWritePre *.gno - \ call execute('LspDocumentFormatSync') | - \ call execute('LspCodeActionSync source.organizeImports') -endif - -if executable('clangd') - au User lsp_setup call lsp#register_server({ - \ 'name': 'clangd', - \ 'cmd': {server_info->['clangd', '-background-index']}, - \ 'whitelist': ['c', 'cpp', 'objc', 'objcpp'], - \ }) -endif - -function! s:on_lsp_buffer_enabled() abort - setlocal omnifunc=lsp#complete - if exists('+tagfunc') | setlocal tagfunc=lsp#tagfunc | endif - nmap gd (lsp-definition) - nmap gs (lsp-document-symbol-search) - nmap gS (lsp-workspace-symbol-search) - nmap gr (lsp-references) - nmap gi (lsp-implementation) - nmap gy (lsp-type-definition) - nmap rn (lsp-rename) - nmap [g (lsp-previous-diagnostic) - nmap ]g (lsp-next-diagnostic) - nmap K (lsp-hover) -endfunction - -augroup lsp_install - au! - autocmd User lsp_buffer_enabled call s:on_lsp_buffer_enabled() -augroup END +" vim-go settings +let g:go_gopls_enabled = 0 +let g:go_def_mode = 'godef' +let g:go_fmt_command = 'goimports' +let g:go_imports_mode = 'goimports' +let g:go_rename_command = 'gorename' + +" " vim-lsp settings +" let g:lsp_diagnostics_enabled = 0 +" let g:lsp_document_code_action_signs_enabled = 0 +" let g:lsp_document_highlight_enabled = 0 +" "let g:lsp_log_verbose = 1 +" "let g:lsp_log_file = expand('~/vim-lsp.log') +" +" if executable('gopls') +" au User lsp_setup call lsp#register_server({ +" \ 'name': 'gopls', +" \ 'cmd': {server_info->['gopls', '-remote=auto']}, +" \ 'allowlist': ['go', 'gomod', 'gohtmltmpl', 'gotexttmpl'], +" \ }) +" autocmd BufWritePre *.go +" \ call execute('LspDocumentFormatSync') | +" \ call execute('LspCodeActionSync source.organizeImports') +" endif +" +" if executable('gnopls') +" au User lsp_setup call lsp#register_server({ +" \ 'name': 'gnopls', +" \ 'cmd': {server_info->['gnopls']}, +" \ 'allowlist': ['gno'], +" \ }) +" autocmd BufWritePre *.gno +" \ call execute('LspDocumentFormatSync') | +" \ call execute('LspCodeActionSync source.organizeImports') +" endif +" +" if executable('clangd') +" au User lsp_setup call lsp#register_server({ +" \ 'name': 'clangd', +" \ 'cmd': {server_info->['clangd', '-background-index']}, +" \ 'whitelist': ['c', 'cpp', 'objc', 'objcpp'], +" \ }) +" endif +" +" function! s:on_lsp_buffer_enabled() abort +" setlocal omnifunc=lsp#complete +" if exists('+tagfunc') | setlocal tagfunc=lsp#tagfunc | endif +" nmap gd (lsp-definition) +" nmap gs (lsp-document-symbol-search) +" nmap gS (lsp-workspace-symbol-search) +" nmap gr (lsp-references) +" nmap gi (lsp-implementation) +" nmap gy (lsp-type-definition) +" nmap rn (lsp-rename) +" nmap [g (lsp-previous-diagnostic) +" nmap ]g (lsp-next-diagnostic) +" nmap K (lsp-hover) +" endfunction +" +" augroup lsp_install +" au! +" autocmd User lsp_buffer_enabled call s:on_lsp_buffer_enabled() +" augroup END " Git blame command! Blame normal!:let @a=expand('%'):let @b=line('.'):new:set bt=nofile:%!git blame -wM --date=short a:b @@ -186,4 +193,5 @@ command! Blame normal!:let @a=expand('%'):let @b=line('.'):new:set b " edit current word as file noremap ge :e " create a tag entry for current filename -noremap gt :!echo "% % 1" >> tags; sort -o tags -Vu tags +" noremap gt :!echo "% % 1" >> tags; LC_ALL=C sort -o tags -u tags +noremap t :!echo "% % 1" >> tags; LC_ALL=C sort -o tags -u tags -- cgit v1.2.3