add: update config

This commit is contained in:
asep.komarudin 2024-04-09 17:11:50 +07:00
parent 22b81afe5f
commit 86d1629612
4 changed files with 563 additions and 561 deletions

View file

@ -40,7 +40,7 @@
"nvim-ts-rainbow2": { "branch": "master", "commit": "b3120cd5ae9ca524af9cb602f41e12e301fa985f" }, "nvim-ts-rainbow2": { "branch": "master", "commit": "b3120cd5ae9ca524af9cb602f41e12e301fa985f" },
"nvim-ufo": { "branch": "main", "commit": "a5390706f510d39951dd581f6d2a972741b3fa26" }, "nvim-ufo": { "branch": "main", "commit": "a5390706f510d39951dd581f6d2a972741b3fa26" },
"nvim-web-devicons": { "branch": "master", "commit": "a55b801b7ef5719ca25692c3a0a5447fdfb692ed" }, "nvim-web-devicons": { "branch": "master", "commit": "a55b801b7ef5719ca25692c3a0a5447fdfb692ed" },
"onedark.nvim": { "branch": "master", "commit": "1230aaf2a427b2c5b73aba6e4a9a5881d3e69429" }, "onedarkpro.nvim": { "branch": "main", "commit": "ec07364f3cfa9cc6467bf067a490cfd74011efcd" },
"plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" }, "plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" },
"promise-async": { "branch": "main", "commit": "38a4575da9497326badd3995e768b4ccf0bb153e" }, "promise-async": { "branch": "main", "commit": "38a4575da9497326badd3995e768b4ccf0bb153e" },
"smart-splits.nvim": { "branch": "master", "commit": "f6fcb79527872e9330c554915af2ca511c388390" }, "smart-splits.nvim": { "branch": "master", "commit": "f6fcb79527872e9330c554915af2ca511c388390" },

View file

@ -1,282 +1,282 @@
return { return {
{ -- {
"nvim-lualine/lualine.nvim", -- "nvim-lualine/lualine.nvim",
event = "insertEnter", -- event = "insertEnter",
config = function() -- config = function()
local hide_in_width = function() -- local hide_in_width = function()
return vim.fn.winwidth(0) > 80 -- return vim.fn.winwidth(0) > 80
end -- end
local icons = require("user.icons") -- local icons = require("user.icons")
--
-- start for lsp -- -- start for lsp
local list_registered_providers_names = function(filetype) -- local list_registered_providers_names = function(filetype)
local s = require("null-ls.sources") -- local s = require("null-ls.sources")
local available_sources = s.get_available(filetype) -- local available_sources = s.get_available(filetype)
local registered = {} -- local registered = {}
for _, source in ipairs(available_sources) do -- for _, source in ipairs(available_sources) do
for method in pairs(source.methods) do -- for method in pairs(source.methods) do
registered[method] = registered[method] or {} -- registered[method] = registered[method] or {}
table.insert(registered[method], source.name) -- table.insert(registered[method], source.name)
end -- end
end -- end
return registered -- return registered
end -- end
--
local null_ls = require("null-ls") -- local null_ls = require("null-ls")
-- for formatter -- -- for formatter
local list_registered = function(filetype) -- local list_registered = function(filetype)
local method = null_ls.methods.FORMATTING -- local method = null_ls.methods.FORMATTING
local registered_providers = list_registered_providers_names(filetype) -- local registered_providers = list_registered_providers_names(filetype)
return registered_providers[method] or {} -- return registered_providers[method] or {}
end -- end
--
--- for linter -- --- for linter
local alternative_methods = { -- local alternative_methods = {
null_ls.methods.DIAGNOSTICS, -- null_ls.methods.DIAGNOSTICS,
null_ls.methods.DIAGNOSTICS_ON_OPEN, -- null_ls.methods.DIAGNOSTICS_ON_OPEN,
null_ls.methods.DIAGNOSTICS_ON_SAVE, -- null_ls.methods.DIAGNOSTICS_ON_SAVE,
} -- }
--
local linter_list_registered = function(filetype) -- local linter_list_registered = function(filetype)
local registered_providers = list_registered_providers_names(filetype) -- local registered_providers = list_registered_providers_names(filetype)
local providers_for_methods = vim.tbl_flatten(vim.tbl_map(function(m) -- local providers_for_methods = vim.tbl_flatten(vim.tbl_map(function(m)
return registered_providers[m] or {} -- return registered_providers[m] or {}
end, alternative_methods)) -- end, alternative_methods))
--
return providers_for_methods -- return providers_for_methods
end -- end
-- end for lsp -- -- end for lsp
--
local lsp_info = { -- local lsp_info = {
function() -- function()
local msg = "LS Inactive" -- local msg = "LS Inactive"
local buf_ft = vim.bo.filetype -- local buf_ft = vim.bo.filetype
local clients = vim.lsp.get_active_clients() -- local clients = vim.lsp.get_active_clients()
-- start register -- -- start register
local buf_clients = vim.lsp.buf_get_clients() -- local buf_clients = vim.lsp.buf_get_clients()
local buf_client_names = {} -- local buf_client_names = {}
if next(buf_clients) == nil then -- if next(buf_clients) == nil then
-- TODO: clean up this if statement -- -- TODO: clean up this if statement
if type(msg) == "boolean" or #msg == 0 then -- if type(msg) == "boolean" or #msg == 0 then
return "LS Inactive" -- return "LS Inactive"
end -- end
return msg -- return msg
end -- end
-- add client -- -- add client
for _, client in pairs(buf_clients) do -- for _, client in pairs(buf_clients) do
if client.name ~= "null-ls" and client.name ~= "copilot" then -- if client.name ~= "null-ls" and client.name ~= "copilot" then
table.insert(buf_client_names, client.name) -- table.insert(buf_client_names, client.name)
end -- end
end -- end
-- add formatter -- -- add formatter
local supported_formatters = list_registered(buf_ft) -- local supported_formatters = list_registered(buf_ft)
vim.list_extend(buf_client_names, supported_formatters) -- vim.list_extend(buf_client_names, supported_formatters)
-- add linter -- -- add linter
local supported_linters = linter_list_registered(buf_ft) -- local supported_linters = linter_list_registered(buf_ft)
vim.list_extend(buf_client_names, supported_linters) -- vim.list_extend(buf_client_names, supported_linters)
-- decomple -- -- decomple
local unique_client_names = vim.fn.uniq(buf_client_names) -- local unique_client_names = vim.fn.uniq(buf_client_names)
local msg = table.concat(unique_client_names, ", ") -- local msg = table.concat(unique_client_names, ", ")
return msg -- return msg
end, -- end,
--icon = " ", -- --icon = " ",
icon = icons.ui.Gear .. "", -- icon = icons.ui.Gear .. "",
padding = 1, -- padding = 1,
} -- }
--
local diagnostics = { -- local diagnostics = {
"diagnostics", -- "diagnostics",
sources = { "nvim_diagnostic" }, -- sources = { "nvim_diagnostic" },
sections = { "error", "warn" }, -- sections = { "error", "warn" },
-- symbols = { error = " ", warn = " " }, -- -- symbols = { error = " ", warn = " " },
symbols = { -- symbols = {
error = icons.diagnostics.BoldError .. " ", -- error = icons.diagnostics.BoldError .. " ",
warn = icons.diagnostics.BoldWarning .. " ", -- warn = icons.diagnostics.BoldWarning .. " ",
}, -- },
colored = true, -- colored = true,
update_in_insert = false, -- update_in_insert = false,
always_visible = false, -- always_visible = false,
} -- }
--
local diff = { -- local diff = {
"diff", -- "diff",
colored = true, -- colored = true,
-- symbols = { added = " ", modified = " ", removed = " " }, -- changes diff symbols -- -- symbols = { added = " ", modified = " ", removed = " " }, -- changes diff symbols
symbols = { -- symbols = {
added = icons.git.LineAdded .. " ", -- added = icons.git.LineAdded .. " ",
modified = icons.git.LineModified .. " ", -- modified = icons.git.LineModified .. " ",
removed = icons.git.LineRemoved .. " ", -- removed = icons.git.LineRemoved .. " ",
}, -- changes diff symbols -- }, -- changes diff symbols
cond = hide_in_width, -- cond = hide_in_width,
} -- }
--
local spaces = function() -- local spaces = function()
-- return " " .. vim.api.nvim_buf_get_option(0, "shiftwidth") -- -- return " " .. vim.api.nvim_buf_get_option(0, "shiftwidth")
return icons.ui.Tab .. " " .. vim.api.nvim_buf_get_option(0, "shiftwidth") -- return icons.ui.Tab .. " " .. vim.api.nvim_buf_get_option(0, "shiftwidth")
end -- end
--
local mode = { -- local mode = {
"mode", -- "mode",
padding = 1, -- padding = 1,
separator = { left = " " }, -- separator = { left = " " },
-- right_padding = 3, -- -- right_padding = 3,
fmt = function(str) -- fmt = function(str)
return icons.ui.Neovim .. " " .. str -- return icons.ui.Neovim .. " " .. str
end, -- end,
} -- }
local branch = { -- local branch = {
"branch", -- "branch",
padding = 1, -- padding = 1,
} -- }
--
local get_branch = function() -- local get_branch = function()
if vim.b.gitsigns_head ~= nil then -- if vim.b.gitsigns_head ~= nil then
return "" .. vim.b.gitsigns_head -- return " " .. vim.b.gitsigns_head
else -- else
return "" .. vim.fn.fnamemodify("", ":t") -- return "" .. vim.fn.fnamemodify("", ":t")
end -- end
end -- end
--
local lsp_progress = {} -- local lsp_progress = {}
local data_ok, lspprogress = pcall(require, "lsp-progress") -- local data_ok, lspprogress = pcall(require, "lsp-progress")
if data_ok then -- if data_ok then
lsp_progress = lspprogress.progress -- lsp_progress = lspprogress.progress
end -- end
-- stylua: ignore -- -- stylua: ignore
local colors = { -- local colors = {
blue = '#50fa7b', -- blue = '#50fa7b',
cyan = '#f1fa8c', -- cyan = '#f1fa8c',
black = '#1a1b26', -- black = '#1a1b26',
black_transparant = 'none', -- black_transparant = 'none',
white = '#c6c6c6', -- white = '#c6c6c6',
red = "#ff757f", -- red = "#ff757f",
skyblue_1 = '#bd93f9', -- skyblue_1 = '#bd93f9',
grey = '#5f6a8e', -- grey = '#5f6a8e',
yellow = "#ffb86c", -- yellow = "#ffb86c",
fg_gutter = "#3b4261", -- fg_gutter = "#3b4261",
green1 = "#bd93f9", -- green1 = "#bd93f9",
} -- }
--
-- check config for theme -- -- check config for theme
local set_theme -- local set_theme
local bubbles_theme = {} -- local bubbles_theme = {}
local data_exists, config = pcall(require, "core.config") -- local data_exists, config = pcall(require, "core.config")
if data_exists then -- if data_exists then
if config.colorscheme ~= nil then -- if config.colorscheme ~= nil then
local color = config.colorscheme -- local color = config.colorscheme
switch(color, { -- switch(color, {
["tokyonight"] = function() -- ["tokyonight"] = function()
set_theme = "auto" -- set_theme = "auto"
end, -- end,
["tokyonight-night"] = function() -- ["tokyonight-night"] = function()
set_theme = "auto" -- set_theme = "auto"
end, -- end,
["tokyonight-storm"] = function() -- ["tokyonight-storm"] = function()
set_theme = "auto" -- set_theme = "auto"
end, -- end,
["tokyonight-day"] = function() -- ["tokyonight-day"] = function()
set_theme = "auto" -- set_theme = "auto"
end, -- end,
["tokyonight-moon"] = function() -- ["tokyonight-moon"] = function()
set_theme = "auto" -- set_theme = "auto"
end, -- end,
["dracula"] = function() -- ["dracula"] = function()
local clr = require("dracula").colors() -- local clr = require("dracula").colors()
colors.blue = clr.green -- colors.blue = clr.green
colors.black = clr.black -- colors.black = clr.black
colors.cyan = clr.yellow -- colors.cyan = clr.yellow
set_theme = bubbles_theme -- set_theme = bubbles_theme
end, -- end,
default = function() -- default = function()
set_theme = "auto" -- set_theme = "auto"
end, -- end,
}) -- })
end -- end
end -- end
--
bubbles_theme = { -- bubbles_theme = {
normal = { -- normal = {
a = { fg = colors.black, bg = colors.skyblue_1 }, -- a = { fg = colors.black, bg = colors.skyblue_1 },
b = { fg = colors.white, bg = colors.grey }, -- b = { fg = colors.white, bg = colors.grey },
c = { fg = colors.white, bg = "none" }, -- c = { fg = colors.white, bg = "none" },
}, -- },
--
insert = { -- insert = {
a = { fg = colors.black, bg = colors.blue }, -- a = { fg = colors.black, bg = colors.blue },
b = { fg = colors.blue, bg = colors.grey }, -- b = { fg = colors.blue, bg = colors.grey },
}, -- },
visual = { -- visual = {
a = { fg = colors.black, bg = colors.cyan }, -- a = { fg = colors.black, bg = colors.cyan },
b = { fg = colors.cyan, bg = colors.grey }, -- b = { fg = colors.cyan, bg = colors.grey },
}, -- },
replace = { -- replace = {
a = { bg = colors.red, fg = colors.black }, -- a = { bg = colors.red, fg = colors.black },
b = { bg = colors.fg_gutter, fg = colors.red }, -- b = { bg = colors.fg_gutter, fg = colors.red },
}, -- },
command = { -- command = {
a = { bg = colors.yellow, fg = colors.black }, -- a = { bg = colors.yellow, fg = colors.black },
b = { bg = colors.fg_gutter, fg = colors.yellow }, -- b = { bg = colors.fg_gutter, fg = colors.yellow },
}, -- },
terminal = { -- terminal = {
a = { bg = colors.green1, fg = colors.black }, -- a = { bg = colors.green1, fg = colors.black },
b = { bg = colors.fg_gutter, fg = colors.green1 }, -- b = { bg = colors.fg_gutter, fg = colors.green1 },
}, -- },
inactive = { -- inactive = {
a = { fg = colors.white, bg = colors.black_transparant }, -- a = { fg = colors.white, bg = colors.black_transparant },
b = { fg = colors.white, bg = colors.black_transparant }, -- b = { fg = colors.white, bg = colors.black_transparant },
c = { fg = colors.black, bg = "#393f4a" }, -- c = { fg = colors.black, bg = "#393f4a" },
}, -- },
} -- }
--
if set_theme == "auto" then -- if set_theme == "auto" then
bubbles_theme = vim.fn.fnamemodify("auto", ":t") -- bubbles_theme = vim.fn.fnamemodify("auto", ":t")
end -- end
--
require("lualine").setup({ -- require("lualine").setup({
options = { -- options = {
theme = bubbles_theme, -- theme = bubbles_theme,
-- theme = "auto", -- -- theme = "auto",
component_separators = { left = "", right = "" }, -- component_separators = { left = "", right = "" },
section_separators = { left = "", right = "" }, -- section_separators = { left = "", right = "" },
disabled_filetypes = { -- disabled_filetypes = {
"TelescopePrompt", -- "TelescopePrompt",
"packer", -- "packer",
"alpha", -- "alpha",
"dashboard", -- "dashboard",
"NvimTree", -- "NvimTree",
"Outline", -- "Outline",
"DressingInput", -- "DressingInput",
"toggleterm", -- "toggleterm",
"lazy", -- "lazy",
"mason", -- "mason",
"neo-tree", -- "neo-tree",
"startuptime", -- "startuptime",
}, -- },
always_divide_middle = true, -- always_divide_middle = true,
}, -- },
sections = { -- sections = {
lualine_a = { -- lualine_a = {
mode, -- mode,
}, -- },
lualine_b = { "branch" }, -- lualine_b = { "branch" },
lualine_c = { lsp_info, diagnostics, lsp_progress }, -- lualine_c = { lsp_info, diagnostics, lsp_progress },
lualine_x = { diff, spaces, "filetype" }, -- lualine_x = { diff, spaces, "filetype" },
lualine_y = { "progress" }, -- lualine_y = { "progress" },
lualine_z = { -- lualine_z = {
{ "location", separator = { right = " " }, padding = { left = 1, right = 1 } }, -- { "location", separator = { right = " " }, padding = { left = 1, right = 1 } },
}, -- },
}, -- },
inactive_sections = { -- inactive_sections = {
lualine_a = { "filename" }, -- lualine_a = { "filename" },
lualine_b = {}, -- lualine_b = {},
lualine_c = {}, -- lualine_c = {},
lualine_x = {}, -- lualine_x = {},
lualine_y = {}, -- lualine_y = {},
lualine_z = { "location" }, -- lualine_z = { "location" },
}, -- },
tabline = {}, -- tabline = {},
extensions = {}, -- extensions = {},
}) -- })
end, -- end,
}, -- },
} }

View file

@ -1,282 +1,282 @@
return { return {
-- { {
-- "nvim-lualine/lualine.nvim", "nvim-lualine/lualine.nvim",
-- event = "BufWinEnter", event = "InsertEnter",
-- config = function() config = function()
-- local hide_in_width = function() local hide_in_width = function()
-- return vim.fn.winwidth(0) > 80 return vim.fn.winwidth(0) > 80
-- end end
-- local icons = require("user.icons") local icons = require("user.icons")
--
-- -- start for lsp -- start for lsp
-- local list_registered_providers_names = function(filetype) local list_registered_providers_names = function(filetype)
-- local s = require("null-ls.sources") local s = require("null-ls.sources")
-- local available_sources = s.get_available(filetype) local available_sources = s.get_available(filetype)
-- local registered = {} local registered = {}
-- for _, source in ipairs(available_sources) do for _, source in ipairs(available_sources) do
-- for method in pairs(source.methods) do for method in pairs(source.methods) do
-- registered[method] = registered[method] or {} registered[method] = registered[method] or {}
-- table.insert(registered[method], source.name) table.insert(registered[method], source.name)
-- end end
-- end end
-- return registered return registered
-- end end
--
-- local null_ls = require("null-ls") local null_ls = require("null-ls")
-- -- for formatter -- for formatter
-- local list_registered = function(filetype) local list_registered = function(filetype)
-- local method = null_ls.methods.FORMATTING local method = null_ls.methods.FORMATTING
-- local registered_providers = list_registered_providers_names(filetype) local registered_providers = list_registered_providers_names(filetype)
-- return registered_providers[method] or {} return registered_providers[method] or {}
-- end end
--
-- --- for linter --- for linter
-- local alternative_methods = { local alternative_methods = {
-- null_ls.methods.DIAGNOSTICS, null_ls.methods.DIAGNOSTICS,
-- null_ls.methods.DIAGNOSTICS_ON_OPEN, null_ls.methods.DIAGNOSTICS_ON_OPEN,
-- null_ls.methods.DIAGNOSTICS_ON_SAVE, null_ls.methods.DIAGNOSTICS_ON_SAVE,
-- } }
--
-- local linter_list_registered = function(filetype) local linter_list_registered = function(filetype)
-- local registered_providers = list_registered_providers_names(filetype) local registered_providers = list_registered_providers_names(filetype)
-- local providers_for_methods = vim.tbl_flatten(vim.tbl_map(function(m) local providers_for_methods = vim.tbl_flatten(vim.tbl_map(function(m)
-- return registered_providers[m] or {} return registered_providers[m] or {}
-- end, alternative_methods)) end, alternative_methods))
--
-- return providers_for_methods return providers_for_methods
-- end end
-- -- end for lsp -- end for lsp
--
-- local lsp_info = { local lsp_info = {
-- function() function()
-- local msg = "LS Inactive" local msg = "LS Inactive"
-- local buf_ft = vim.bo.filetype local buf_ft = vim.bo.filetype
-- local clients = vim.lsp.get_active_clients() local clients = vim.lsp.get_active_clients()
-- -- start register -- start register
-- local buf_clients = vim.lsp.buf_get_clients() local buf_clients = vim.lsp.buf_get_clients()
-- local buf_client_names = {} local buf_client_names = {}
-- if next(buf_clients) == nil then if next(buf_clients) == nil then
-- -- TODO: clean up this if statement -- TODO: clean up this if statement
-- if type(msg) == "boolean" or #msg == 0 then if type(msg) == "boolean" or #msg == 0 then
-- return "LS Inactive" return "LS Inactive"
-- end end
-- return msg return msg
-- end end
-- -- add client -- add client
-- for _, client in pairs(buf_clients) do for _, client in pairs(buf_clients) do
-- if client.name ~= "null-ls" and client.name ~= "copilot" then if client.name ~= "null-ls" and client.name ~= "copilot" then
-- table.insert(buf_client_names, client.name) table.insert(buf_client_names, client.name)
-- end end
-- end end
-- -- add formatter -- add formatter
-- local supported_formatters = list_registered(buf_ft) local supported_formatters = list_registered(buf_ft)
-- vim.list_extend(buf_client_names, supported_formatters) vim.list_extend(buf_client_names, supported_formatters)
-- -- add linter -- add linter
-- local supported_linters = linter_list_registered(buf_ft) local supported_linters = linter_list_registered(buf_ft)
-- vim.list_extend(buf_client_names, supported_linters) vim.list_extend(buf_client_names, supported_linters)
-- -- decomple -- decomple
-- local unique_client_names = vim.fn.uniq(buf_client_names) local unique_client_names = vim.fn.uniq(buf_client_names)
-- local msg = table.concat(unique_client_names, ", ") local msg = table.concat(unique_client_names, ", ")
-- return msg return msg
-- end, end,
-- --icon = " ", --icon = " ",
-- icon = icons.ui.Gear .. "", icon = icons.ui.Gear .. "",
-- padding = 1, padding = 1,
-- } }
--
-- local diagnostics = { local diagnostics = {
-- "diagnostics", "diagnostics",
-- sources = { "nvim_diagnostic" }, sources = { "nvim_diagnostic" },
-- sections = { "error", "warn" }, sections = { "error", "warn" },
-- -- symbols = { error = " ", warn = " " }, -- symbols = { error = " ", warn = " " },
-- symbols = { symbols = {
-- error = icons.diagnostics.BoldError .. " ", error = icons.diagnostics.BoldError .. " ",
-- warn = icons.diagnostics.BoldWarning .. " ", warn = icons.diagnostics.BoldWarning .. " ",
-- }, },
-- colored = true, colored = true,
-- update_in_insert = false, update_in_insert = false,
-- always_visible = false, always_visible = false,
-- } }
--
-- local diff = { local diff = {
-- "diff", "diff",
-- colored = true, colored = true,
-- -- symbols = { added = " ", modified = " ", removed = " " }, -- changes diff symbols -- symbols = { added = " ", modified = " ", removed = " " }, -- changes diff symbols
-- symbols = { symbols = {
-- added = icons.git.LineAdded .. " ", added = icons.git.LineAdded .. " ",
-- modified = icons.git.LineModified .. " ", modified = icons.git.LineModified .. " ",
-- removed = icons.git.LineRemoved .. " ", removed = icons.git.LineRemoved .. " ",
-- }, -- changes diff symbols }, -- changes diff symbols
-- cond = hide_in_width, cond = hide_in_width,
-- } }
--
-- local spaces = function() local spaces = function()
-- -- return " " .. vim.api.nvim_buf_get_option(0, "shiftwidth") -- return " " .. vim.api.nvim_buf_get_option(0, "shiftwidth")
-- return icons.ui.Tab .. " " .. vim.api.nvim_buf_get_option(0, "shiftwidth") return icons.ui.Tab .. " " .. vim.api.nvim_buf_get_option(0, "shiftwidth")
-- end end
--
-- local mode = { local mode = {
-- "mode", "mode",
-- padding = 1, padding = 1,
-- separator = { left = " " }, separator = { left = "" },
-- -- right_padding = 3, -- right_padding = 3,
-- fmt = function(str) fmt = function(str)
-- return icons.ui.Neovim .. " " .. str return icons.ui.Neovim .. " " .. str
-- end, end,
-- } }
-- local branch = { local branch = {
-- "branch", "branch",
-- padding = 1, padding = 1,
-- } }
--
-- local get_branch = function() local get_branch = function()
-- if vim.b.gitsigns_head ~= nil then if vim.b.gitsigns_head ~= nil then
-- return " " .. vim.b.gitsigns_head return "" .. vim.b.gitsigns_head
-- else else
-- return "" .. vim.fn.fnamemodify("", ":t") return "" .. vim.fn.fnamemodify("", ":t")
-- end end
-- end end
--
-- local lsp_progress = {} local lsp_progress = {}
-- local data_ok, lspprogress = pcall(require, "lsp-progress") local data_ok, lspprogress = pcall(require, "lsp-progress")
-- if data_ok then if data_ok then
-- lsp_progress = lspprogress.progress lsp_progress = lspprogress.progress
-- end end
-- -- stylua: ignore -- stylua: ignore
-- local colors = { local colors = {
-- blue = '#50fa7b', blue = '#50fa7b',
-- cyan = '#f1fa8c', cyan = '#f1fa8c',
-- black = '#1a1b26', black = '#1a1b26',
-- black_transparant = 'none', black_transparant = 'none',
-- white = '#c6c6c6', white = '#c6c6c6',
-- red = "#ff757f", red = "#ff757f",
-- skyblue_1 = '#bd93f9', skyblue_1 = '#bd93f9',
-- grey = '#5f6a8e', grey = '#5f6a8e',
-- yellow = "#ffb86c", yellow = "#ffb86c",
-- fg_gutter = "#3b4261", fg_gutter = "#3b4261",
-- green1 = "#bd93f9", green1 = "#bd93f9",
-- } }
--
-- -- check config for theme -- check config for theme
-- local set_theme local set_theme
-- local bubbles_theme = {} local bubbles_theme = {}
-- local data_exists, config = pcall(require, "core.config") local data_exists, config = pcall(require, "core.config")
-- if data_exists then if data_exists then
-- if config.colorscheme ~= nil then if config.colorscheme ~= nil then
-- local color = config.colorscheme local color = config.colorscheme
-- switch(color, { switch(color, {
-- ["tokyonight"] = function() ["tokyonight"] = function()
-- set_theme = "auto" set_theme = "auto"
-- end, end,
-- ["tokyonight-night"] = function() ["tokyonight-night"] = function()
-- set_theme = "auto" set_theme = "auto"
-- end, end,
-- ["tokyonight-storm"] = function() ["tokyonight-storm"] = function()
-- set_theme = "auto" set_theme = "auto"
-- end, end,
-- ["tokyonight-day"] = function() ["tokyonight-day"] = function()
-- set_theme = "auto" set_theme = "auto"
-- end, end,
-- ["tokyonight-moon"] = function() ["tokyonight-moon"] = function()
-- set_theme = "auto" set_theme = "auto"
-- end, end,
-- ["dracula"] = function() ["dracula"] = function()
-- local clr = require("dracula").colors() local clr = require("dracula").colors()
-- colors.blue = clr.green colors.blue = clr.green
-- colors.black = clr.black colors.black = clr.black
-- colors.cyan = clr.yellow colors.cyan = clr.yellow
-- set_theme = bubbles_theme set_theme = bubbles_theme
-- end, end,
-- default = function() default = function()
-- set_theme = "auto" set_theme = "auto"
-- end, end,
-- }) })
-- end end
-- end end
--
-- bubbles_theme = { bubbles_theme = {
-- normal = { normal = {
-- a = { fg = colors.black, bg = colors.skyblue_1 }, a = { fg = colors.black, bg = colors.skyblue_1 },
-- b = { fg = colors.white, bg = colors.grey }, b = { fg = colors.white, bg = colors.grey },
-- c = { fg = colors.white, bg = colors.black_transparant }, c = { fg = colors.white, bg = colors.black_transparant },
-- }, },
--
-- insert = { insert = {
-- a = { fg = colors.black, bg = colors.blue }, a = { fg = colors.black, bg = colors.blue },
-- b = { fg = colors.blue, bg = colors.grey }, b = { fg = colors.blue, bg = colors.grey },
-- }, },
-- visual = { visual = {
-- a = { fg = colors.black, bg = colors.cyan }, a = { fg = colors.black, bg = colors.cyan },
-- b = { fg = colors.cyan, bg = colors.grey }, b = { fg = colors.cyan, bg = colors.grey },
-- }, },
-- replace = { replace = {
-- a = { bg = colors.red, fg = colors.black }, a = { bg = colors.red, fg = colors.black },
-- b = { bg = colors.fg_gutter, fg = colors.red }, b = { bg = colors.fg_gutter, fg = colors.red },
-- }, },
-- command = { command = {
-- a = { bg = colors.yellow, fg = colors.black }, a = { bg = colors.yellow, fg = colors.black },
-- b = { bg = colors.fg_gutter, fg = colors.yellow }, b = { bg = colors.fg_gutter, fg = colors.yellow },
-- }, },
-- terminal = { terminal = {
-- a = { bg = colors.green1, fg = colors.black }, a = { bg = colors.green1, fg = colors.black },
-- b = { bg = colors.fg_gutter, fg = colors.green1 }, b = { bg = colors.fg_gutter, fg = colors.green1 },
-- }, },
-- inactive = { inactive = {
-- a = { fg = colors.white, bg = colors.black_transparant }, a = { fg = colors.white, bg = colors.black_transparant },
-- b = { fg = colors.white, bg = colors.black_transparant }, b = { fg = colors.white, bg = colors.black_transparant },
-- c = { fg = colors.black, bg = colors.black_transparant }, c = { fg = colors.black, bg = colors.black_transparant },
-- }, },
-- } }
--
-- if set_theme == "auto" then if set_theme == "auto" then
-- bubbles_theme = vim.fn.fnamemodify("auto", ":t") bubbles_theme = vim.fn.fnamemodify("auto", ":t")
-- end end
--
-- require("lualine").setup({ require("lualine").setup({
-- options = { options = {
-- theme = bubbles_theme, theme = bubbles_theme,
-- -- theme = "auto", -- theme = "auto",
-- component_separators = { left = "", right = "" }, component_separators = { left = "", right = "" },
-- section_separators = { left = "", right = "" }, section_separators = { left = "", right = "" },
-- disabled_filetypes = { disabled_filetypes = {
-- "TelescopePrompt", "TelescopePrompt",
-- "packer", "packer",
-- "alpha", "alpha",
-- "dashboard", "dashboard",
-- "NvimTree", "NvimTree",
-- "Outline", "Outline",
-- "DressingInput", "DressingInput",
-- "toggleterm", "toggleterm",
-- "lazy", "lazy",
-- "mason", "mason",
-- "neo-tree", "neo-tree",
-- "startuptime", "startuptime",
-- }, },
-- always_divide_middle = true, always_divide_middle = true,
-- }, },
-- sections = { sections = {
-- lualine_a = { lualine_a = {
-- mode, mode,
-- }, },
-- lualine_b = { get_branch }, lualine_b = { get_branch },
-- lualine_c = { lsp_info, diagnostics, lsp_progress }, lualine_c = { lsp_info, diagnostics, lsp_progress },
-- lualine_x = { diff, spaces, "filetype" }, lualine_x = { diff, spaces, "filetype" },
-- lualine_y = { "progress" }, lualine_y = { "progress" },
-- lualine_z = { lualine_z = {
-- { "location", separator = { right = " " }, padding = 1 }, { "location", separator = { right = "" }, padding = 1 },
-- }, },
-- }, },
-- inactive_sections = { inactive_sections = {
-- lualine_a = { "filename" }, lualine_a = { "filename" },
-- lualine_b = {}, lualine_b = {},
-- lualine_c = {}, lualine_c = {},
-- lualine_x = {}, lualine_x = {},
-- lualine_y = {}, lualine_y = {},
-- lualine_z = { "location" }, lualine_z = { "location" },
-- }, },
-- tabline = {}, tabline = {},
-- extensions = {}, extensions = {},
-- }) })
-- end, end,
-- }, },
} }

View file

@ -72,6 +72,8 @@ return {
-- BufferLineFill = { bg = "${bg}" }, -- BufferLineFill = { bg = "${bg}" },
-- ["@string.special.url.html"] = { fg = "${green}" }, -- ["@string.special.url.html"] = { fg = "${green}" },
-- ["@text.uri.html"] = { fg = "${green}" }, -- ["@text.uri.html"] = { fg = "${green}" },
-- ["@tag.javascript"] = { fg = "${red}" },
-- ["@constructor.javascript"] = { fg = "${red}" },
-- Pmenu = { fg = "${fg}", bg = "${bg}" }, -- Pmenu = { fg = "${fg}", bg = "${bg}" },
-- PmenuThumb = { bg = "${gray}" }, -- Popup menu: Thumb of the scrollbar. -- PmenuThumb = { bg = "${gray}" }, -- Popup menu: Thumb of the scrollbar.
-- -- overide lualine fill color with bg color -- -- overide lualine fill color with bg color