summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornavewindre <boneyaard@gmail.com>2024-11-06 04:26:23 +0100
committernavewindre <boneyaard@gmail.com>2024-11-06 04:26:23 +0100
commit1cf1bc505396777fbe9ac2ee7755c54f9bbcca63 (patch)
tree5dda33bd4c85f9cdbac04ce441915a33eeb2c783
parent1980e2439978082d469b7cdb4b24ad51bf8b1eda (diff)
tabby toggle in vim
-rw-r--r--vimrc35
1 files changed, 32 insertions, 3 deletions
diff --git a/vimrc b/vimrc
index 26ab150..5fc629e 100644
--- a/vimrc
+++ b/vimrc
@@ -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