From f3aad89088593132ef5e3d68385f48ade705c5a2 Mon Sep 17 00:00:00 2001 From: Julia Lange Date: Wed, 18 Feb 2026 14:00:28 -0800 Subject: [PATCH] merge treesitter into app.nix I'm uncertain if I moved the plugins over (I think they are all enabled by default) --- hmModules/apps/neovim/app.nix | 9 +++-- hmModules/apps/neovim/plugin/treesitter.nix | 38 --------------------- 2 files changed, 6 insertions(+), 41 deletions(-) delete mode 100644 hmModules/apps/neovim/plugin/treesitter.nix diff --git a/hmModules/apps/neovim/app.nix b/hmModules/apps/neovim/app.nix index 1fabccd..d61b7a4 100644 --- a/hmModules/apps/neovim/app.nix +++ b/hmModules/apps/neovim/app.nix @@ -28,8 +28,6 @@ }; }; - # ./plugin/treesitter.nix - config = lib.mkIf config.neovim.enable { home.sessionVariables = { EDITOR = "nvim"; @@ -136,7 +134,12 @@ }; }; - treesitter.enable = treesiter.enable; + treesitter = { + enable = treesiter.enable; + highlight.enable = true; + indent.enable = true; + folding.enable = true; + }; vimwiki = { enable = wiki.enable; diff --git a/hmModules/apps/neovim/plugin/treesitter.nix b/hmModules/apps/neovim/plugin/treesitter.nix deleted file mode 100644 index a6bb8c0..0000000 --- a/hmModules/apps/neovim/plugin/treesitter.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ config, pkgs, lib, ... }: - -let - cfgp = config.neovim.plugins; - cfgl = config.neovim.languages; -in { - config = lib.mkIf (config.neovim.enable && cfgp.treesitter.enable) { - programs.neovim.plugins = let - configText = '' - require('nvim-treesitter.configs').setup { - ensure_installed = {}, - - auto_install = false, - - highlight = { enable = true }, - - indent = { enable = true }, - } - ''; - - # I've tried many things, and can't get treesitter plugins changing - # dynamically. For not just have them always loaded regardless of config - treeplugs = p: [ - p.tree-sitter-c - p.tree-sitter-go - p.tree-sitter-nix - p.tree-sitter-rust - p.tree-sitter-typescript - ]; - in with pkgs.vimPlugins; [ - { - plugin = (nvim-treesitter.withPlugins treeplugs); - type = "lua"; - config = configText; - } - ]; - }; -}