add: update theme tokyonight

This commit is contained in:
asep.komarudin 2024-03-24 10:12:20 +07:00
parent 2e07bb77f0
commit 2727f2850c
8 changed files with 250 additions and 173 deletions

View file

@ -36,7 +36,7 @@
"nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" }, "nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" },
"nvim-notify": { "branch": "master", "commit": "5371f4bfc1f6d3adf4fe9d62cd3a9d44356bfd15" }, "nvim-notify": { "branch": "master", "commit": "5371f4bfc1f6d3adf4fe9d62cd3a9d44356bfd15" },
"nvim-scrollview": { "branch": "main", "commit": "c29c5f69d37040a1fac88cbea7f5e6f06f0aff4d" }, "nvim-scrollview": { "branch": "main", "commit": "c29c5f69d37040a1fac88cbea7f5e6f06f0aff4d" },
"nvim-tree.lua": { "branch": "master", "commit": "707b24af91a1d05823099ed8c5450796290466ba" }, "nvim-tree.lua": { "branch": "master", "commit": "85c502e9076d9c82e2f04addabb3614846ae7558" },
"nvim-treesitter": { "branch": "master", "commit": "f197a15b0d1e8d555263af20add51450e5aaa1f0" }, "nvim-treesitter": { "branch": "master", "commit": "f197a15b0d1e8d555263af20add51450e5aaa1f0" },
"nvim-ts-autotag": { "branch": "main", "commit": "531f48334c422222aebc888fd36e7d109cb354cd" }, "nvim-ts-autotag": { "branch": "main", "commit": "531f48334c422222aebc888fd36e7d109cb354cd" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "7ab799a9792f7cf3883cf28c6a00ad431f3d382a" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "7ab799a9792f7cf3883cf28c6a00ad431f3d382a" },

View file

@ -5,7 +5,7 @@ require("user.colorscheme")
require("user.keymaps") require("user.keymaps")
-- require("user.snip") -- require("user.snip")
-- require("core.neovide") -- require("core.neovide")
-- require("custom.autocmd") require("custom.autocmd")
-- require("custom.keymaps") -- require("custom.keymaps")
-- require("user.nvim-tree") -- require("user.nvim-tree")
-- require("user.options") -- require("user.options")

View file

@ -9,7 +9,7 @@ end
-- get folder name from current directory -- get folder name from current directory
local _get_folder_name = function() local _get_folder_name = function()
local str = vim.fn.fnamemodify(vim.fn.getcwd(), ":t") local str = vim.fn.fnamemodify(vim.fn.getcwd(), ":t")
return " 󱧶 " .. str:lower():gsub("^%l", string.upper) .. " " return " " .. str:lower():gsub("^%l", string.upper) .. " "
end end
local term_program = vim.fn.getenv("TERM_PROGRAM") local term_program = vim.fn.getenv("TERM_PROGRAM")

View file

@ -11,7 +11,7 @@
-- catppuccin, catppuccin-latte, catppuccin-frappe, catppuccin-macchiato, catppuccin-mocha -- catppuccin, catppuccin-latte, catppuccin-frappe, catppuccin-macchiato, catppuccin-mocha
-- dracula -- dracula
-- nightfox, dayfox, dawnfox, duskfox, nordfox, terafox, carbonfox -- nightfox, dayfox, dawnfox, duskfox, nordfox, terafox, carbonfox
vim.g.pcode_colorscheme = "tokyonight" vim.g.pcode_colorscheme = "tokyonight-storm"
-- custom transparent mode -- custom transparent mode
-- only support -- only support

View file

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

View file

@ -126,7 +126,65 @@ return {
end, end,
}, },
-- for formater linter -- for formater linter
{ "RRethy/vim-illuminate", event = "BufRead", lazy = true }, {
"RRethy/vim-illuminate",
event = "BufRead",
lazy = true,
config = function()
local status_ok, illuminate = pcall(require, "illuminate")
if not status_ok then
return
end
illuminate.configure({
options = {
-- providers: provider used to get references in the buffer, ordered by priority
providers = {
"lsp",
"treesitter",
"regex",
},
-- delay: delay in milliseconds
delay = 120,
-- filetype_overrides: filetype specific overrides.
-- The keys are strings to represent the filetype while the values are tables that
-- supports the same keys passed to .configure except for filetypes_denylist and filetypes_allowlist
filetype_overrides = {},
-- filetypes_denylist: filetypes to not illuminate, this overrides filetypes_allowlist
filetypes_denylist = {
"dirvish",
"fugitive",
"alpha",
"NvimTree",
"lazy",
"neogitstatus",
"Trouble",
"lir",
"Outline",
"spectre_panel",
"toggleterm",
"DressingSelect",
"TelescopePrompt",
},
-- filetypes_allowlist: filetypes to illuminate, this is overridden by filetypes_denylist
filetypes_allowlist = {},
-- modes_denylist: modes to not illuminate, this overrides modes_allowlist
modes_denylist = {},
-- modes_allowlist: modes to illuminate, this is overridden by modes_denylist
modes_allowlist = {},
-- providers_regex_syntax_denylist: syntax to not illuminate, this overrides providers_regex_syntax_allowlist
-- Only applies to the 'regex' provider
-- Use :echom synIDattr(synIDtrans(synID(line('.'), col('.'), 1)), 'name')
providers_regex_syntax_denylist = {},
-- providers_regex_syntax_allowlist: syntax to illuminate, this is overridden by providers_regex_syntax_denylist
-- Only applies to the 'regex' provider
-- Use :echom synIDattr(synIDtrans(synID(line('.'), col('.'), 1)), 'name')
providers_regex_syntax_allowlist = {},
-- under_cursor: whether or not to illuminate under the cursor
under_cursor = true,
},
})
end,
},
{ {
"jayp0521/mason-null-ls.nvim", "jayp0521/mason-null-ls.nvim",
lazy = true, lazy = true,
@ -372,7 +430,12 @@ return {
-- dependencies = "nvim-treesitter/nvim-treesitter", -- dependencies = "nvim-treesitter/nvim-treesitter",
-- }, -- },
-- for git -- for git
{ "HiPhish/nvim-ts-rainbow2", lazy = true, event = "BufRead", dependencies = "nvim-treesitter/nvim-treesitter" }, {
"HiPhish/nvim-ts-rainbow2",
lazy = true,
event = "BufRead",
dependencies = "nvim-treesitter/nvim-treesitter",
},
{ {
"lewis6991/gitsigns.nvim", "lewis6991/gitsigns.nvim",
lazy = true, lazy = true,

View file

@ -3,6 +3,18 @@ if not status_ok then
return return
end end
colorizer_cfg.setup({ colorizer_cfg.setup({
DEFAULT_OPTIONS = {
RGB = true, -- #RGB hex codes
RRGGBB = true, -- #RRGGBB hex codes
names = true, -- "Name" codes like Blue
RRGGBBAA = true, -- #RRGGBBAA hex codes
rgb_fn = true, -- CSS rgb() and rgba() functions
hsl_fn = true, -- CSS hsl() and hsla() functions
css = true, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB
css_fn = true, -- Enable all CSS *functions*: rgb_fn, hsl_fn
-- Available modes: foreground, background
mode = "background", -- Set the display mode.
},
filetypes = { filetypes = {
"*", -- Highlight all files, but customize some others. "*", -- Highlight all files, but customize some others.
css = { rgb_fn = true }, -- Enable parsing rgb(...) functions in css. css = { rgb_fn = true }, -- Enable parsing rgb(...) functions in css.

View file

@ -28,7 +28,7 @@ tokyonight.setup({
-- Value is any valid attr-list value for `:help nvim_set_hl` -- Value is any valid attr-list value for `:help nvim_set_hl`
-- comments = { italic = true }, -- comments = { italic = true },
comments = { italic = true }, comments = { italic = true },
keywords = { italic = true }, keywords = {},
functions = {}, functions = {},
variables = {}, variables = {},
-- Background styles. Can be "dark", "transparent" or "normal" -- Background styles. Can be "dark", "transparent" or "normal"
@ -66,6 +66,8 @@ tokyonight.setup({
} }
highlights.BufferLineFill = { bg = colors.bg } highlights.BufferLineFill = { bg = colors.bg }
highlights.NvimTreeSpecialFile = { fg = colors.purple, underline = false } highlights.NvimTreeSpecialFile = { fg = colors.purple, underline = false }
highlights["@property"] = { fg = colors.green1, italic = true } highlights["@tag.attribute"] = { fg = colors.green1, italic = true }
-- highlights["@keyword.function"] = { fg = colors.blue, italic = true }
-- highlights["@function"] = { fg = colors.blue, italic = true }
end, end,
}) })