From f46832029938b889aeb0dcc686460bf0f76225c5 Mon Sep 17 00:00:00 2001 From: "asep.komarudin" Date: Tue, 21 May 2024 18:42:12 +0700 Subject: [PATCH] add: update config --- lazy-lock.json | 2 +- lua/core/config.lua | 117 +++++++++++++++++++++++---------------- lua/custom/default.lua | 1 - lua/user/colorscheme.lua | 6 +- 4 files changed, 74 insertions(+), 52 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index 34eeaea..b27c391 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -10,10 +10,10 @@ "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, "code_runner.nvim": { "branch": "main", "commit": "d135c4178bf8980ca5fa4aa6e27ab9ee4373c875" }, "codeium.vim": { "branch": "main", "commit": "9406f13cf3eaa08318b76746bd105a04506cab27" }, - "dracula.nvim": { "branch": "main", "commit": "8d8bddb8814c3e7e62d80dda65a9876f97eb699c" }, "dressing.nvim": { "branch": "master", "commit": "572314728cb1ce012e825fd66331f52c94acac12" }, "friendly-snippets": { "branch": "main", "commit": "dd2fd1281d4b22e7b4a5bfafa3e142d958e251f2" }, "gitsigns.nvim": { "branch": "main", "commit": "76927d14d3fbd4ba06ccb5246e79d93b5442c188" }, + "gruvbox-baby": { "branch": "main", "commit": "ea71b4225d0140103d99748ca4a33ecf22c03f62" }, "indent-blankline.nvim": { "branch": "master", "commit": "ece00d5fb44d196680a81fd2761062d2fa44663b" }, "lazy.nvim": { "branch": "main", "commit": "758bb5de98b805acc5eeed8cdc8ac7f0bc4b0b86" }, "lsp-progress.nvim": { "branch": "main", "commit": "55a04895ea20c365b670051a3128265d43bdfa3d" }, diff --git a/lua/core/config.lua b/lua/core/config.lua index 447e6ab..4a8ac9f 100644 --- a/lua/core/config.lua +++ b/lua/core/config.lua @@ -1,49 +1,68 @@ -local config - --- shim vim for kitty and other generators -vim = vim or { g = {}, o = {} } - -local function opt(key, default) - key = "pcode_" .. key - if vim.g[key] == nil then - return default - end - -- if vim.g[key] == 0 then - -- return false - -- end - return vim.g[key] -end - -config = { - colorscheme = opt("colorscheme", "gruvbox-baby"), - transparent_mode = opt("transparent_mode", 0), - clear_lualine = opt("clear_lualine", 0), - progress = opt("progress", 2), - lualine_style = opt("lualine_style", 0), - status_icon = opt("status_icon", 0), - custom_lualine = opt("custom_lualine", false), - component_separators = opt("component_separators", { left = " ", right = " " }), - section_separators = opt("section_separators", { left = " ", right = " " }), - header1 = opt("header1", nil), - header2 = opt("header2", nil), - footer = opt("footer", nil), - model = opt("model", 1), - format_on_save = opt("format_on_save", 1), - lsp_installer = opt("lsp_installer", {}), - mason_ensure_installed = opt("mason_ensure_installed", {}), - unregister_lsp = opt("unregister_lsp", {}), - null_ls_sources = opt("null_ls_sources", {}), - whichkey = opt("whichkey", {}), - coderunner = opt("coderunner", {}), - null_ls_ensure_installed = opt("null_ls_ensure_installed", {}), - dap_ensure_installed = opt("dap_ensure_installed", {}), - cmprg = opt("cmprg", false), - cmpcalc = opt("cmpcalc", false), - cmptag = opt("cmptag", false), - lsp_virtualtext = opt("lsp_virtualtext", false), - lspghost_text = opt("lspghost_text", false), - loadnvimtree_lazy = opt("loadnvimtree_lazy", false), - icons = opt("icons", {}), -} - -return config +-- local config +-- +-- -- shim vim for kitty and other generators +-- vim = vim or { g = {}, o = {} } +-- +-- local function opt(key, default) +-- key = "pcode_" .. key +-- if vim.g[key] == nil then +-- return default +-- end +-- -- if vim.g[key] == 0 then +-- -- return false +-- -- end +-- return vim.g[key] +-- end +-- +-- config = { +-- colorscheme = opt("colorscheme", "gruvbox-baby"), +-- transparent_mode = opt("transparent_mode", 0), +-- clear_lualine = opt("clear_lualine", 0), +-- progress = opt("progress", 2), +-- lualine_style = opt("lualine_style", 0), +-- status_icon = opt("status_icon", 0), +-- custom_lualine = opt("custom_lualine", false), +-- component_separators = opt("component_separators", { left = " ", right = " " }), +-- section_separators = opt("section_separators", { left = " ", right = " " }), +-- header1 = opt("header1", nil), +-- header2 = opt("header2", nil), +-- footer = opt("footer", nil), +-- model = opt("model", 1), +-- format_on_save = opt("format_on_save", 1), +-- lsp_installer = opt("lsp_installer", {}), +-- mason_ensure_installed = opt("mason_ensure_installed", {}), +-- unregister_lsp = opt("unregister_lsp", {}), +-- null_ls_sources = opt("null_ls_sources", {}), +-- whichkey = opt("whichkey", {}), +-- coderunner = opt("coderunner", {}), +-- null_ls_ensure_installed = opt("null_ls_ensure_installed", {}), +-- dap_ensure_installed = opt("dap_ensure_installed", {}), +-- cmprg = opt("cmprg", false), +-- cmpcalc = opt("cmpcalc", false), +-- cmptag = opt("cmptag", false), +-- lsp_virtualtext = opt("lsp_virtualtext", false), +-- lspghost_text = opt("lspghost_text", false), +-- loadnvimtree_lazy = opt("loadnvimtree_lazy", false), +-- icons = opt("icons", {}), +-- } +-- +-- return config +vim.g.pcode_icons = require("user.icons") +vim.g.pcode_colorscheme = "gruvbox-baby" +vim.g.pcode_transparent_mode = 0 +vim.g.pcode_clear_lualine = 0 +vim.g.pcode_progress = 1 +vim.g.pcode_format_on_save = 1 +vim.g.pcode_lsp_installer = {} +vim.g.pcode_lsp_virtualtext = true +vim.g.pcode_lspghost_text = false +vim.g.pcode_mason_ensure_installed = {} +vim.g.pcode_unregister_lsp = {} +vim.g.pcode_null_ls_ensure_installed = {} +vim.g.pcode_dap_ensure_installed = {} +vim.g.pcode_whichkey = {} +vim.g.pcode_coderunner = {} +vim.g.pcode_cmprg = false +vim.g.pcode_cmpcalc = false +vim.g.pcode_cmptag = false +vim.g.pcode_loadnvimtree_lazy = true diff --git a/lua/custom/default.lua b/lua/custom/default.lua index f31e445..44158c0 100644 --- a/lua/custom/default.lua +++ b/lua/custom/default.lua @@ -1,4 +1,3 @@ -vim.g.pcode_icons = require("user.icons") -- custom colorscheme -- colorscheme ready : -- tokyonight, tokyonight-night, tokyonight-storm, tokyonight-day, tokyonight-moon diff --git a/lua/user/colorscheme.lua b/lua/user/colorscheme.lua index 23e61d0..cb63cb7 100644 --- a/lua/user/colorscheme.lua +++ b/lua/user/colorscheme.lua @@ -1,4 +1,4 @@ -local colorscheme = vim.g.pcode_colorscheme +local colorscheme = "gruvbox_baby" local lst_style = { "sonokai", "sonokai_atlantis", @@ -23,6 +23,10 @@ local lst_onedark = { "onedark_light", } +if vim.g.pcode_colorscheme ~= nil then + colorscheme = vim.g.pcode_colorscheme +end + local transparent_mode = vim.g.pcode_transparent_mode if transparent_mode ~= nil then if transparent_mode == 1 then