mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 04:58:01 +00:00
nixvimConfigs/fiesta/setups/treesitter: init
This commit is contained in:
parent
ed1264c062
commit
c8cd8b44ff
@ -5,6 +5,7 @@
|
||||
imports = [ ./modules ];
|
||||
|
||||
nixvimConfigs.fiesta.setups = {
|
||||
treesitter.enable = true;
|
||||
desktop-utils.enable = true;
|
||||
};
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
{
|
||||
imports = [
|
||||
./setups/desktop-utils.nix
|
||||
./setups/treesitter.nix
|
||||
];
|
||||
}
|
||||
|
38
configs/nixvim/fiesta/modules/setups/treesitter.nix
Normal file
38
configs/nixvim/fiesta/modules/setups/treesitter.nix
Normal file
@ -0,0 +1,38 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
nixvimCfg = config.nixvimConfigs.fiesta;
|
||||
cfg = nixvimCfg.setups.treesitter;
|
||||
in
|
||||
{
|
||||
options.nixvimConfigs.fiesta.setups.treesitter.enable =
|
||||
lib.mkEnableOption "tree-sitter setup for Fiesta NixVim";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
# The main star of the show.
|
||||
plugins.treesitter = {
|
||||
enable = true;
|
||||
|
||||
# Install all of the grammars with Nix. We can easily replace it if we
|
||||
# want to.
|
||||
nixGrammars = true;
|
||||
ensureInstalled = "all";
|
||||
|
||||
# Enable all of its useful features.
|
||||
folding = true;
|
||||
indent = true;
|
||||
};
|
||||
|
||||
# Enable some more context for me.
|
||||
plugins.treesitter-context = {
|
||||
enable = true;
|
||||
lineNumbers = true;
|
||||
maxLines = 10;
|
||||
};
|
||||
|
||||
# Show me your moves.
|
||||
plugins.treesitter-textobjects = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user