vscode
This commit is contained in:
parent
bddb567c11
commit
a07b964ee5
5
init.lua
5
init.lua
|
@ -137,6 +137,11 @@ local function augroup(name)
|
|||
return vim.api.nvim_create_augroup("plex_" .. name, {})
|
||||
end
|
||||
|
||||
-- guis
|
||||
if vim.g.vscode then
|
||||
require("vscode")
|
||||
end
|
||||
|
||||
-- mappings
|
||||
local load_mappings = function(section, mapping_opt)
|
||||
vim.schedule(function()
|
||||
|
|
|
@ -329,7 +329,7 @@ M.edit = {
|
|||
|
||||
-- format
|
||||
["<leader>ff"] = {
|
||||
vim.lsp.buf.format(),
|
||||
"gg=G",
|
||||
"format buffer",
|
||||
},
|
||||
},
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
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)
|
Loading…
Reference in New Issue