-
-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
neovim: fix SignColumn transparency #628
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I verified that this PR builds in all cases:
Tested-by: NAHO <[email protected]>
However, since my setup causes weird colors (regardless of this PR) when enabling these options, I am unsure how valuable my testing is.
@anotherhadi, can you verify and approve whether this PR closes your issue #599?
It does not, however I didn't enabled cursorline.
|
I did not change anything involving LineNr currently, so that makes sense. Is SignColumn itself transparent though? |
No Here are my related settings: programs.stylix = {
targets.nixvim.transparentBackground = {
main = true;
signColumn = true;
};
targets.nixvim.plugin = "base16-nvim";
};
programs.nixvim.opts = {
signcolumn = "yes";
cursorline = false;
number = true;
relativenumber = true;
}; |
ae1afef
to
f1bc08b
Compare
I added the correct placement for the highlights for Neovim. After testing the changes with vim Neovim configuration: programs.neovim = {
enable = true;
extraConfig = "set signcolumn=yes number relativenumber nocursorline";
};
stylix.targets.neovim = {
enable = true;
# plugin = "mini.base16";
# plugin = "base16-nvim";
transparentBackground = {
main = true;
signColumn = true;
};
}; Nixvim configuration: programs.nixvim = {
enable = true;
opts = {
signcolumn = "yes";
number = true;
relativenumber = true;
cursorline = false;
};
};
stylix.targets.nixvim = {
enable = true;
# plugin = "mini.base16";
plugin = "base16-nvim";
transparentBackground = {
main = true;
signColumn = true;
};
}; Terminal: programs.foot.settings.colors.alpha = 0.75; |
Moves highlights towards the end of the generated config, preventing the colorscheme plugins from overwriting them
Moves highlights to the end of plugin configuration, preventing the colorscheme from overwriting them
f1bc08b
to
af07478
Compare
I am testing this PR on NixVim with the following patch: diff --git a/flake.lock b/flake.lock
index c494c960..e195e27b 100644
--- a/flake.lock
+++ b/flake.lock
@@ -594,15 +594,16 @@
"tinted-zed": "tinted-zed"
},
"locked": {
- "lastModified": 1738610773,
- "narHash": "sha256-rgX4VzzX9E/9YOYoIJHq6u/jlmlLxrtZrhAVU1qboXU=",
- "owner": "danth",
+ "lastModified": 1738903984,
+ "narHash": "sha256-a03hzw+i8PYbs4Lc6r8r76OkJ05OXg4pHfGUylk+2YM=",
+ "owner": "soulsoiledit",
"repo": "stylix",
- "rev": "596d6644077d6d25ff713e93b55efc867979959d",
+ "rev": "af074786c1c0b1f0bd236885bf46d39980d8e2dd",
"type": "github"
},
"original": {
- "owner": "danth",
+ "owner": "soulsoiledit",
+ "ref": "signcolumn-fix",
"repo": "stylix",
"type": "github"
}
diff --git a/flake.nix b/flake.nix
index a19bf1b5..5b130364 100644
--- a/flake.nix
+++ b/flake.nix
@@ -131,7 +131,7 @@
systems.follows = "systems";
};
- url = "github:danth/stylix";
+ url = "github:soulsoiledit/stylix/signcolumn-fix";
};
systems.url = "github:nix-systems/default";
diff --git a/modules/inputs/nixvim/programs/nixvim/default.nix b/modules/inputs/nixvim/programs/nixvim/default.nix
index 2b9a4a33..9626119c 100644
--- a/modules/inputs/nixvim/programs/nixvim/default.nix
+++ b/modules/inputs/nixvim/programs/nixvim/default.nix
@@ -39,9 +39,21 @@
home.shellAliases.n = lib.getExe config.programs.nixvim.build.package;
+ programs.foot = {
+ enable = true;
+ settings.colors.alpha = lib.mkForce 0.75;
+ };
+
programs.nixvim = {
enable = true;
+ opts = {
+ cursorline = lib.mkForce false;
+ number = true;
+ relativenumber = true;
+ signcolumn = "yes";
+ };
+
globals = let
leader = " ";
in {
diff --git a/modules/inputs/stylix/default.nix b/modules/inputs/stylix/default.nix
index a846fb8a..2823785a 100644
--- a/modules/inputs/stylix/default.nix
+++ b/modules/inputs/stylix/default.nix
@@ -54,6 +54,16 @@
};
polarity = "dark";
+
+ targets.nixvim = {
+ enable = true;
+ plugin = "base16-nvim";
+
+ transparentBackground = {
+ main = true;
+ signColumn = true;
+ };
+ };
};
};
} I assume this is the intended behaviour: |
If that is gitsigns, it looks correct. gitsigns does derive colors from the rest of your theme (not including |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If that is gitsigns, it looks correct.
Let's wait on @anotherhadi's reply before merging this.
Works now, ty! |
Closes #599 .
This does not fully resolve the issue with SignColumn being not transparent, as that behavior is dependent on the option
cursorline
, as they change the highlight groups used for the sign column. In addition,LineNr
is also not transparent and is dependent on bothcursorline
andrelativenumber
. I think these issues are to be best resolved later on by #249 by relying on the respective vim highlight groups.Regardless, this change does fix SignColumn when neither of those options are set.