diff options
| author | navewindre <boneyaard@gmail.com> | 2024-11-06 04:26:23 +0100 |
|---|---|---|
| committer | navewindre <boneyaard@gmail.com> | 2024-11-06 04:26:23 +0100 |
| commit | 1cf1bc505396777fbe9ac2ee7755c54f9bbcca63 (patch) | |
| tree | 5dda33bd4c85f9cdbac04ce441915a33eeb2c783 /vimrc | |
| parent | 1980e2439978082d469b7cdb4b24ad51bf8b1eda (diff) | |
tabby toggle in vim
Diffstat (limited to 'vimrc')
| -rw-r--r-- | vimrc | 35 |
1 files changed, 32 insertions, 3 deletions
@@ -3,7 +3,6 @@ let g:vsnip_snippet_dir = '~/.config/nvim/snippets' " fuck zig niggers let g:polyglot_disabled = ['autoindent'] - lua <<EOF local Plug = vim.fn['plug#']; vim.call('plug#begin'); @@ -306,7 +305,7 @@ let g:lightline = { \ [ 'readonly', 'filename', 'modified' ] ], \ 'right': [ [ 'lineinfo' ], \ [ 'percent' ], - \ [ 'fmtcustom', 'enccustom', 'ftcustom', 'wpm' ] ] + \ [ 'fmtcustom', 'tabbycustom', 'enccustom', 'ftcustom', 'wpm' ] ] \ }, \ 'tabline': { \ 'left': [ ['buffers'] ], @@ -324,7 +323,8 @@ let g:lightline = { \ 'ftcustom': 'CustomFT', \ 'enccustom': 'CustomEncode', \ 'fmtcustom': 'CustomFileFormat', - \ 'tabscustom': 'CustomTabs' + \ 'tabscustom': 'CustomTabs', + \ 'tabbycustom': 'TabbyStatus' \ } \ } @@ -430,6 +430,32 @@ function WPM() return '' endfunction +function TabbyStatus() + if !exists("g:tabby_inline_completion_trigger") + let g:tabby_inline_completion_trigger = 'auto' + endif + if g:tabby_inline_completion_trigger == 'auto' + return '' + endif + if g:tabby_inline_completion_trigger == 'manual' + return 'ai: manual' + endif + return 'ai: off' +endfunction + +function ToggleTabby() + if !exists("g:tabby_inline_completion_trigger") + let g:tabby_inline_completion_trigger = 'auto' + endif + if g:tabby_inline_completion_trigger == 'auto' + let g:tabby_inline_completion_trigger = 'manual' + elseif g:tabby_inline_completion_trigger == 'off' + let g:tabby_inline_completion_trigger = 'auto' + else + let g:tabby_inline_completion_trigger = 'off' + endif +endfunction + function! TablineTabs() return lightline#tabline() endfunction @@ -624,6 +650,9 @@ vnoremap ]] /}<CR>:<C-u>nohl<CR>gv vnoremap ][ /{<CR>:<C-u>nohl<CR>gv vnoremap [] ?}<CR>:<C-u>nohl<CR>gv +nnoremap <C-l> <C-i> +nnoremap <leader>ta :call ToggleTabby()<CR> + colorscheme base16-synth-midnight-dark hi LineNr guibg=#000000 hi String ctermfg=1 guifg=#ea5971 |
