nixvim
nixvim copied to clipboard
[BUG] nixvimInjections don't seem to work on nightly
| Field | Description |
|---|---|
| Plugin | treesitter |
| Nixpkgs | unstable |
- [x] I have read the FAQ and my bug is not listed there.
Description
The nixvimInjections option does not work on nighlty builds of neovim. The extraConfigLua regions do not get properly highlighted as lua code. A minor thing, but I thought it worth to report :)
Minimal, Reproducible Example (MRE)
I'm able to reproduce the behavior with this minimal flake:
{
description = "A nixvim configuration";
inputs = {
nixvim.url = "github:nix-community/nixvim";
flake-utils.url = "github:numtide/flake-utils";
nixneovimplugins.url = "github:NixNeovim/NixNeovimPlugins";
neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
};
outputs = {
nixpkgs,
nixvim,
flake-utils,
nixneovimplugins,
...
} @ inputs:
flake-utils.lib.eachDefaultSystem (system: let
pkgs-nightly = import nixpkgs {
inherit system;
overlays = [
nixneovimplugins.overlays.default
inputs.neovim-nightly-overlay.overlay
];
};
pkgs = import nixpkgs {
inherit system;
overlays = [
nixneovimplugins.overlays.default
];
};
nixvim' = nixvim.legacyPackages.${system};
inject = nixvim'.makeNixvimWithModule {
inherit pkgs;
module = {
plugins.treesitter = {
enable = true;
nixvimInjections = true;
};
};
};
inject-nightly = nixvim'.makeNixvimWithModule {
pkgs = pkgs-nightly;
module = {
plugins.treesitter = {
enable = true;
nixvimInjections = true;
};
};
};
in {
packages = {
inherit inject;
inherit inject-nightly;
};
});
}
nix run ".#inject" and nix run ".#inject-nightly" for the different versions.
Opening any file with extraConfigLua should show that the nighly version does not properly highlight those regions.