Nvim : Cleanup schemes + use custom generator.
This commit is contained in:
parent
8db6f1ad05
commit
5476267bf5
34
flake.lock
34
flake.lock
|
@ -673,38 +673,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nvimTokyonight": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1727855599,
|
||||
"narHash": "sha256-pnsx3e/s41+TRIW1Nv7hQA4Erq4209RAjw3nxXaiia4=",
|
||||
"owner": "folke",
|
||||
"repo": "tokyonight.nvim",
|
||||
"rev": "efd1417aa01af618426fe1cf507c5458090458f2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "folke",
|
||||
"repo": "tokyonight.nvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nvimTransparent": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1724573095,
|
||||
"narHash": "sha256-6jOLgcWqnVzabT2+CehY92Z4mYzJHiRiInn5T5OXqZE=",
|
||||
"owner": "xiyaowong",
|
||||
"repo": "transparent.nvim",
|
||||
"rev": "8a2749a2fa74f97fe6557f61b89ac7fd873f3c21",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "xiyaowong",
|
||||
"repo": "transparent.nvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nvimTree": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
@ -798,8 +766,6 @@
|
|||
"nvimPlenary": "nvimPlenary",
|
||||
"nvimTelescope": "nvimTelescope",
|
||||
"nvimTodo": "nvimTodo",
|
||||
"nvimTokyonight": "nvimTokyonight",
|
||||
"nvimTransparent": "nvimTransparent",
|
||||
"nvimTree": "nvimTree",
|
||||
"nvimTreesitter": "nvimTreesitter",
|
||||
"nvimTrouble": "nvimTrouble",
|
||||
|
|
|
@ -98,14 +98,6 @@
|
|||
url = "github:folke/todo-comments.nvim";
|
||||
flake = false;
|
||||
};
|
||||
nvimTokyonight = {
|
||||
url = "github:folke/tokyonight.nvim";
|
||||
flake = false;
|
||||
};
|
||||
nvimTransparent = {
|
||||
url = "github:xiyaowong/transparent.nvim";
|
||||
flake = false;
|
||||
};
|
||||
nvimTree = {
|
||||
url = "github:nvim-tree/nvim-tree.lua";
|
||||
flake = false;
|
||||
|
|
|
@ -31,8 +31,6 @@ in {
|
|||
"${inputs.nvimPlenary}"
|
||||
"${inputs.nvimTelescope}"
|
||||
"${inputs.nvimTodo}"
|
||||
"${inputs.nvimTokyonight}"
|
||||
"${inputs.nvimTransparent}"
|
||||
"${inputs.nvimTreesitter}"
|
||||
"${inputs.nvimTree}"
|
||||
"${inputs.nvimTrouble}"
|
||||
|
@ -52,7 +50,6 @@ in {
|
|||
./module/plugin/Autoclose.nix
|
||||
./module/plugin/Gitsigns.nix
|
||||
./module/plugin/Trouble.nix
|
||||
./module/plugin/Tokyonight.nix
|
||||
./module/plugin/Closebuffers.nix
|
||||
./module/plugin/Telescope.nix
|
||||
./module/plugin/Todo.nix
|
||||
|
@ -62,7 +59,6 @@ in {
|
|||
./module/plugin/Fold.nix
|
||||
./module/plugin/Ollama.nix
|
||||
./module/plugin/Colorizer.nix
|
||||
./module/plugin/Transparent.nix
|
||||
./module/plugin/lsp/Haskell.nix
|
||||
./module/plugin/lsp/Rust.nix
|
||||
./module/plugin/lsp/Tex.nix
|
||||
|
|
|
@ -1,16 +1,24 @@
|
|||
{ config, ... }: let
|
||||
cfg = config.style.color;
|
||||
{ config, lib, ... }: let
|
||||
color = config.style.color;
|
||||
|
||||
bg = cfg.bg.regular;
|
||||
mkHighlight = name: value: ''vim.api.nvim_set_hl(0, "${name}", ${lib.generators.toLua { multiline = false; asBindings = false; } value})'';
|
||||
|
||||
selection = { bg = "#${color.bg.regular}"; };
|
||||
transparent = { bg = lib.generators.mkLuaInline "clear"; };
|
||||
in {
|
||||
# TODO: Create a function to set group color.
|
||||
text = ''
|
||||
vim.api.nvim_create_autocmd({"ColorScheme", "VimEnter"}, {
|
||||
group = vim.api.nvim_create_augroup('Color', {}),
|
||||
pattern = "*",
|
||||
callback = function ()
|
||||
vim.api.nvim_set_hl(0, "CursorLine", { bg = "#${bg}" })
|
||||
-- Selection.
|
||||
${mkHighlight "CursorLine" selection}
|
||||
${mkHighlight "Visual" selection}
|
||||
${mkHighlight "TelescopeSelection" selection}
|
||||
|
||||
-- Transparent.
|
||||
${mkHighlight "NormalFloat" transparent}
|
||||
end
|
||||
})
|
||||
})
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
{ ... }: {
|
||||
text = ''
|
||||
require("tokyonight").setup({
|
||||
light_style = "night",
|
||||
style = "night",
|
||||
terminal_colors = true,
|
||||
transparent = false,
|
||||
styles = {
|
||||
comments = { italic = true },
|
||||
floats = "dark",
|
||||
functions = {},
|
||||
keywords = { italic = true },
|
||||
sidebars = "dark",
|
||||
variables = {},
|
||||
},
|
||||
day_brightness = 0.3,
|
||||
dim_inactive = false,
|
||||
hide_inactive_statusline = false,
|
||||
lualine_bold = false,
|
||||
on_colors = function(colors) end,
|
||||
on_highlights = function(highlights, colors) end,
|
||||
sidebars = { "qf", "help" },
|
||||
})
|
||||
|
||||
-- vim.cmd[[colorscheme tokyonight]]
|
||||
'';
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
{ ... }: {
|
||||
text = ''
|
||||
vim.g.transparent_enabled = true
|
||||
|
||||
-- Optional, you don't have to run setup.
|
||||
require("transparent").setup({
|
||||
-- table: default groups
|
||||
-- groups = {
|
||||
-- 'Normal', 'NormalNC', 'Comment', 'Constant', 'Special', 'Identifier',
|
||||
-- 'Statement', 'PreProc', 'Type', 'Underlined', 'Todo', 'String', 'Function',
|
||||
-- 'Conditional', 'Repeat', 'Operator', 'Structure', 'LineNr', 'NonText',
|
||||
-- 'SignColumn', 'CursorLine', 'CursorLineNr', 'StatusLine', 'StatusLineNC',
|
||||
-- 'EndOfBuffer',
|
||||
-- },
|
||||
-- table: additional groups that should be cleared
|
||||
extra_groups = {
|
||||
'NormalFloat',
|
||||
},
|
||||
-- table: groups you don't want to clear
|
||||
exclude_groups = {
|
||||
'CursorLine',
|
||||
},
|
||||
-- function: code to be executed after highlight groups are cleared
|
||||
-- Also the user event "TransparentClear" will be triggered
|
||||
on_clear = function() end,
|
||||
})
|
||||
'';
|
||||
}
|
Loading…
Reference in a new issue