mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2026-05-14 05:38:04 +02:00
* feat: update from builtGrammars to grammarPlugins * fix: renamed packages * chore: revert back the configs part * wip: try using config * chore: update flake * docs: update release-note --------- Co-authored-by: raf <raf@notashelf.dev>
23 lines
602 B
Nix
23 lines
602 B
Nix
{
|
|
config,
|
|
lib,
|
|
...
|
|
}: let
|
|
inherit (lib.modules) mkIf;
|
|
inherit (lib.nvim.lua) toLuaObject;
|
|
inherit (lib.nvim.dag) entryAfter;
|
|
|
|
inherit (config.vim) treesitter;
|
|
cfg = treesitter.textobjects;
|
|
in {
|
|
config = mkIf (treesitter.enable && cfg.enable) {
|
|
vim = {
|
|
startPlugins = ["nvim-treesitter-textobjects"];
|
|
|
|
# set up treesitter-textobjects after Treesitter, whose config we're adding to.
|
|
pluginRC.treesitter-textobjects = entryAfter ["treesitter"] ''
|
|
require("nvim-treesitter.config").setup({textobjects = ${toLuaObject cfg.setupOpts}})
|
|
'';
|
|
};
|
|
};
|
|
}
|