overlays: add 'nvim-treesitter-legacy-shim'
There has been a major breaking change upstream, as they have merged updated the plug-in to its (majorly incompatible) main branch rewrite. To make the upgrade process easier, this overlay ensures my configuration will keep evaluating with the legacy plug-in variant.
This commit is contained in:
parent
69b9480aa1
commit
47ca4ed61c
1 changed files with 18 additions and 0 deletions
18
overlays/nvim-treesitter-legacy-shim/default.nix
Normal file
18
overlays/nvim-treesitter-legacy-shim/default.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
final: prev:
|
||||
let
|
||||
inherit (final) lib;
|
||||
overrides = final: prev:
|
||||
let
|
||||
hasLegacyPackage = prev ? nvim-treesitter-legacy;
|
||||
in
|
||||
{
|
||||
nvim-treesitter-textobjects-legacy = prev.nvim-treesitter-textobjects.overrideAttrs {
|
||||
dependencies = [ final.nvim-treesitter-legacy ];
|
||||
};
|
||||
} // (lib.optionalAttrs (!hasLegacyPackage) {
|
||||
nvim-treesitter-legacy = final.nvim-treesitter;
|
||||
});
|
||||
in
|
||||
{
|
||||
vimPlugins = prev.vimPlugins.extend (overrides);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue