-
-
Notifications
You must be signed in to change notification settings - Fork 70
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
Colorizer not attaching to buffers #433
Comments
nvf does not enable the |
even adding {
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nvf.url = "github:notashelf/nvf";
};
outputs = {
self,
nixpkgs,
...
} @ inputs: {
packages."x86_64-linux" = {
default =
(inputs.nvf.lib.neovimConfiguration {
modules = [
{
config.vim.theme.enable = true;
config.vim.ui.colorizer = {
enable = true;
setupOpts.names = true;
};
}
];
inherit (nixpkgs.legacyPackages."x86_64-linux") pkgs;
})
.neovim;
};
};
} it still does not attach to the buffer automatically, I manually have to run |
That is unusual, I'll take a look shortly. |
also color highlighting by name (e.g. 'blue', 'green') worked with the first flake example I posted... so either my system config (where it is enabled) is leaking (which could also mean that there's some incompatibility) or something weird is happening... |
Sorry, I forgot to respond to this earlier but colorizer has been updated not so long ago. Has this been resolved? Or does it still occur after the update? |
No worries, not like this is a high priority issue Using the minimal reproducible example from the initial report - but with nvf pinned like this (master threw an error when running) Just to make sure, |
That should be it, yes. I've got colorizer working in my setup without any additional setups, maybe a missing soft-dependency? |
can you try {
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nvf.url = "github:notashelf/nvf/a78026438cc8e280a696bcadb60f5c8f93b96a12";
};
outputs = {
self,
nixpkgs,
...
} @ inputs: {
packages."x86_64-linux" = {
default =
(inputs.nvf.lib.neovimConfiguration {
modules = [
{
config.vim.theme.enable = true;
config.vim.ui.colorizer.enable = true;
}
];
inherit (nixpkgs.legacyPackages."x86_64-linux") pkgs;
})
.neovim;
};
};
} |
I am having the same issue. Got nearly my whole config switched over to nvf and got stuck on this plugin. When I go to a HTML file it does same thing as OP, have to run ui.colorizer = {
enable = true;
setupOpts = {
mode = "background";
tailwind = true;
names = true;
RGB = true;
RRGGBB = true;
};
}; |
Had this issues and was able to resolve by including filetypes in the setup I think its related to this comment ui = {
colorizer = {
enable = true;
setupOpts = {
filetypes = {
"*" = {
RGB = true;
RRGGBB = true;
always_update = true;
css = true;
mode = "background";
};
};
};
};
}; |
can confirm: the below flake works (highlights colors) when opening a file with an 'regular' or common file extension - e.g. at this point I'm not sure if we should keep this issue open here or if this is an intended limitation of colorizer... as far as I'm concerned this is a good solution and we can close it flake{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nvf.url = "github:notashelf/nvf";
};
outputs =
{
self,
nixpkgs,
...
}@inputs:
{
packages."x86_64-linux" = {
default =
(inputs.nvf.lib.neovimConfiguration {
modules = [
{
config = {
vim = {
theme.enable = true;
ui.colorizer.enable = true;
ui.colorizer.setupOpts = {
filetypes = {
"*" = {
RGB = true;
RRGGBB = true;
always_update = true;
css = true;
mode = "background";
};
};
};
};
};
}
];
inherit (nixpkgs.legacyPackages."x86_64-linux") pkgs;
}).neovim;
};
};
} |
I think it might be a good idea to provide some default value for colorizer filetypes, so that attaching to buffers works ootb. |
Description
Colorizer does not attach when opening a buffer, when running
:ColorizerAttachToBuffer
it correctly highlights colors👟 Reproduction steps
minimal reproducible example:
type 'green' or 'red' -> no color highlighting
run
:ColorizerAttachToBuffer
-> color highlighting👀 Expected behavior
Colorizer should work without explicitly attaching it to the buffer
😓 Actual Behavior
It did not attach to the buffer
💻 Metadata
"x86_64-linux"
- host os:Linux 6.6.58, NixOS, 24.11 (Vicuna), 24.11.20241029.807e915
- multi-user?:yes
- sandbox:yes
- version:nix-env (Lix, like Nix) 2.91.0 System type: x86_64-linux Additional system types: aarch64-linux, i686-linux Features: gc, signed-caches System configuration file: /etc/nix/nix.conf User configuration files: /home/jasper/.config/nix/nix.conf:/etc/xdg/nix/nix.conf:/home/jasper/.nix-profile/etc/xdg/nix/nix.conf:/nix/profile/etc/xdg/nix/nix.conf:/home/jasper/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/jasper/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf Store directory: /nix/store State directory: /nix/var/nix Data directory: /nix/store/xjcvjdif1fv2zdsywa2g2r2rahymqbdm-lix-2.91.0/share
- nixpkgs:/nix/store/m68ikm8045fj7ys7qvgr608z9l70hh1k-source
📝 Relevant log output
The text was updated successfully, but these errors were encountered: