diff --git a/lua/custom/autocmd.lua b/lua/custom/autocmd.lua index 6419fdb..2b1810a 100644 --- a/lua/custom/autocmd.lua +++ b/lua/custom/autocmd.lua @@ -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 == 1 then vim.cmd("TransparentDisable") diff --git a/lua/custom/default.lua b/lua/custom/default.lua index ee71ae1..f31e445 100644 --- a/lua/custom/default.lua +++ b/lua/custom/default.lua @@ -27,6 +27,7 @@ vim.g.pcode_colorscheme = "dracula" -- nightfox -- 0 =off 1= on vim.g.pcode_transparent_mode = 0 +vim.g.pcode_clear_lualine = 0 -- 0 disable progress -- 1 lualine lsp progress -- 2 fidget progress diff --git a/lua/plugins/lspprogress.lua b/lua/plugins/lspprogress.lua index 6620074..096b74e 100644 --- a/lua/plugins/lspprogress.lua +++ b/lua/plugins/lspprogress.lua @@ -20,23 +20,15 @@ end local fidget = true local lualine = false -local data_exists, custom_ui = pcall(require, "core.config") -if data_exists then - if type(custom_ui) == "table" then - if custom_ui.progress == 1 then - fidget = false - lualine = true - elseif custom_ui.progress == 2 then - fidget = true - lualine = false - elseif custom_ui.progress == 0 then - fidget = false - lualine = false - else - fidget = true - lualine = false - end - end +if vim.g.pcode_progress == 1 then + fidget = false + lualine = true +elseif vim.g.pcode_progress == 2 then + fidget = true + lualine = false +elseif vim.g.pcode_progress == 0 then + fidget = false + lualine = false else fidget = true lualine = false diff --git a/lua/plugins/transparant.lua b/lua/plugins/transparant.lua index 248fddd..c2ba28a 100644 --- a/lua/plugins/transparant.lua +++ b/lua/plugins/transparant.lua @@ -1,18 +1,14 @@ local transparent = 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 == 1 then transparent = true end end -local clear_line = config.clear_lualine +local clear_line = vim.g.pcode_clear_lualine if clear_line ~= nil then if clear_line == 1 then clear_lualine = true diff --git a/lua/user/mason_dap.lua b/lua/user/mason_dap.lua index 150fb22..5628f03 100644 --- a/lua/user/mason_dap.lua +++ b/lua/user/mason_dap.lua @@ -1,9 +1,6 @@ local sources = {} -local data_exists, data = pcall(require, "core.config") -if data_exists then - for _, nullls in pairs(data.dap_ensure_installed) do - table.insert(sources, nullls) - end +for _, nullls in pairs(vim.g.pcode_dap_ensure_installed) do + table.insert(sources, nullls) end require("mason").setup() require("mason-nvim-dap").setup({