Skip to content

Commit

Permalink
emacs: handle specially-named tree-sitter grammars
Browse files Browse the repository at this point in the history
(cherry picked from commit 3f5ceb2)
  • Loading branch information
leungbk authored and github-actions[bot] committed Feb 23, 2025
1 parent b412cc7 commit e374571
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
let
libExt = pkgs.stdenv.hostPlatform.extensions.sharedLibrary;
grammarToAttrSet = drv: {
name = "lib/lib${lib.strings.removeSuffix "-grammar" (lib.strings.getName drv)}${libExt}";
name = "lib/lib${
lib.strings.replaceStrings [ "_" ] [ "-" ] (
lib.strings.removeSuffix "-grammar" (lib.strings.getName drv)
)
}${libExt}";
path = "${drv}/parser";
};

Expand Down

0 comments on commit e374571

Please sign in to comment.