# nixos-config - My current NixOS configuration # # Copyright (C) 2025 Benedikt Peetz # SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of my nixos-config. # # You should have received a copy of the License along with this program. # If not, see . { config, pkgs, lib, ... }: let cfg = config.soispha.programs.nvim; in { home-manager.users.soispha.programs.nixvim = lib.mkIf cfg.enable { # NOTE: These are required to build grammars, but I already use the nix grammars <2024-07-13> dependencies = { tree-sitter.enable = false; nodejs.enable = false; gcc.enable = false; }; plugins.treesitter = { enable = true; highlight.enable = true; indent.enable = true; folding.enable = false; # inject nixvim specific highlighting (eg in extraConfigLua). nixvimInjections = true; grammarPackages = pkgs.vimPlugins.nvim-treesitter.allGrammars ++ [pkgs.tree-sitter-yts]; # Register the parser to filetype languageRegister.yts = "yts"; }; # TODO: Is that necessary? <2026-01-18> # extraPlugins = [pkgs.tree-sitter-yts]; # TODO: Remove this by moving the queries in the package to `queries//...`' <2026-01-18> extraFiles = { "queries/yts/highlights.scm".text = '' ${lib.strings.fileContents "${pkgs.tree-sitter-yts}/queries/highlights.scm"} ''; }; }; }