From 71dd58ce85493d9061a2d9e009f8da59e5fea686 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Luis=20Lafuente?= Date: Tue, 11 Jan 2022 23:34:11 +0100 Subject: [PATCH] tree-sitter-markdown: ikatyang parser to MDeiml Replace https://github.com/ikatyang/tree-sitter-markdown with https://github.com/MDeiml/tree-sitter-markdown With neovim, the current markdown parser crashes sometimes. nvim-treesitter project uses MDeiml parser to avoid those crashes, take a look to https://github.com/nvim-treesitter/nvim-treesitter/pull/2105 and https://github.com/nvim-treesitter/nvim-treesitter/issues/872 to see why the picked one over the other. --- pkgs/development/tools/parsing/tree-sitter/default.nix | 2 +- .../tree-sitter/grammars/tree-sitter-markdown.json | 10 +++++----- pkgs/development/tools/parsing/tree-sitter/update.nix | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pkgs/development/tools/parsing/tree-sitter/default.nix b/pkgs/development/tools/parsing/tree-sitter/default.nix index 79dd9a6b57d4..e81e5e48bdf6 100644 --- a/pkgs/development/tools/parsing/tree-sitter/default.nix +++ b/pkgs/development/tools/parsing/tree-sitter/default.nix @@ -91,7 +91,7 @@ let in { name = - (lib.strings.replaceStrings ["-"] ["_"] + (lib.strings.replaceStrings [ "-" ] [ "_" ] (lib.strings.removePrefix "tree-sitter-" (lib.strings.removeSuffix "-grammar" name))) + stdenv.hostPlatform.extensions.sharedLibrary; diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-markdown.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-markdown.json index c908bde0dfff..e34455069bc3 100644 --- a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-markdown.json +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-markdown.json @@ -1,9 +1,9 @@ { - "url": "https://github.com/ikatyang/tree-sitter-markdown", - "rev": "8b8b77af0493e26d378135a3e7f5ae25b555b375", - "date": "2021-04-18T20:49:21+08:00", - "path": "/nix/store/4z2k0q6rwqmb7vbqr4vgc26w28szlan3-tree-sitter-markdown", - "sha256": "1a2899x7i6dgbsrf13qzmh133hgfrlvmjsr3bbpffi1ixw1h7azk", + "url": "https://github.com/MDeiml/tree-sitter-markdown", + "rev": "8bee14c30ecadd55c2d65633973b4e81f93525e0", + "date": "2022-01-16T14:47:09+01:00", + "path": "/nix/store/cv7xqvcj4bjifzddkx5n2jd723dc6vlf-tree-sitter-markdown", + "sha256": "0vibmpp86pkqllfhb0kg6zhaz09sh8m6a2d1xa8p2qdi7ryy7wqa", "fetchLFS": false, "fetchSubmodules": false, "deepClone": false, diff --git a/pkgs/development/tools/parsing/tree-sitter/update.nix b/pkgs/development/tools/parsing/tree-sitter/update.nix index 328c0e8bb6df..c0a5812d7e88 100644 --- a/pkgs/development/tools/parsing/tree-sitter/update.nix +++ b/pkgs/development/tools/parsing/tree-sitter/update.nix @@ -117,7 +117,7 @@ let repo = "tree-sitter-make"; }; "tree-sitter-markdown" = { - orga = "ikatyang"; + orga = "MDeiml"; repo = "tree-sitter-markdown"; }; "tree-sitter-rst" = {