From a3bbda09755c3e6da37b3fdcf73ebe6a31067979 Mon Sep 17 00:00:00 2001 From: Akemi Izuko Date: Wed, 17 Jul 2024 17:21:33 -0600 Subject: [PATCH] Vim: correct comment length --- vim/.vim/init_scripts/external_plugins.vim | 39 +++++++++++++++++----- vim/.vim/plugin/pretty_section_comment.vim | 22 ++++++------ vim/.vim/plugin/statusbars/statusline.vim | 4 +-- 3 files changed, 43 insertions(+), 22 deletions(-) diff --git a/vim/.vim/init_scripts/external_plugins.vim b/vim/.vim/init_scripts/external_plugins.vim index feac193..b98fc5a 100644 --- a/vim/.vim/init_scripts/external_plugins.vim +++ b/vim/.vim/init_scripts/external_plugins.vim @@ -71,6 +71,7 @@ Plug 'catppuccin/nvim', {'as': 'catppuccin'} Plug 'dracula/vim', { 'as': 'dracula' } Plug 'RRethy/nvim-base16' Plug 'waycrate/swhkd-vim' +Plug 'wuelnerdotexe/vim-astro' " Python ==== " Shows line indent guides @@ -82,9 +83,13 @@ Plug 'sheerun/vim-polyglot' " Latex ==== " LaTeX support -Plug 'lervag/vimtex' +"Plug 'lervag/vimtex' " LaTex snippets. Requires python -Plug 'SirVer/ultisnips', { 'tag': '*3.2' } +"Plug 'SirVer/ultisnips', { 'tag': '*3.2' } + +" Language server =================================================== +Plug 'w0rp/ale' +Plug 'TabbyML/vim-tabby' call plug#end() @@ -113,13 +118,13 @@ let g:vifm_replace_netrw_cmd = "Vifm" "let g:vifm_embed_split = 1 " TreeSitter ============================================= -lua <ogit :GitGutterToggle +" Ale LSP ================================================ + +let g:ale_fixers = { + \ 'javascript': ['eslint'] + \ } + +let g:ale_sign_error = '❌' +let g:ale_sign_warning = '⚠️' +let g:ale_fix_on_save = 0 + +" Tabby llama completion ================================= +let g:tabby_keybinding_accept = '' +let g:tabby_trigger_mode = 'auto' + +nnoremap :let g:tabby_trigger_mode = (g:tabby_trigger_mode == 'auto' ? 'manual' : 'auto') + " FZF setup ============================================== " Open hotkeys for fzf nnoremap :Files diff --git a/vim/.vim/plugin/pretty_section_comment.vim b/vim/.vim/plugin/pretty_section_comment.vim index 7df0789..0d963d5 100644 --- a/vim/.vim/plugin/pretty_section_comment.vim +++ b/vim/.vim/plugin/pretty_section_comment.vim @@ -18,30 +18,30 @@ function! PrettySectionComment(type) if a:type ==# '/*' call append(line(".") - 1, - \ "/*─────────────────────────────────────────────────────────────────────────────╗") + \ "/*────────────────────────────────────────────────────────────────────────────╗") call append(line("."), - \ "╚─────────────────────────────────────────────────────────────────────────────*/") + \ "╚────────────────────────────────────────────────────────────────────────────*/") elseif a:type ==# "") + \ "╚───────────────────────────────────────────────────────────────────────────-->") elseif a:type ==# '//' call append(line(".") - 1, - \ "//╔────────────────────────────────────────────────────────────────────────────╗") + \ "//╔───────────────────────────────────────────────────────────────────────────╗") call append(line("."), - \ "//╚────────────────────────────────────────────────────────────────────────────╝") + \ "//╚───────────────────────────────────────────────────────────────────────────╝") else call append(line(".") - 1, - \ "#╔─────────────────────────────────────────────────────────────────────────────╗") + \ "#╔────────────────────────────────────────────────────────────────────────────╗") call append(line("."), - \ "#╚─────────────────────────────────────────────────────────────────────────────╝") + \ "#╚────────────────────────────────────────────────────────────────────────────╝") endif " Delete text exe "normal! ^D0" - " Insert 80 spaces - exe "normal! 80i \" + " Insert 79 spaces + exe "normal! 79i \" " Paste back in commented text if a:type ==# '/*' @@ -55,5 +55,5 @@ function! PrettySectionComment(type) endif " Add closing bar on right - exe "normal! 079li|\" + exe "normal! 078li|\" endfunction diff --git a/vim/.vim/plugin/statusbars/statusline.vim b/vim/.vim/plugin/statusbars/statusline.vim index af92f9d..f2f0d2c 100644 --- a/vim/.vim/plugin/statusbars/statusline.vim +++ b/vim/.vim/plugin/statusbars/statusline.vim @@ -247,7 +247,7 @@ function! StatlnFull(part) return ' ' . StatlnMode() elseif 'seperator' ==# a:part - return ' ' + return '' elseif 'file_name' ==# a:part let l:file_name = fnamemodify(bufname('%'), ':t') @@ -307,7 +307,7 @@ function! StatlnSmall(part) return ' ' . repeat('—', l:len - 1) elseif 'seperator' ==# a:part - return ' ' + return '' elseif 'file_name' ==# a:part return ' ' . fnamemodify(bufname("%"), ':t') . ' ' . StatlnModified()