chore(nvim):plugin updates

This commit is contained in:
sankalp committed 2024-01-21 05:24:03 +05:45
1 parent eae35313ad
commit 1927634411
3 files changed
+37 -49

No files matched your search

+17 -28
View File
@@ -1,51 +1,40 @@
local Util = require("lazyvim.util")
local executeCommandIfExists = function(command)
if vim.fn.exists(command) ~= 0 then
vim.cmd(command)
end
end
return {
{
"folke/zen-mode.nvim",
cmd = "ZenMode",
keys = { { "<leader>uz", "<cmd>ZenMode<cr>", desc = "Toggle Zen Mode" } },
keys = { { "<leader>z", "<cmd>ZenMode<cr>", desc = "Zen Mode" } },
opts = {
on_open = function(_)
vim.opt.laststatus = 0
if vim.fn.exists(":SatelliteDisable") ~= 0 then
vim.cmd("SatelliteDisable")
end
if vim.fn.exists(":ScrollViewDisable") ~= 0 then
vim.cmd("ScrollViewDisable")
end
if vim.fn.exists(":LspLensOff") ~= 0 then
vim.cmd("LspLensOff")
end
if vim.fn.exists(":NvimContextVtToggle") ~= 0 then
vim.cmd("NvimContextVtToggle")
end
executeCommandIfExists(":SatelliteDisable")
executeCommandIfExists(":ScrollViewDisable")
executeCommandIfExists(":LspLensOff")
executeCommandIfExists(":NvimContextVtDisable")
Util.toggle.inlay_hints()
vim.cmd("Gitsigns toggle_current_line_blame")
executeCommandIfExists(":Gitsigns toggle_current_line_blame")
end,
on_close = function()
vim.opt.laststatus = 3
if vim.fn.exists(":SatelliteEnable") ~= 0 then
vim.cmd("SatelliteEnable")
end
if vim.fn.exists(":ScrollViewEnable") ~= 0 then
vim.cmd("ScrollViewEnable")
end
if vim.fn.exists(":LspLensOn") ~= 0 then
vim.cmd("LspLensOn")
end
if vim.fn.exists(":NvimContextVtToggle") ~= 0 then
vim.cmd("NvimContextVtToggle")
end
executeCommandIfExists(":SatelliteEnable")
executeCommandIfExists(":ScrollViewEnable")
executeCommandIfExists(":LspLensOn")
executeCommandIfExists(":NvimContextVtEnable")
Util.toggle.inlay_hints()
vim.cmd("Gitsigns toggle_current_line_blame")
executeCommandIfExists(":Gitsigns toggle_current_line_blame")
end,
},
},
{
"folke/twilight.nvim",
cmd = "Twilight",
keys = { { "<leader>uZ", "<cmd>Twilight<cr>", desc = "Toggle Twilight" } },
keys = { { "<leader>Z", "<cmd>Twilight<cr>", desc = "Zen Twilight" } },
opts = {},
},
}