enc: update config dashboard

This commit is contained in:
Pojok Code 2024-10-23 16:07:07 +07:00
parent c09e320633
commit 05d51faadf
34 changed files with 72 additions and 1520 deletions

View file

@ -3,11 +3,13 @@
"Eva-Theme.nvim": { "branch": "master", "commit": "902dd17975a7710e544d409ea856dbecc9d64997" }, "Eva-Theme.nvim": { "branch": "master", "commit": "902dd17975a7710e544d409ea856dbecc9d64997" },
"LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" }, "LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" },
"alpha-nvim": { "branch": "main", "commit": "bf3c8bb8c02ed3d9644cc5bbc48e2bdc39349cd7" }, "alpha-nvim": { "branch": "main", "commit": "bf3c8bb8c02ed3d9644cc5bbc48e2bdc39349cd7" },
"auto-bufferline.nvim": { "branch": "main", "commit": "5bade2069c8385938c4e6648e3e82317d3be8c57" },
"auto-conform.nvim": { "branch": "main", "commit": "d04389f955dd0990e85a269b226199f458de32a6" }, "auto-conform.nvim": { "branch": "main", "commit": "d04389f955dd0990e85a269b226199f458de32a6" },
"auto-lint.nvim": { "branch": "main", "commit": "aff13cb8eaa055e66e940d43b7d83166397e5413" }, "auto-lint.nvim": { "branch": "main", "commit": "aff13cb8eaa055e66e940d43b7d83166397e5413" },
"auto-lsp.nvim": { "branch": "main", "commit": "420bd7165d0afd396e05a3ad67ae228c36e2f044" }, "auto-lsp.nvim": { "branch": "main", "commit": "420bd7165d0afd396e05a3ad67ae228c36e2f044" },
"auto-lualine.nvim": { "branch": "main", "commit": "23aca3375e0bd40dc7ef893167337469de5e82a8" },
"bigfile.nvim": { "branch": "main", "commit": "33eb067e3d7029ac77e081cfe7c45361887a311a" }, "bigfile.nvim": { "branch": "main", "commit": "33eb067e3d7029ac77e081cfe7c45361887a311a" },
"bufferline.nvim": { "branch": "main", "commit": "0b2fd861eee7595015b6561dade52fb060be10c4" }, "bufferline.nvim": { "branch": "main", "commit": "5c528bee3dd797d5bd6bae5f229411939b25b203" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" }, "cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
@ -32,7 +34,7 @@
"noice.nvim": { "branch": "main", "commit": "df448c649ef6bc5a6a633a44f2ad0ed8d4442499" }, "noice.nvim": { "branch": "main", "commit": "df448c649ef6bc5a6a633a44f2ad0ed8d4442499" },
"nui.nvim": { "branch": "main", "commit": "a0fd35fcbb4cb479366f1dc5f20145fd718a3733" }, "nui.nvim": { "branch": "main", "commit": "a0fd35fcbb4cb479366f1dc5f20145fd718a3733" },
"nvim-autopairs": { "branch": "master", "commit": "ee297f215e95a60b01fde33275cc3c820eddeebe" }, "nvim-autopairs": { "branch": "master", "commit": "ee297f215e95a60b01fde33275cc3c820eddeebe" },
"nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" }, "nvim-cmp": { "branch": "main", "commit": "29fb4854573355792df9e156cb779f0d31308796" },
"nvim-colorizer.lua": { "branch": "master", "commit": "0671e0eabc6842676d3310370e8fae4e1c51d7f9" }, "nvim-colorizer.lua": { "branch": "master", "commit": "0671e0eabc6842676d3310370e8fae4e1c51d7f9" },
"nvim-lint": { "branch": "master", "commit": "16b21a7d04d06661f92f273a0744fd81fb19e09e" }, "nvim-lint": { "branch": "master", "commit": "16b21a7d04d06661f92f273a0744fd81fb19e09e" },
"nvim-lspconfig": { "branch": "master", "commit": "056f569f71e4b726323b799b9cfacc53653bceb3" }, "nvim-lspconfig": { "branch": "master", "commit": "056f569f71e4b726323b799b9cfacc53653bceb3" },
@ -41,7 +43,7 @@
"nvim-notify": { "branch": "master", "commit": "fbef5d32be8466dd76544a257d3f3dce20082a07" }, "nvim-notify": { "branch": "master", "commit": "fbef5d32be8466dd76544a257d3f3dce20082a07" },
"nvim-scrollview": { "branch": "main", "commit": "bc37a942debe191fffd072f0f1f2ec7c56c54b17" }, "nvim-scrollview": { "branch": "main", "commit": "bc37a942debe191fffd072f0f1f2ec7c56c54b17" },
"nvim-tree.lua": { "branch": "master", "commit": "4a9e82d10a3715d0c3845e1d2f66ddfb8b711253" }, "nvim-tree.lua": { "branch": "master", "commit": "4a9e82d10a3715d0c3845e1d2f66ddfb8b711253" },
"nvim-treesitter": { "branch": "master", "commit": "a3ca2e60563064cea008555d0b7d031430305b09" }, "nvim-treesitter": { "branch": "master", "commit": "9210b9a4fa106247333495e19c843710f4d62102" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "0d79d169fcd45a8da464727ac893044728f121d4" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "0d79d169fcd45a8da464727ac893044728f121d4" },
"nvim-ts-autotag": { "branch": "main", "commit": "e239a560f338be31337e7abc3ee42515daf23f5e" }, "nvim-ts-autotag": { "branch": "main", "commit": "e239a560f338be31337e7abc3ee42515daf23f5e" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "9c74db656c3d0b1c4392fc89a016b1910539e7c0" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "9c74db656c3d0b1c4392fc89a016b1910539e7c0" },

View file

@ -8,6 +8,8 @@ pcode.header1 = {
[[ / _ / _ \ / / _ \/ '_/ / __/ _ / _ / -_) ]], [[ / _ / _ \ / / _ \/ '_/ / __/ _ / _ / -_) ]],
[[ / .__\_____/ /\___/_/\_\ \__/\___\_,_/\__/ ]], [[ / .__\_____/ /\___/_/\_\ \__/\___\_,_/\__/ ]],
[[ /_/ |___/ ]], [[ /_/ |___/ ]],
[[ ]],
[[  Powered By  eovim ]],
} }
-- pcode.header2 = { -- pcode.header2 = {

View file

@ -15,7 +15,7 @@
-- darcula-dark -- darcula-dark
-- juliana -- juliana
-- Eva-Dark, Eva-Dark-Italic, Eva-Dark-Bold -- Eva-Dark, Eva-Dark-Italic, Eva-Dark-Bold
pcode.colorscheme = "Eva-Dark-Italic" pcode.colorscheme = "Eva-Dark"
-- 0 =off 1= on -- 0 =off 1= on
pcode.transparent_mode = 0 pcode.transparent_mode = 0

View file

@ -33,9 +33,9 @@ return {
-- border = "none", -- border = "none",
border = icons.Border, border = icons.Border,
icons = { icons = {
package_pending = icons.DotCircle, package_pending = icons.Pending,
package_installed = icons.CheckCircle, package_installed = icons.CheckCircle,
package_uninstalled = icons.BlankCircle, package_uninstalled = icons.DotCircle,
}, },
keymaps = { keymaps = {
-- Keymap to expand a server in the UI -- Keymap to expand a server in the UI

View file

@ -2,187 +2,11 @@ return {
"akinsho/bufferline.nvim", "akinsho/bufferline.nvim",
branch = "main", branch = "main",
event = { "BufRead", "InsertEnter", "BufNewFile" }, event = { "BufRead", "InsertEnter", "BufNewFile" },
dependencies = "pojokcodeid/auto-bufferline.nvim",
config = function() config = function()
local status_ok, bufferline = pcall(require, "bufferline")
if not status_ok then
return
end
local icons = pcode.icons
local use_icons = true
-- get folder name from current directory
local _get_folder_name = function()
local str = vim.fn.fnamemodify(vim.fn.getcwd(), ":t")
return " " .. icons.ui.ProjekFolder .. " " .. str:lower():gsub("^%l", string.upper) .. " "
end
local function diagnostics_indicator(num, _, diagnostics, _)
local result
local symbols = {
error = icons.diagnostics.Error,
warning = icons.diagnostics.Warning,
info = icons.diagnostics.Information,
}
if not use_icons then
return "(" .. num .. ")"
end
for name, count in pairs(diagnostics) do
if symbols[name] and count > 0 then
table.insert(result, symbols[name] .. " " .. count)
end
end
result = table.concat(result, " ")
return #result > 0 and result or ""
end
vim.opt.termguicolors = true vim.opt.termguicolors = true
local config = require("auto-bufferline").config()
bufferline.setup({ require("bufferline").setup(config)
options = {
color_icons = true,
numbers = "none", -- | "ordinal" | "buffer_id" | "both" | function({ ordinal, id, lower, raise }): string,
close_command = function(bufnum)
require("user.utils.bufferline").bufremove(bufnum)
end,
right_mouse_command = function(bufnum)
require("user.utils.bufferline").bufremove(bufnum)
end,
-- close_command = "bdelete! %d",
-- right_mouse_command = "bdelete! %d",
left_mouse_command = "buffer %d",
middle_mouse_command = nil,
indicator_icon = nil,
indicator = { style = "icon", icon = icons.ui.BoldLineLeft },
buffer_close_icon = icons.ui.Close,
modified_icon = icons.ui.Circle,
close_icon = icons.ui.BoldClose,
left_trunc_marker = icons.ui.ArrowCircleLeft,
right_trunc_marker = icons.ui.ArrowCircleRight,
max_name_length = 30,
max_prefix_length = 30,
tab_size = 21,
diagnostics = false, -- | "nvim_lsp" | "coc",
diagnostics_update_in_insert = false,
diagnostics_indicator = diagnostics_indicator,
offsets = {
{
filetype = "NvimTree",
text = _get_folder_name(),
highlight = "Directory",
text_align = "left",
padding = 1,
},
{
filetype = "neo-tree",
text = _get_folder_name(),
highlight = "Directory",
text_align = "left",
padding = 1,
},
{
filetype = "dbui",
text = "",
highlight = "Directory",
text_align = "left",
padding = 1,
},
},
show_buffer_icons = true,
show_buffer_close_icons = true,
show_close_icon = true,
show_tab_indicators = true,
persist_buffer_sort = true, -- whether or not custom sorted buffers should persist
separator_style = { "", "" }, -- | "thick" | "thin" | { 'any', 'any' },
enforce_regular_tabs = true,
always_show_bufferline = true,
},
highlights = {
fill = {
fg = { attribute = "fg", highlight = "TabLine" },
bg = { attribute = "none", highlight = "TabLine" },
},
background = {
fg = { attribute = "fg", highlight = "TabLine" },
bg = { attribute = "none", highlight = "TabLine" },
},
buffer_visible = {
fg = { attribute = "fg", highlight = "TabLine" },
bg = { attribute = "none", highlight = "TabLine" },
},
close_button = {
fg = { attribute = "fg", highlight = "TabLine" },
bg = { attribute = "none", highlight = "TabLine" },
},
close_button_visible = {
fg = { attribute = "fg", highlight = "TabLine" },
bg = { attribute = "none", highlight = "TabLine" },
},
tab_selected = {
fg = { attribute = "fg", highlight = "Normal" },
bg = { attribute = "bg", highlight = "Normal" },
},
tab = {
fg = { attribute = "fg", highlight = "TabLine" },
bg = { attribute = "bg", highlight = "TabLine" },
},
tab_close = {
-- fg = {attribute='fg',highlight='LspDiagnosticsDefaultError'},
fg = { attribute = "fg", highlight = "TabLineSel" },
bg = { attribute = "bg", highlight = "Normal" },
},
duplicate_selected = {
fg = { attribute = "fg", highlight = "TabLineSel" },
bg = { attribute = "bg", highlight = "TabLineSel" },
underline = true,
},
duplicate_visible = {
fg = { attribute = "fg", highlight = "TabLine" },
bg = { attribute = "bg", highlight = "TabLine" },
underline = true,
},
duplicate = {
fg = { attribute = "fg", highlight = "TabLine" },
bg = { attribute = "bg", highlight = "TabLine" },
underline = true,
},
modified = {
fg = { attribute = "fg", highlight = "TabLine" },
bg = { attribute = "bg", highlight = "TabLine" },
},
modified_selected = {
fg = { attribute = "fg", highlight = "Normal" },
bg = { attribute = "bg", highlight = "Normal" },
},
modified_visible = {
fg = { attribute = "fg", highlight = "TabLine" },
bg = { attribute = "bg", highlight = "TabLine" },
},
separator = {
fg = { attribute = "bg", highlight = "TabLine" },
bg = { attribute = "bg", highlight = "TabLine" },
},
trunc_marker = {
fg = { attribute = "fg", highlight = "TabLine" },
bg = { attribute = "none", highlight = "TabLine" },
},
separator_selected = {
fg = { attribute = "bg", highlight = "Normal" },
bg = { attribute = "bg", highlight = "Normal" },
},
indicator_selected = {
fg = { attribute = "fg", highlight = "LspDiagnosticsDefaultHint" },
bg = { attribute = "bg", highlight = "Normal" },
},
indicator_visible = {
fg = { attribute = "fg", highlight = "LspDiagnosticsDefaultHint" },
bg = { attribute = "bg", highlight = "Normal" },
},
},
})
end, end,
keys = { keys = {
{ "<leader>b", "", desc = "  Buffers", mode = "n" }, { "<leader>b", "", desc = "  Buffers", mode = "n" },
@ -197,7 +21,7 @@ return {
{ {
"<leader>bc", "<leader>bc",
function() function()
require("user.utils.bufferline").bufremove() require("auto-bufferline.configs.utils").bufremove()
end, end,
desc = "Close current buffer", desc = "Close current buffer",
mode = "n", mode = "n",

View file

@ -51,7 +51,7 @@ if pcode.database then
{ "<leader>D", "", desc = " 󰆼 DBUI" }, { "<leader>D", "", desc = " 󰆼 DBUI" },
{ "<leader>Dd", "<cmd>Alpha<cr><cmd>NvimTreeClose<cr><cmd>DBUI<cr>", desc = "󰆼 DBUI Open" }, { "<leader>Dd", "<cmd>Alpha<cr><cmd>NvimTreeClose<cr><cmd>DBUI<cr>", desc = "󰆼 DBUI Open" },
{ "<leader>Dq", { "<leader>Dq",
"<cmd>DBUIClose<cr><cmd>BufferLineCloseOthers<cr><cmd>bd!<cr><cmd>lua require('user.utils.bufferline').bufremove()<cr><cmd>Alpha<cr>", "<cmd>DBUIClose<cr><cmd>BufferLineCloseOthers<cr><cmd>bd!<cr><cmd>lua require('auto-bufferline.configs.utils').bufremove()<cr><cmd>Alpha<cr>",
desc = "󰅙 DBUI Close", desc = "󰅙 DBUI Close",
}, },
}, },

View file

@ -1,102 +1,44 @@
return { return {
{ {
"nvim-lualine/lualine.nvim", "pojokcodeid/auto-lualine.nvim",
event = { "InsertEnter", "BufRead", "BufNewFile" }, event = { "InsertEnter", "BufRead", "BufNewFile" },
dependencies = { "nvim-lualine/lualine.nvim" },
config = function() config = function()
local component = require("user.utils.lualine_component") local lualine = require("auto-lualine")
local colors = component.colors -- tokyonight, tokyonight-night, tokyonight-storm, tokyonight-day, tokyonight-moon
-- gruvbox-baby (default)
-- check config for theme -- sonokai, sonokai_atlantis,
local set_theme = "auto" -- sonokai_andromeda,sonokai_shusia,sonokai_maia,sonokai_espresso
local bubbles_theme -- material, material_deepocean, material_palenight, material_lighter, material_darker
local color = pcode.colorscheme -- onedark, onedark_vivid, onedark_dark
switch(color, { -- nord
["tokyonight"] = function() -- catppuccin, catppuccin-latte, catppuccin-frappe, catppuccin-macchiato, catppuccin-mocha
set_theme = "auto" -- dracula
end, -- nightfox, dayfox, dawnfox, duskfox, nordfox, terafox, carbonfox
["tokyonight-night"] = function() -- github_dark, github_dark_default, github_dark_colorblind, github_dark_dimmed
set_theme = "auto" -- solarized-osaka
end, -- darcula-dark
["tokyonight-storm"] = function() -- juliana
set_theme = "auto" -- Eva-Dark, Eva-Dark-Italic, Eva-Dark-Bold
end, local color = pcode.colorscheme or "auto"
["tokyonight-day"] = function() -- rounded
set_theme = "auto" -- roundedall
end, -- square
["tokyonight-moon"] = function() -- triangle
set_theme = "auto" -- parallelogram
end, -- transparent
["dracula"] = function() -- default
local clr = require("dracula").colors() local options = pcode.lualinetheme or "roundedall"
colors.blue = clr.green -- 0 = on full text mode info,
colors.black = clr.black -- 1 = on initial mode + logo
colors.cyan = clr.yellow -- 2 = logo only
set_theme = "bubbles_theme" -- 3 = initial only
end, -- 4 = off
["Eva-Dark"] = function() local show_mode = pcode.show_mode or 0
colors.skyblue_1 = "#56B7C3" lualine.setup({
colors.grey = "#3b4261" setColor = color,
colors.blue = "#98C379" setOption = options,
colors.cyan = "#B0B7C3" setMode = show_mode,
colors.yellow = "#EF973A"
colors.green1 = "#6495EE"
colors.red = "#E06C75"
set_theme = "bubbles_theme"
end,
["Eva-Dark-Italic"] = function()
colors.skyblue_1 = "#598DEF"
colors.grey = "#3b4261"
colors.blue = "#98C379"
colors.cyan = "#B0B7C3"
colors.yellow = "#EF973A"
colors.green1 = "#56B7C3"
colors.red = "#E06C75"
set_theme = "bubbles_theme"
end,
["Eva-Dark-Bold"] = function()
colors.skyblue_1 = "#598DEF"
colors.grey = "#3b4261"
colors.blue = "#98C379"
colors.cyan = "#B0B7C3"
colors.yellow = "#EF973A"
colors.green1 = "#56B7C3"
colors.red = "#E06C75"
set_theme = "bubbles_theme"
end,
default = function()
set_theme = "auto"
end,
})
bubbles_theme = component.bubbles_theme(colors)
if set_theme == "auto" then
bubbles_theme = vim.fn.fnamemodify("auto", ":t")
end
local gettheme = require("user.utils.lualine_template")
local theme_option = pcode.lualinetheme or "rounded"
local theme = gettheme.rounded(bubbles_theme)
if theme_option == "rounded" then
theme = gettheme.rounded(bubbles_theme)
elseif theme_option == "roundedall" then
theme = gettheme.roundedall(bubbles_theme)
elseif theme_option == "square" then
theme = gettheme.square(bubbles_theme)
elseif theme_option == "transparent" then
theme = gettheme.square(component.transparent(colors))
elseif theme_option == "triangle" then
theme = gettheme.triangle(bubbles_theme)
elseif theme_option == "parallelogram" then
theme = gettheme.parallelogram(bubbles_theme)
elseif theme_option == "default" then
theme = {}
end
require("lualine").setup({
options = theme.options,
sections = theme.sections,
inactive_sections = theme.inactive_sections,
tabline = theme.tabline,
extensions = theme.extensions,
}) })
end, end,
}, },

View file

@ -147,6 +147,7 @@ return {
TriangleShortArrowRight = "", TriangleShortArrowRight = "",
TriangleShortArrowUp = "", TriangleShortArrowUp = "",
Neovim = "", Neovim = "",
Pending = "",
BlankCircle = "", BlankCircle = "",
CheckCircle = "", CheckCircle = "",
DotCircle = "", DotCircle = "",

View file

@ -13,7 +13,7 @@ end
function _CLOSE_BUFFER() function _CLOSE_BUFFER()
local buf = vim.api.nvim_get_current_buf() local buf = vim.api.nvim_get_current_buf()
-- delete current buffer -- delete current buffer
require("user.utils.bufferline").bufremove(buf) require("auto-bufferline.configs.utils").bufremove(buf)
end end
function _OPEN_ALACRITTY() function _OPEN_ALACRITTY()

View file

@ -1,34 +0,0 @@
-- local status_ok, lsp_installer = pcall(require, "nvim-lsp-installer")
-- if not status_ok then
-- return
-- end
--
-- local lspconfig = require("lspconfig")
--
-- -- local servers = { "jsonls", "sumneko_lua","html","cssls","tsserver"}
-- -- local servers = { "jdtls", "yamlls" }
-- local servers = {}
-- local installer = pcode.lsp_installer or {}
-- for _, client in pairs(installer) do
-- table.insert(servers, client)
-- end
--
-- lsp_installer.setup({
-- ensure_installed = servers,
-- })
--
-- for _, server in pairs(servers) do
-- local opts = {
-- on_attach = require("user.lsp.handlers").on_attach,
-- capabilities = require("user.lsp.handlers").capabilities,
-- }
-- local has_custom_opts, server_custom_opts = pcall(require, "user.lsp.settings." .. server)
-- if has_custom_opts then
-- opts = vim.tbl_deep_extend("force", opts, server_custom_opts)
-- end
-- lspconfig[server].setup(opts)
-- end
--
-- -- lspconfig.yamlls.setup({
-- -- fletype = { "yaml", "yaml.docker-compose" },
-- -- })

View file

@ -1,147 +0,0 @@
-- local M = {}
--
-- local status_cmp_ok, cmp_nvim_lsp = pcall(require, "cmp_nvim_lsp")
-- if not status_cmp_ok then
-- return
-- end
--
-- local lspvitualtext = pcode.lsp_virtualtext or false
-- local icons = pcode.icons
--
-- M.capabilities = vim.lsp.protocol.make_client_capabilities()
-- M.capabilities.textDocument.completion.completionItem.snippetSupport = true
-- M.capabilities = cmp_nvim_lsp.default_capabilities(M.capabilities)
--
-- M.setup = function()
-- local signs = {
-- { name = "DiagnosticSignError", text = icons.diagnostics.Error },
-- { name = "DiagnosticSignWarn", text = icons.diagnostics.Warning },
-- { name = "DiagnosticSignHint", text = icons.diagnostics.Hint },
-- { name = "DiagnosticSignInfo", text = icons.diagnostics.Info },
-- }
--
-- for _, sign in ipairs(signs) do
-- vim.fn.sign_define(sign.name, { texthl = sign.name, text = sign.text, numhl = "" })
-- end
--
-- local config = {
-- virtual_text = lspvitualtext, -- disable virtual text
-- signs = {
-- active = signs, -- show signs
-- },
-- update_in_insert = true,
-- underline = true,
-- severity_sort = true,
-- float = {
-- focusable = true,
-- style = "minimal",
-- border = "rounded",
-- source = "always",
-- header = "",
-- prefix = "",
-- },
-- }
--
-- vim.diagnostic.config(config)
--
-- vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, {
-- border = "rounded",
-- })
--
-- vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, {
-- border = "rounded",
-- })
-- end
--
-- local function attach_navic(client, bufnr)
-- vim.g.navic_silence = true
-- local status_ok, navic = pcall(require, "nvim-navic")
-- if not status_ok then
-- return
-- end
-- navic.attach(client, bufnr)
-- end
--
-- function FORMAT_FILTER(client)
-- local filetype = vim.bo.filetype
-- local n = require("null-ls")
-- local s = require("null-ls.sources")
-- local method = n.methods.FORMATTING
-- local available_formatters = s.get_available(filetype, method)
--
-- if #available_formatters > 0 then
-- return client.name == "null-ls"
-- elseif client.supports_method("textDocument/formatting") then
-- return true
-- else
-- return false
-- end
-- end
--
-- -- stylua: ignore
-- local function lsp_keymaps(bufnr, on_save)
-- local opts = { noremap = true, silent = true }
-- local keymap = vim.api.nvim_buf_set_keymap
-- keymap(bufnr, "n", "gD", "<cmd>lua vim.lsp.buf.declaration()<CR>", opts)
-- keymap(bufnr, "n", "gd", "<cmd>lua vim.lsp.buf.definition()<CR>", opts)
-- keymap(bufnr, "n", "K", "<cmd>lua vim.lsp.buf.hover()<CR>", opts)
-- keymap(bufnr, "n", "gI", "<cmd>lua vim.lsp.buf.implementation()<CR>", opts)
-- keymap(bufnr, "n", "gr", "<cmd>lua vim.lsp.buf.references()<CR>", opts)
-- keymap(bufnr, "n", "gl", "<cmd>lua vim.diagnostic.open_float()<CR>", opts)
-- keymap(bufnr, "n", "<leader>lf", "<cmd>lua vim.lsp.buf.format{ async = true }<cr>", opts)
-- keymap(bufnr, "n", "<leader>li", "<cmd>LspInfo<cr>", opts)
-- keymap(bufnr, "n", "<leader>lI", "<cmd>Mason<cr>", opts)
-- keymap(bufnr, "n", "<leader>la", "<cmd>lua vim.lsp.buf.code_action()<cr>", opts)
-- keymap(bufnr, "n", "<leader>lj", "<cmd>lua vim.diagnostic.goto_next({buffer=0})<cr>", opts)
-- keymap(bufnr, "n", "<leader>lk", "<cmd>lua vim.diagnostic.goto_prev({buffer=0})<cr>", opts)
-- keymap(bufnr, "n", "<leader>lr", "<cmd>lua vim.lsp.buf.rename()<cr>", opts)
-- keymap(bufnr, "n", "<leader>ls", "<cmd>lua vim.lsp.buf.signature_help()<CR>", opts)
-- keymap(bufnr, "n", "<leader>lq", "<cmd>lua vim.diagnostic.setloclist()<CR>", opts)
-- if on_save then
-- local augroup = vim.api.nvim_create_augroup("LspFormatting", {})
-- vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
-- vim.api.nvim_create_autocmd("BufWritePre", {
-- group = augroup,
-- buffer = bufnr,
-- callback = function()
-- vim.lsp.buf.format({ bufnr = bufnr, timeout_ms = pcode.format_timeout_ms or 5000, filter = FORMAT_FILTER })
-- end,
-- })
-- else
-- vim.schedule(function()
-- pcall(function()
-- vim.api.nvim_clear_autocmds({ group = "LspFormatting" })
-- end)
-- end)
-- end
-- end
-- M.on_attach = function(client, bufnr)
-- attach_navic(client, bufnr)
-- if client.name == "tsserver" then
-- client.server_capabilities.documentFormattingProvider = false
-- end
--
-- if client.name == "lua_ls" then
-- client.server_capabilities.documentFormattingProvider = false
-- end
--
-- if client.supports_method("textDocument/inlayHint") then
-- -- vim.lsp.inlay_hint.enable(bufnr, true)
-- vim.lsp.inlay_hint.enable(true)
-- end
--
-- local on_save = pcode.format_on_save or false
-- -- disable if conform active
-- local status, _ = pcall(require, "conform")
-- if status then
-- on_save = false
-- end
-- lsp_keymaps(bufnr, on_save)
-- local status_ok, illuminate = pcall(require, "illuminate")
-- if not status_ok then
-- return
-- end
-- illuminate.on_attach(client)
-- end
--
-- return M

View file

@ -1,12 +0,0 @@
return {
root_dir = require("lspconfig.util").root_pattern(
"build",
"compile_commands.json",
".git",
"mvnw",
"gradlew",
"pom.xml",
"build.gradle"
) or vim.loop.cwd() or vim.fn.getcwd(),
singe_file_support = true,
}

View file

@ -1,35 +0,0 @@
return {
-- add cmd
cmd = { "deno", "lsp" },
-- add file type support
filetypes = {
"javascript",
"javascriptreact",
"javascript.jsx",
"typescript",
"typescriptreact",
"typescript.tsx",
},
-- add root dir support
root_dir = require("lspconfig.util").root_pattern(
"package.json",
"tsconfig.json",
"jsconfig.json",
"deno.json",
"deno.jsonc",
".git"
),
-- add settings
settings = {
deno = {
enable = true,
suggest = {
imports = {
hosts = {
["https://deno.land"] = true,
},
},
},
},
},
}

View file

@ -1,24 +0,0 @@
return {
cmd = { "emmet-ls", "-c", "--stdio" },
-- add file type support
-- filetypes = {
-- "javascript",
-- "javascriptreact",
-- "javascript.jsx",
-- "typescript",
-- "typescriptreact",
-- "typescript.tsx",
-- "astro",
-- "css",
-- "eruby",
-- "html",
-- "htmldjango",
-- "less",
-- "pug",
-- "sass",
-- "scss",
-- "svelte",
-- "vue" -- },
-- add dynamic root dir support
root_dir = require("lspconfig.util").root_pattern("package.json", "tsconfig.json", "jsconfig.json", ".git"),
}

View file

@ -1,20 +0,0 @@
return {
-- cmd = { "vscode-eslint-language-server", "--stdio" }, -- add file type support
-- filetypes = {
-- "javascript",
-- "javascriptreact",
-- "javascript.jsx",
-- "typescript",
-- "typescriptreact",
-- "typescript.tsx",
-- },
-- -- add dynamic root dir support
-- root_dir = require("lspconfig.util").root_pattern(
-- "package.json",
-- "tsconfig.json",
-- "jsconfig.json",
-- ".eslintrc.json",
-- ".eslintrc.js",
-- ".eslintrc.cjs"
-- ),
}

View file

@ -1,6 +0,0 @@
return {
cmd = { "intelephense", "--stdio" },
filetypes = { "php" },
root_dir = require("lspconfig.util").root_pattern("composer.json", ".git") or vim.loop.cwd() or vim.fn.getcwd(),
single_file_support = true,
}

View file

@ -1,22 +0,0 @@
return {
cmd = {
"jdtls",
"-configuration",
vim.fn.stdpath("cache") .. "/jdtls/config",
"-data",
vim.fn.stdpath("cache") .. "/jdtls/workspace",
},
filetypes = { "java" },
root_dir = require("lspconfig.util").root_pattern(
-- Single-module projects
{
"build.xml", -- Ant
"pom.xml", -- Maven
"settings.gradle", -- Gradle
"settings.gradle.kts", -- Gradle
},
-- Multi-module projects
{ "build.gradle", "build.gradle.kts" }
) or vim.fn.getcwd(),
singe_file_support = true,
}

View file

@ -1,19 +0,0 @@
return {
settings = {
json = {
schemas = require("schemastore").json.schemas(),
},
},
setup = {
commands = {
Format = {
function()
vim.lsp.buf.range_formatting({}, { 0, 0 }, { vim.fn.line("$"), 0 })
end,
},
},
},
init_options = {
provideFormatter = false,
},
}

View file

@ -1,15 +0,0 @@
return {
cmd = { "kotlin-language-server" },
filetypes = { "kotlin" },
root_dir = require("lspconfig.util").root_pattern(
"build.gradle.kts",
"build.gradle",
"settings.gradle",
"gradlew",
"pom.xml",
"build.gradle.kts",
"build.kts",
".git"
),
singe_file_support = true,
}

View file

@ -1,41 +0,0 @@
-- https://luals.github.io/wiki/settings/
return {
settings = {
Lua = {
format = {
enable = false,
},
diagnostics = {
globals = { "vim", "spec" },
},
runtime = {
version = "LuaJIT",
special = {
spec = "require",
},
},
-- workspace = {
-- checkThirdParty = false,
-- library = {
-- [vim.fn.expand("$VIMRUNTIME/lua")] = true,
-- [vim.fn.stdpath("config") .. "/lua"] = true,
-- },
-- },
workspace = {
checkThirdParty = false,
},
hint = {
enable = false,
arrayIndex = "Disable", -- "Enable" | "Auto" | "Disable"
await = true,
paramName = "Disable", -- "All" | "Literal" | "Disable"
paramType = true,
semicolon = "All", -- "All" | "SameLine" | "Disable"
setType = false,
},
telemetry = {
enable = false,
},
},
},
}

View file

@ -1,9 +0,0 @@
return {
settings = {
python = {
analysis = {
typeCheckingMode = "off",
},
},
},
}

View file

@ -1,8 +0,0 @@
return {
-- cmd = { "sql-language-server", "up", "--method", "stdio" },
-- filetypes = { "sql", "mysql" },
-- -- add root dir support
-- root_dir = require("lspconfig.util").root_pattern("package.json", "tsconfig.json", "jsconfig.json", ".git")
-- or vim.loop.cwd()
-- or vim.fn.getcwd(),
}

View file

@ -1,5 +0,0 @@
return {
filetypes = { "blade" },
root_dir = require("lspconfig.util").root_pattern("composer.json", ".git") or vim.loop.cwd() or vim.fn.getcwd(),
singe_file_support = true,
}

View file

@ -1,92 +0,0 @@
return {
-- cmd = { "tailwindcss-language-server", "--stdio" },
-- filetypes = {
-- "aspnetcorerazor",
-- "astro",
-- "astro-markdown",
-- "blade",
-- "clojure",
-- "django-html",
-- "htmldjango",
-- "edge",
-- "eelixir",
-- "elixir",
-- "ejs",
-- "erb",
-- "eruby",
-- "gohtml",
-- "gohtmltmpl",
-- "haml",
-- "handlebars",
-- "hbs",
-- "html",
-- "html-eex",
-- "heex",
-- "jade",
-- "leaf",
-- "liquid",
-- "markdown",
-- "mdx",
-- "mustache",
-- "njk",
-- "nunjucks",
-- "php",
-- "razor",
-- "slim",
-- "twig",
-- "css",
-- "less",
-- "postcss",
-- "sass",
-- "scss",
-- "stylus",
-- "sugarss",
-- "javascript",
-- "javascriptreact",
-- "reason",
-- "rescript",
-- "typescript",
-- "typescriptreact",
-- "vue",
-- "svelte",
-- "templ",
-- },
-- -- init options
-- init_options = {
-- userLanguages = {
-- eelixir = "html-eex",
-- eruby = "erb",
-- templ = "html",
-- },
-- },
-- -- root dir
-- root_dir = root_pattern(
-- "tailwind.config.js",
-- "tailwind.config.cjs",
-- "tailwind.config.mjs",
-- "tailwind.config.ts",
-- "postcss.config.js",
-- "postcss.config.cjs",
-- "postcss.config.mjs",
-- "postcss.config.ts",
-- "package.json",
-- "node_modules",
-- ".git"
-- ),
-- -- settings
-- settings = {
-- tailwindCSS = {
-- classAttributes = { "class", "className", "class:list", "classList", "ngClass" },
-- lint = {
-- cssConflict = "warning",
-- invalidApply = "error",
-- invalidConfigPath = "error",
-- invalidScreen = "error",
-- invalidTailwindDirective = "error",
-- invalidVariant = "error",
-- recommendedVariantOrder = "warning",
-- },
-- validate = true,
-- },
-- },
}

View file

@ -1,18 +0,0 @@
return {
-- add cmd
cmd = { "typescript-language-server", "--stdio" },
-- add file type support
filetypes = {
"javascript",
"javascriptreact",
"javascript.jsx",
"typescript",
"typescriptreact",
"typescript.tsx",
},
-- add dynamic root dir support
root_dir = require("lspconfig.util").root_pattern("package.json", "tsconfig.json", "jsconfig.json", ".git"),
init_options = {
hostInfo = "neovim",
},
}

View file

@ -1,25 +0,0 @@
local opts = {
setup = {
root_dir = require("lspconfig.util").root_pattern("package.json", "vue.config.js")
or vim.loop.cwd()
or vim.fn.getcwd(),
init_options = {
config = {
vetur = {
completion = {
autoImport = true,
tagCasing = "kebab",
useScaffoldSnippets = true,
},
useWorkspaceDependencies = true,
validation = {
script = true,
style = true,
template = true,
},
},
},
},
},
}
return opts

View file

@ -1,16 +0,0 @@
local opts = {
settings = {
yaml = {
hover = true,
completion = true,
validate = true,
schemaStore = {
enable = true,
url = "https://www.schemastore.org/api/json/catalog.json",
},
schemas = require("schemastore").yaml.schemas(),
},
},
}
return opts

View file

@ -7,6 +7,7 @@ dash_model = {
[[ / _ / _ \ / / _ \/ '_/ / __/ _ / _ / -_) ]], [[ / _ / _ \ / / _ \/ '_/ / __/ _ / _ / -_) ]],
[[ / .__\_____/ /\___/_/\_\ \__/\___\_,_/\__/ ]], [[ / .__\_____/ /\___/_/\_\ \__/\___\_,_/\__/ ]],
[[ /_/ |___/ ]], [[ /_/ |___/ ]],
[[  Powered By  eovim ]],
} }
local board = pcode.header1 local board = pcode.header1
@ -53,7 +54,21 @@ vim.api.nvim_create_autocmd("User", {
startify.section.footer.val = { startify.section.footer.val = {
{ {
type = "text", type = "text",
val = { footer_text .. " " .. stats.loaded .. "/" .. stats.count .. " plugins  in " .. ms .. "ms" }, val = {
"───────────────────────────────────────────────",
},
},
{
type = "text",
val = {
"" .. footer_text .. " " .. stats.loaded .. "/" .. stats.count .. " plugins  in " .. ms .. "ms",
},
},
{
type = "text",
val = {
"───────────────────────────────────────────────",
},
}, },
} }
pcall(vim.cmd.AlphaRedraw) pcall(vim.cmd.AlphaRedraw)

View file

@ -1,20 +0,0 @@
local ok, null_ls = pcall(require, "null-ls")
local M = {}
M.list_registered = function(filetype)
if ok then
local method = null_ls.methods.FORMATTING
local registered_providers = require("user.utils.lsp").list_registered_providers_names(filetype)
return registered_providers[method] or {}
else
return {}
end
end
M.list_registered_all = function()
local registered_providers = require("user.utils.lsp").list_all_registerd()
local method = null_ls.methods.FORMATTING
return registered_providers[method] or {}
end
return M

View file

@ -1,27 +0,0 @@
local ok, null_ls = pcall(require, "null-ls")
local M = {}
if ok then
M.alternative_methods = {
null_ls.methods.DIAGNOSTICS,
null_ls.methods.DIAGNOSTICS_ON_OPEN,
null_ls.methods.DIAGNOSTICS_ON_SAVE,
}
else
M.alternative_methods = {}
end
M.linter_list_registered = function(filetype)
if ok then
local registered_providers = require("user.utils.lsp").list_registered_providers_names(filetype)
local providers_for_methods = vim.iter(vim.tbl_map(function(m)
return registered_providers[m] or {}
end, M.alternative_methods))
return providers_for_methods
else
return {}
end
end
return M

View file

@ -1,29 +0,0 @@
local M = {}
M.list_registered_providers_names = function(filetype)
local s = require("null-ls.sources")
local available_sources = s.get_available(filetype)
local registered = {}
for _, source in ipairs(available_sources) do
for method in pairs(source.methods) do
registered[method] = registered[method] or {}
table.insert(registered[method], source.name)
end
end
return registered
end
M.list_all_registerd = function()
local s = require("null-ls.sources")
local available_sources = s.get_all()
local registered = {}
for _, source in ipairs(available_sources) do
for method in pairs(source.methods) do
registered[method] = registered[method] or {}
table.insert(registered[method], source.name)
end
end
return registered
end
return M

View file

@ -1,398 +0,0 @@
local hide_in_width = function()
return vim.fn.winwidth(0) > 75
end
local icons = require("user.icons")
local formatter = require("user.utils.formatter")
local linter = require("user.utils.linter")
local getLeftSubstring = function(word, length)
if #word > length then
return string.sub(word, 1, length) .. "..."
else
return word
end
end
local unique_list = function(list)
local seen = {}
local result = {}
for _, val in ipairs(list) do
if not seen[val] then
table.insert(result, val)
seen[val] = true
end
end
return result
end
local mode_map = {
["NORMAL"] = "N",
["INSERT"] = "I",
["VISUAL"] = "V",
["REPLACE"] = "R",
["COMMAND"] = "C",
["O-PENDING"] = "O",
}
return {
-- treesitter info
treesitter = {
function()
-- return icons.ui.Paint .. " TS"
return icons.ui.Tree
end,
color = function()
local buf = vim.api.nvim_get_current_buf()
local ts = vim.treesitter.highlighter.active[buf]
return { fg = ts and not vim.tbl_isempty(ts) and "#98C379" or "#E06C75" }
end,
cond = hide_in_width,
},
codeium = {
function()
if pcode.codeium then
local codeium = all_trim(vim.api.nvim_call_function("codeium#GetStatusString", {}))
if codeium then
if codeium == "OFF" then
return icons.kind.CopilotOff
else
return icons.kind.Copilot
end
else
return ""
end
else
return ""
end
end,
color = function()
if pcode.codeium then
local codeium = all_trim(vim.api.nvim_call_function("codeium#GetStatusString", {}))
return { fg = codeium == "OFF" and "#3E4452" or "#98C379" }
else
return {}
end
end,
cond = hide_in_width,
},
-- Lsp info
lsp_info = {
function()
local msg = "LSP Inactive"
local buf_ft = vim.bo.filetype
-- start register
local buf_clients = {}
buf_clients = vim.lsp.get_clients({ bufnr = 0 })
local buf_client_names = {}
if next(buf_clients) == nil then
-- TODO: clean up this if statement
if type(msg) == "boolean" or #msg == 0 then
return "LSP Inactive"
end
-- return msg
table.insert(buf_client_names, msg)
end
-- add client
for _, client in pairs(buf_clients) do
if client.name ~= "null-ls" and client.name ~= "copilot" then
table.insert(buf_client_names, client.name)
end
end
-- add formatter
local supported_formatters = formatter.list_registered(buf_ft)
vim.list_extend(buf_client_names, supported_formatters)
-- add conform.nvim
local status, conform = pcall(require, "conform")
if status and supported_formatters and #supported_formatters == 0 then
local formatters = conform.list_formatters_for_buffer()
if formatters and #formatters > 0 then
vim.list_extend(buf_client_names, formatters)
elseif supported_formatters and #supported_formatters == 0 then
-- check if lspformat
local lsp_format = require("conform.lsp_format")
local bufnr = vim.api.nvim_get_current_buf()
local lsp_clients = lsp_format.get_format_clients({ bufnr = bufnr })
if not vim.tbl_isempty(lsp_clients) then
table.insert(buf_client_names, "lsp_fmt")
end
end
elseif not status and supported_formatters and #supported_formatters == 0 then
table.insert(buf_client_names, "lsp_fmt")
end
-- add linter
local supported_linters = linter.linter_list_registered(buf_ft)
vim.list_extend(buf_client_names, supported_linters)
-- cek nvimlint
local lint_s, lint = pcall(require, "lint")
if lint_s then
for ft_k, ft_v in pairs(lint.linters_by_ft) do
if type(ft_v) == "table" then
for _, ltr in ipairs(ft_v) do
if buf_ft == ft_k then
table.insert(buf_client_names, ltr)
end
end
elseif type(ft_v) == "string" then
if buf_ft == ft_k then
table.insert(buf_client_names, ft_v)
end
end
end
end
-- decomple
-- local unique_client_names = vim.fn.uniq(buf_client_names)
local unique_client_names = unique_list(buf_client_names)
msg = table.concat(unique_client_names, ", ")
return msg
end,
icon = icons.ui.Gear .. "",
padding = 1,
cond = hide_in_width,
},
-- diagnostics info
diagnostics = {
"diagnostics",
sources = { "nvim_diagnostic" },
sections = { "error", "warn" },
symbols = {
error = icons.diagnostics.BoldError .. " ",
warn = icons.diagnostics.BoldWarning .. " ",
},
colored = true,
update_in_insert = false,
always_visible = false,
},
-- git info
diff = {
"diff",
colored = true,
symbols = {
added = icons.git.LineAdded .. " ",
modified = icons.git.LineModified .. " ",
removed = icons.git.LineRemoved .. " ",
},
cond = hide_in_width,
},
-- tab info
spaces = {
function()
-- local shiftwidth = vim.api.nvim_buf_get_option(0, "shiftwidth")
-- local shiftwidth = vim.api.nvim_get_option_value("shiftwidth", { scope = "buf", bufnr = 0 })
local shiftwidth = vim.fn.shiftwidth()
return icons.ui.Tab .. " " .. shiftwidth
end,
padding = 1,
},
-- nvim mode info
mode_rounded = {
"mode",
padding = 1,
separator = { left = "" },
fmt = function(str)
if pcode.show_mode == 1 then
return icons.ui.Neovim .. " " .. (mode_map[str] or str)
elseif pcode.show_mode == 2 then
return icons.ui.Neovim
elseif pcode.show_mode == 3 then
return (mode_map[str] or str)
elseif pcode.show_mode == 4 then
return nil
else
return icons.ui.Neovim .. " " .. str
end
end,
},
mode_roundedall = {
"mode",
padding = 1,
separator = { left = "", right = "" },
fmt = function(str)
if pcode.show_mode == 1 then
return icons.ui.Neovim .. " " .. str:sub(1, 1)
elseif pcode.show_mode == 2 then
return icons.ui.Neovim
elseif pcode.show_mode == 3 then
return str:sub(1, 1)
elseif pcode.show_mode == 4 then
return nil
else
return icons.ui.Neovim .. " " .. str
end
end,
},
mode_triangle = {
"mode",
padding = 1,
separator = { left = " ", right = "" },
fmt = function(str)
if pcode.show_mode == 1 then
return icons.ui.Neovim .. " " .. (mode_map[str] or str)
elseif pcode.show_mode == 2 then
return icons.ui.Neovim
elseif pcode.show_mode == 3 then
return (mode_map[str] or str)
elseif pcode.show_mode == 4 then
return nil
else
return icons.ui.Neovim .. " " .. str
end
end,
},
mode_parallelogram = {
"mode",
padding = 1,
separator = { left = "", right = "" },
fmt = function(str)
if pcode.show_mode == 1 then
return icons.ui.Neovim .. " " .. (mode_map[str] or str)
elseif pcode.show_mode == 2 then
return icons.ui.Neovim
elseif pcode.show_mode == 3 then
return (mode_map[str] or str)
elseif pcode.show_mode == 4 then
return nil
else
return icons.ui.Neovim .. " " .. str
end
end,
},
mode_square = {
"mode",
padding = 1,
separator = { left = " " },
fmt = function(str)
if pcode.show_mode == 1 then
return icons.ui.Neovim .. " " .. (mode_map[str] or str)
elseif pcode.show_mode == 2 then
return icons.ui.Neovim
elseif pcode.show_mode == 3 then
return (mode_map[str] or str)
elseif pcode.show_mode == 4 then
return nil
else
return icons.ui.Neovim .. " " .. str
end
end,
},
path = {
"filename",
file_status = true,
path = 1,
fmt = function(str)
return "[" .. str .. "]"
end,
cond = hide_in_width,
},
-- git branch info
get_branch = function()
if vim.b.gitsigns_head ~= nil then
return icons.git.Branch3 .. " " .. getLeftSubstring(vim.b.gitsigns_head, 6)
else
return icons.git.NoBranch .. vim.fn.fnamemodify("", ":t")
end
end,
-- default colorscheme
colors = {
blue = "#50fa7b",
cyan = "#f1fa8c",
black = "#1a1b26",
black_transparant = "none",
white = "#c6c6c6",
red = "#ff757f",
skyblue_1 = "#bd93f9",
grey = "#5f6a8e",
yellow = "#ffb86c",
fg_gutter = "#3b4261",
green1 = "#bd93f9",
},
-- default lualine theme
bubbles_theme = function(colors)
return {
normal = {
a = { fg = colors.black, bg = colors.skyblue_1 },
b = { fg = colors.skyblue_1, bg = colors.grey },
c = { fg = colors.white, bg = colors.black_transparant },
},
insert = {
a = { fg = colors.black, bg = colors.blue },
b = { fg = colors.blue, bg = colors.grey },
},
visual = {
a = { fg = colors.black, bg = colors.cyan },
b = { fg = colors.cyan, bg = colors.grey },
},
replace = {
a = { bg = colors.red, fg = colors.black },
b = { bg = colors.fg_gutter, fg = colors.red },
},
command = {
a = { bg = colors.yellow, fg = colors.black },
b = { bg = colors.fg_gutter, fg = colors.yellow },
},
terminal = {
a = { bg = colors.green1, fg = colors.black },
b = { bg = colors.fg_gutter, fg = colors.green1 },
},
inactive = {
a = { fg = colors.white, bg = colors.black_transparant },
b = { fg = colors.white, bg = colors.black_transparant },
c = { fg = colors.black, bg = colors.black_transparant },
},
}
end,
transparent = function(colors)
return {
normal = {
a = { fg = colors.skyblue_1, bg = colors.black_transparant },
b = { fg = colors.white, bg = colors.black_transparant },
c = { fg = colors.white, bg = colors.black_transparant },
},
insert = {
a = { fg = colors.blue, bg = colors.black_transparant },
b = { fg = colors.white, bg = colors.black_transparant },
},
visual = {
a = { fg = colors.cyan, bg = colors.black_transparant },
b = { fg = colors.white, bg = colors.black_transparant },
},
replace = {
a = { bg = colors.black_transparant, fg = colors.red },
b = { bg = colors.black_transparant, fg = colors.white },
},
command = {
a = { bg = colors.black_transparant, fg = colors.yellow },
b = { bg = colors.black_transparant, fg = colors.white },
},
terminal = {
a = { bg = colors.black_transparant, fg = colors.green1 },
b = { bg = colors.black_transparant, fg = colors.white },
},
inactive = {
a = { fg = colors.white, bg = colors.black_transparant },
b = { fg = colors.white, bg = colors.black_transparant },
c = { fg = colors.black, bg = colors.black_transparant },
},
}
end,
}

View file

@ -1,212 +0,0 @@
local M = {}
local component = require("user.utils.lualine_component")
local treesitter = component.treesitter
local lsp_info = component.lsp_info
local diagnostics = component.diagnostics
local diff = component.diff
local spaces = component.spaces
local get_branch = component.get_branch
local lsp_progress = {}
local data_ok, lspprogress = pcall(require, "lsp-progress")
if data_ok then
lsp_progress = lspprogress.progress
end
local codeium = component.codeium
M.filetype = {
"TelescopePrompt",
"packer",
"alpha",
"dashboard",
"NvimTree",
"Outline",
"DressingInput",
"toggleterm",
"lazy",
"mason",
"neo-tree",
"startuptime",
"crunner",
"lspinfo",
"mysql",
"dbui",
"dbout",
}
M.rounded = function(colorscheme)
local mode = component.mode_rounded
return {
options = {
theme = colorscheme,
component_separators = { left = "", right = "" },
section_separators = { left = "", right = "" },
disabled_filetypes = M.filetype,
always_divide_middle = true,
},
sections = {
lualine_a = {
mode,
},
lualine_b = { get_branch },
lualine_c = { diff, lsp_info, lsp_progress },
lualine_x = { diagnostics, spaces, codeium, treesitter, "filetype" },
lualine_y = { "progress" },
lualine_z = {
{ "location", separator = { right = "" }, padding = 1 },
},
},
inactive_sections = {
lualine_a = { "filename" },
lualine_b = {},
lualine_c = {},
lualine_x = {},
lualine_y = {},
lualine_z = { "location" },
},
tabline = {},
extensions = {},
}
end
M.roundedall = function(colorscheme)
local mode = component.mode_roundedall
return {
options = {
theme = colorscheme,
component_separators = { left = "", right = "" },
section_separators = { left = "", right = "" },
disabled_filetypes = M.filetype,
always_divide_middle = true,
},
sections = {
lualine_a = {
mode,
},
lualine_b = { get_branch },
lualine_c = { diff, lsp_info, lsp_progress },
lualine_x = { diagnostics, spaces, codeium, treesitter, "filetype" },
lualine_y = { "progress" },
lualine_z = {
{ "location", separator = { right = "", left = "" }, padding = 1 },
},
},
inactive_sections = {
lualine_a = { "filename" },
lualine_b = {},
lualine_c = {},
lualine_x = {},
lualine_y = {},
lualine_z = { "location" },
},
tabline = {},
extensions = {},
}
end
M.triangle = function(colorscheme)
local mode = component.mode_triangle
return {
options = {
theme = colorscheme,
component_separators = { left = "", right = "" },
section_separators = { left = "", right = "" },
disabled_filetypes = M.filetype,
always_divide_middle = true,
},
sections = {
lualine_a = {
mode,
},
lualine_b = { get_branch },
lualine_c = { diff, lsp_info, lsp_progress },
lualine_x = { diagnostics, spaces, codeium, treesitter, "filetype" },
lualine_y = { "progress" },
lualine_z = {
{ "location", separator = { right = " ", left = "" }, padding = 1 },
},
},
inactive_sections = {
lualine_a = { "filename" },
lualine_b = {},
lualine_c = {},
lualine_x = {},
lualine_y = {},
lualine_z = { "location" },
},
tabline = {},
extensions = {},
}
end
M.parallelogram = function(colorscheme)
local mode = component.mode_parallelogram
return {
options = {
theme = colorscheme,
component_separators = { left = "", right = "" },
section_separators = { left = "", right = "" },
disabled_filetypes = M.filetype,
always_divide_middle = true,
},
sections = {
lualine_a = {
mode,
},
lualine_b = { get_branch },
lualine_c = { diff, lsp_info, lsp_progress },
lualine_x = { diagnostics, spaces, codeium, treesitter, "filetype" },
lualine_y = { "progress" },
lualine_z = {
{ "location", separator = { right = "", left = "" }, padding = 1 },
},
},
inactive_sections = {
lualine_a = { "filename" },
lualine_b = {},
lualine_c = {},
lualine_x = {},
lualine_y = {},
lualine_z = { "location" },
},
tabline = {},
extensions = {},
}
end
M.square = function(colorscheme)
local mode = component.mode_square
return {
options = {
theme = colorscheme,
component_separators = { left = "", right = "" },
section_separators = { left = "", right = "" },
disabled_filetypes = M.filetype,
always_divide_middle = true,
},
sections = {
lualine_a = {
mode,
},
lualine_b = { get_branch },
lualine_c = { diff, lsp_info, lsp_progress },
lualine_x = { diagnostics, spaces, codeium, treesitter, "filetype" },
lualine_y = { "progress" },
lualine_z = {
{ "location", separator = { right = " " }, padding = 1 },
},
},
inactive_sections = {
lualine_a = { "filename" },
lualine_b = {},
lualine_c = {},
lualine_x = {},
lualine_y = {},
lualine_z = { "location" },
},
tabline = {},
extensions = {},
}
end
return M

View file

@ -74,7 +74,7 @@ end
function M._CLOSE_BUFFER() function M._CLOSE_BUFFER()
local buf = vim.api.nvim_get_current_buf() local buf = vim.api.nvim_get_current_buf()
-- delete current buffer -- delete current buffer
require("user.utils.bufferline").bufremove(buf) require("auto-bufferline.configs.utils").bufremove(buf)
end end
-- function for close all bufferline -- function for close all bufferline
@ -83,7 +83,7 @@ function M._CLOSE_ALL_BUFFER()
local bufs = vim.api.nvim_list_bufs() local bufs = vim.api.nvim_list_bufs()
-- loop through all buffer -- loop through all buffer
for _, buf in pairs(bufs) do for _, buf in pairs(bufs) do
require("user.utils.bufferline").bufremove(buf) require("auto-bufferline.configs.utils").bufremove(buf)
end end
end end