This commit is contained in:
asep komarudin 2023-12-28 22:31:43 +07:00
parent 3edacc24b8
commit 8254e41ef5
2 changed files with 30 additions and 3 deletions

View file

@ -45,3 +45,30 @@ Map({ "n", "v" }, "zJ", Git_revert_change)
Map({ "n", "v" }, "zj", Git_stage_change)
-- Map({ "n", "v" }, "zt", Vscode_ctrl_d)
-- Map({ "n", "v" }, "zb", Vscode_ctrl_u)
vim.api.nvim_exec(
[[
" THEME CHANGER
function! SetCursorLineNrColorInsert(mode)
" Insert mode: blue
if a:mode == "i"
call VSCodeNotify('nvim-theme.insert')
" Replace mode: red
elseif a:mode == "r"
call VSCodeNotify('nvim-theme.replace')
endif
endfunction
augroup CursorLineNrColorSwap
autocmd!
autocmd ModeChanged *:[vV\x16]* call VSCodeNotify('nvim-theme.visual')
autocmd ModeChanged *:[R]* call VSCodeNotify('nvim-theme.replace')
autocmd InsertEnter * call SetCursorLineNrColorInsert(v:insertmode)
autocmd InsertLeave * call VSCodeNotify('nvim-theme.normal')
autocmd CursorHold * call VSCodeNotify('nvim-theme.normal')
autocmd ModeChanged [vV\x16]*:* call VSCodeNotify('nvim-theme.normal')
augroup END
]],
false
)