sync and onedark

This commit is contained in:
2025-02-09 15:11:13 +02:00
parent 5bb8ba507e
commit d4993225d2
3 changed files with 109 additions and 107 deletions

View File

@ -2,23 +2,26 @@
lib, lib,
config, config,
... ...
}: { }:
with lib; {
imports = [ imports = [
./ayu.nix ./ayu.nix
./base16.nix ./base16.nix
./catppuccin.nix ./onedark.nix
./rose-pine.nix ./rose-pine.nix
./catppuccin.nix
./monokai-pro.nix ./monokai-pro.nix
]; ];
options = { options = {
colorschemes.enable = lib.mkEnableOption "Enable colorschemes module"; colorschemes.enable = mkEnableOption "Enable colorschemes module";
}; };
config = lib.mkIf config.colorschemes.enable { config = mkIf config.colorschemes.enable {
ayu.enable = lib.mkDefault false; ayu.enable = mkDefault false;
base16.enable = lib.mkDefault false; base16.enable = mkDefault false;
catppuccin.enable = lib.mkDefault false; onedark.enable = mkDefault true;
rose-pine.enable = lib.mkDefault false; rose-pine.enable = mkDefault false;
monokai-pro.enable = lib.mkDefault true; catppuccin.enable = mkDefault false;
monokai-pro.enable = mkDefault false;
}; };
} }

View File

@ -1,106 +1,105 @@
{ lib, config, ... }:
{ {
lib,
config,
...
}: {
options = { options = {
fidget.enable = lib.mkEnableOption "Enable fidget module"; fidget.enable = lib.mkEnableOption "Enable fidget module";
}; };
config = lib.mkIf config.fidget.enable { config = lib.mkIf config.fidget.enable {
plugins.fidget = { plugins.fidget = {
enable = true; enable = true;
logger = { settings = {
level = "warn"; # “off”, “error”, “warn”, “info”, “debug”, “trace” logger = {
floatPrecision = 1.0e-2; # Limit the number of decimals displayed for floats level = "warn"; # “off”, “error”, “warn”, “info”, “debug”, “trace”
}; float_precision = 1.0e-2; # Limit the number of decimals displayed for floats
progress = { };
pollRate = 0; # How and when to poll for progress messages progress = {
suppressOnInsert = true; # Suppress new messages while in insert mode poll_rate = 0; # How and when to poll for progress messages
ignoreDoneAlready = false; # Ignore new tasks that are already complete suppress_on_insert = true; # Suppress new messages while in insert mode
ignoreEmptyMessage = false; # Ignore new tasks that don't contain a message ignore_done_already = false; # Ignore new tasks that are already complete
clearOnDetach = ignore_empty_message = false; # Ignore new tasks that don't contain a message
# Clear notification group when LSP server detaches clear_on_detach =
'' # Clear notification group when LSP server detaches
function(client_id) lib.nixvim.mkRaw ''
local client = vim.lsp.get_client_by_id(client_id) function(client_id)
return client and client.name or nil local client = vim.lsp.get_client_by_id(client_id)
return client and client.name or nil
end
'';
notification_group =
# How to get a progress message's notification group key
lib.nixvim.mkRaw ''
function(msg) return msg.lsp_client.name end
'';
ignore = [ ]; # List of LSP servers to ignore
lsp = {
progress_ringbuf_size = 0; # Configure the nvim's LSP progress ring buffer size
};
display = {
render_limit = 16; # How many LSP messages to show at once
done_ttl = 3; # How long a message should persist after completion
done_icon = ""; # Icon shown when all LSP progress tasks are complete
done_style = "Constant"; # Highlight group for completed LSP tasks
progress_ttl = lib.nixvim.mkRaw "math.huge"; # How long a message should persist when in progress
progress_icon = {
pattern = "dots";
period = 1;
}; # Icon shown when LSP progress tasks are in progress
progress_style = "WarningMsg"; # Highlight group for in-progress LSP tasks
group_style = "Title"; # Highlight group for group name (LSP server name)
icon_style = "Question"; # Highlight group for group icons
priority = 30; # Ordering priority for LSP notification group
skip_history = true; # Whether progress notifications should be omitted from history
format_message = lib.nixvim.mkRaw ''
require ("fidget.progress.display").default_format_message
''; # How to format a progress message
format_annote = lib.nixvim.mkRaw ''
function (msg) return msg.title end
''; # How to format a progress annotation
format_group_name = lib.nixvim.mkRaw ''
function (group) return tostring (group) end
''; # How to format a progress notification group's name
overrides = {
rust_analyzer = {
name = "rust-analyzer";
};
}; # Override options from the default notification config
};
};
notification = {
poll_rate = 10; # How frequently to update and render notifications
filter = "info"; # “off”, “error”, “warn”, “info”, “debug”, “trace”
history_size = 128; # Number of removed messages to retain in history
override_vim_notify = true;
redirect = lib.nixvim.mkRaw ''
function(msg, level, opts)
if opts and opts.on_open then
return require("fidget.integration.nvim-notify").delegate(msg, level, opts)
end
end end
''; '';
notificationGroup = configs = {
# How to get a progress message's notification group key default = lib.nixvim.mkRaw "require('fidget.notification').default_config";
'' };
function(msg) return msg.lsp_client.name end
'';
ignore = []; # List of LSP servers to ignore
lsp = {
progressRingbufSize = 0; # Configure the nvim's LSP progress ring buffer size
};
display = {
renderLimit = 16; # How many LSP messages to show at once
doneTtl = 3; # How long a message should persist after completion
doneIcon = ""; # Icon shown when all LSP progress tasks are complete
doneStyle = "Constant"; # Highlight group for completed LSP tasks
progressTtl = lib.nixvim.mkRaw "math.huge"; # How long a message should persist when in progress
progressIcon = {
pattern = "dots";
period = 1;
}; # Icon shown when LSP progress tasks are in progress
progressStyle = "WarningMsg"; # Highlight group for in-progress LSP tasks
groupStyle = "Title"; # Highlight group for group name (LSP server name)
iconStyle = "Question"; # Highlight group for group icons
priority = 30; # Ordering priority for LSP notification group
skipHistory = true; # Whether progress notifications should be omitted from history
formatMessage = ''
require ("fidget.progress.display").default_format_message
''; # How to format a progress message
formatAnnote = ''
function (msg) return msg.title end
''; # How to format a progress annotation
formatGroupName = ''
function (group) return tostring (group) end
''; # How to format a progress notification group's name
overrides = {
rust_analyzer = {
name = "rust-analyzer";
};
}; # Override options from the default notification config
};
};
notification = {
pollRate = 10; # How frequently to update and render notifications
filter = "info"; # “off”, “error”, “warn”, “info”, “debug”, “trace”
historySize = 128; # Number of removed messages to retain in history
overrideVimNotify = true;
redirect = lib.nixvim.mkRaw ''
function(msg, level, opts)
if opts and opts.on_open then
return require("fidget.integration.nvim-notify").delegate(msg, level, opts)
end
end
'';
configs = {
default = lib.nixvim.mkRaw "require('fidget.notification').default_config";
};
window = { window = {
normalHl = "Comment"; normal_hl = "Comment";
winblend = 0; winblend = 0;
border = "none"; # none, single, double, rounded, solid, shadow border = "none"; # none, single, double, rounded, solid, shadow
zindex = 45; zindex = 45;
maxWidth = 0; max_width = 0;
maxHeight = 0; max_height = 0;
xPadding = 1; x_padding = 1;
yPadding = 0; y_padding = 0;
align = "bottom"; align = "bottom";
relative = "editor"; relative = "editor";
}; };
view = { view = {
stackUpwards = true; # Display notification items from bottom to top stack_upwards = true; # Display notification items from bottom to top
iconSeparator = " "; # Separator between group name and icon icon_separator = " "; # Separator between group name and icon
groupSeparator = "---"; # Separator between notification groups group_separator = "---"; # Separator between notification groups
groupSeparatorHl = group_separator_hl =
# Highlight group used for group separator # Highlight group used for group separator
"Comment"; "Comment";
};
}; };
}; };
}; };

10
flake.lock generated
View File

@ -213,8 +213,8 @@
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 0, "lastModified": 0,
"narHash": "sha256-0q9NGQySwDQc7RhAV2ukfnu7Gxa5/ybJ2ANT8DQrQrs=", "narHash": "sha256-Tbk1MZbtV2s5aG+iM99U8FqwxU/YNArMcWAv6clcsBc=",
"path": "/nix/store/8vz84mqgnm1gz5yk7hgnnb5gir5hjxas-source", "path": "/nix/store/l9nb64iii15y0nr37qrs1cfm6rlpg6gh-source",
"type": "path" "type": "path"
}, },
"original": { "original": {
@ -251,11 +251,11 @@
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix"
}, },
"locked": { "locked": {
"lastModified": 1737461429, "lastModified": 1737385899,
"narHash": "sha256-XOHKAdOk++rgbOJZzZxsyTctcVYvTAHG1I519FcVsk0=", "narHash": "sha256-/zyvdstDpPhc5lhFMtKgyQdU2oXGXDb0cg4BY91NKvg=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixvim", "repo": "nixvim",
"rev": "53bfadc2c2a6cdc12b8f8cf5b4e24701e213cb34", "rev": "115994f18e439a1cca9cdaaf15c004870256814d",
"type": "github" "type": "github"
}, },
"original": { "original": {