mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-14 01:33:10 +00:00
tree-sitter: replace hyphens with underscores in .withPlugins
nvim-treesitter expects underscores instead of hyphens, causing some grammars not to be recognised
This commit is contained in:
parent
ed48b35991
commit
46232128d2
@ -90,8 +90,9 @@ let
|
||||
in
|
||||
{
|
||||
name =
|
||||
(lib.strings.removePrefix "tree-sitter-"
|
||||
(lib.strings.removeSuffix "-grammar" name))
|
||||
(lib.strings.replaceStrings ["-"] ["_"]
|
||||
(lib.strings.removePrefix "tree-sitter-"
|
||||
(lib.strings.removeSuffix "-grammar" name)))
|
||||
+ stdenv.hostPlatform.extensions.sharedLibrary;
|
||||
path = "${drv}/parser";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user