From c36bad03ebea155401aee9cad89a33cc11514ff7 Mon Sep 17 00:00:00 2001 From: Dmitriy Pleshevskiy Date: Fri, 10 May 2024 22:26:33 +0300 Subject: [PATCH] neovim: add tree-sitter-d2 grammar --- neovim/dev.nix | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/neovim/dev.nix b/neovim/dev.nix index b503da9..e589f5d 100644 --- a/neovim/dev.nix +++ b/neovim/dev.nix @@ -1,4 +1,4 @@ -{ config, modulesPath, lib, ... }: +{ config, modulesPath, lib, pkgs, ... }: let inherit (lib.mod) ctrl; @@ -57,6 +57,22 @@ in }) ]; + plugins.style.nvim-treesitter.extraGrammars = { + tree-sitter-d2 = rec { + language = "d2"; + version = "8a9d50043d58eedf1e375b0e2059e43efd856902"; + # version = "e7507ddd983427cb71b4bd96b039c382c73d65c5"; + src = pkgs.fetchFromGitea { + domain = "git.pleshevski.ru"; + owner = "pleshevskiy"; + repo = "tree-sitter-d2"; + rev = version; + sha256 = "sha256-ZhVjxo7Xi7DaHN3qabUcykflY74bUqPcOA410fA3zRk="; + # sha256 = "sha256-m7ZCxnW4Q1bQp1GhntUF7l+p6DV1p/2AJXhVeRy8Rec="; + }; + }; + }; + plugins.style.neoformat.autoformat.enable = true; plugins.navigation = {