mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-22 17:03:36 +02:00
add: update config global variable
This commit is contained in:
parent
e59e8dba26
commit
24320e58f8
5 changed files with 15 additions and 29 deletions
|
@ -1,4 +1,4 @@
|
||||||
local transparent_mode = require("core.config").transparent_mode
|
local transparent_mode = vim.g.pcode_transparent_mode
|
||||||
if transparent_mode ~= nil then
|
if transparent_mode ~= nil then
|
||||||
if transparent_mode == 1 then
|
if transparent_mode == 1 then
|
||||||
vim.cmd("TransparentDisable")
|
vim.cmd("TransparentDisable")
|
||||||
|
|
|
@ -27,6 +27,7 @@ vim.g.pcode_colorscheme = "dracula"
|
||||||
-- nightfox
|
-- nightfox
|
||||||
-- 0 =off 1= on
|
-- 0 =off 1= on
|
||||||
vim.g.pcode_transparent_mode = 0
|
vim.g.pcode_transparent_mode = 0
|
||||||
|
vim.g.pcode_clear_lualine = 0
|
||||||
-- 0 disable progress
|
-- 0 disable progress
|
||||||
-- 1 lualine lsp progress
|
-- 1 lualine lsp progress
|
||||||
-- 2 fidget progress
|
-- 2 fidget progress
|
||||||
|
|
|
@ -20,27 +20,19 @@ end
|
||||||
|
|
||||||
local fidget = true
|
local fidget = true
|
||||||
local lualine = false
|
local lualine = false
|
||||||
local data_exists, custom_ui = pcall(require, "core.config")
|
if vim.g.pcode_progress == 1 then
|
||||||
if data_exists then
|
|
||||||
if type(custom_ui) == "table" then
|
|
||||||
if custom_ui.progress == 1 then
|
|
||||||
fidget = false
|
fidget = false
|
||||||
lualine = true
|
lualine = true
|
||||||
elseif custom_ui.progress == 2 then
|
elseif vim.g.pcode_progress == 2 then
|
||||||
fidget = true
|
fidget = true
|
||||||
lualine = false
|
lualine = false
|
||||||
elseif custom_ui.progress == 0 then
|
elseif vim.g.pcode_progress == 0 then
|
||||||
fidget = false
|
fidget = false
|
||||||
lualine = false
|
lualine = false
|
||||||
else
|
else
|
||||||
fidget = true
|
fidget = true
|
||||||
lualine = false
|
lualine = false
|
||||||
end
|
end
|
||||||
end
|
|
||||||
else
|
|
||||||
fidget = true
|
|
||||||
lualine = false
|
|
||||||
end
|
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"j-hui/fidget.nvim",
|
"j-hui/fidget.nvim",
|
||||||
|
|
|
@ -1,18 +1,14 @@
|
||||||
local transparent = false
|
local transparent = false
|
||||||
local clear_lualine = false
|
local clear_lualine = false
|
||||||
local data_exists, config = pcall(require, "core.config")
|
|
||||||
if not data_exists then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local transparent_mode = config.transparent_mode
|
local transparent_mode = vim.g.pcode_transparent_mode
|
||||||
if transparent_mode ~= nil then
|
if transparent_mode ~= nil then
|
||||||
if transparent_mode == 1 then
|
if transparent_mode == 1 then
|
||||||
transparent = true
|
transparent = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local clear_line = config.clear_lualine
|
local clear_line = vim.g.pcode_clear_lualine
|
||||||
if clear_line ~= nil then
|
if clear_line ~= nil then
|
||||||
if clear_line == 1 then
|
if clear_line == 1 then
|
||||||
clear_lualine = true
|
clear_lualine = true
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
local sources = {}
|
local sources = {}
|
||||||
local data_exists, data = pcall(require, "core.config")
|
for _, nullls in pairs(vim.g.pcode_dap_ensure_installed) do
|
||||||
if data_exists then
|
|
||||||
for _, nullls in pairs(data.dap_ensure_installed) do
|
|
||||||
table.insert(sources, nullls)
|
table.insert(sources, nullls)
|
||||||
end
|
end
|
||||||
end
|
|
||||||
require("mason").setup()
|
require("mason").setup()
|
||||||
require("mason-nvim-dap").setup({
|
require("mason-nvim-dap").setup({
|
||||||
ensure_installed = sources,
|
ensure_installed = sources,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue