mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +02:00
plugins/treesitter: re-organize treesitter plugins
This commit is contained in:
parent
f79dccdc2e
commit
ff791d20c8
7 changed files with 12 additions and 8 deletions
|
@ -36,10 +36,10 @@
|
||||||
./languages/rust.nix
|
./languages/rust.nix
|
||||||
./languages/sniprun.nix
|
./languages/sniprun.nix
|
||||||
./languages/tagbar.nix
|
./languages/tagbar.nix
|
||||||
./languages/treesitter.nix
|
./languages/treesitter/treesitter.nix
|
||||||
./languages/treesitter-context.nix
|
./languages/treesitter/treesitter-context.nix
|
||||||
./languages/treesitter-playground.nix
|
./languages/treesitter/treesitter-playground.nix
|
||||||
./languages/treesitter-refactor.nix
|
./languages/treesitter/treesitter-refactor.nix
|
||||||
./languages/vimtex.nix
|
./languages/vimtex.nix
|
||||||
./languages/zig.nix
|
./languages/zig.nix
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib; let
|
with lib; let
|
||||||
helpers = import ../helpers.nix {inherit lib;};
|
helpers = import ../../helpers.nix {inherit lib;};
|
||||||
in {
|
in {
|
||||||
options.plugins.treesitter-context = {
|
options.plugins.treesitter-context = {
|
||||||
enable = mkEnableOption "nvim-treesitter-context";
|
enable = mkEnableOption "nvim-treesitter-context";
|
|
@ -5,7 +5,7 @@
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib; let
|
with lib; let
|
||||||
helpers = import ../helpers.nix {inherit lib;};
|
helpers = import ../../helpers.nix {inherit lib;};
|
||||||
|
|
||||||
inherit (helpers) mkPackageOption mkCompositeOption;
|
inherit (helpers) mkPackageOption mkCompositeOption;
|
||||||
inherit (helpers.defaultNullOpts) mkInt mkBool mkStr mkNullable;
|
inherit (helpers.defaultNullOpts) mkInt mkBool mkStr mkNullable;
|
|
@ -5,7 +5,7 @@
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib; let
|
with lib; let
|
||||||
helpers = import ../helpers.nix {inherit lib;};
|
helpers = import ../../helpers.nix {inherit lib;};
|
||||||
in {
|
in {
|
||||||
options.plugins.treesitter-refactor = let
|
options.plugins.treesitter-refactor = let
|
||||||
disable = mkOption {
|
disable = mkOption {
|
||||||
|
@ -104,6 +104,10 @@ in {
|
||||||
cfg = config.plugins.treesitter-refactor;
|
cfg = config.plugins.treesitter-refactor;
|
||||||
in
|
in
|
||||||
mkIf cfg.enable {
|
mkIf cfg.enable {
|
||||||
|
warnings = mkIf (!config.plugins.treesitter.enable) [
|
||||||
|
"Nixvim: treesitter-refactor needs treesitter to function as intended"
|
||||||
|
];
|
||||||
|
|
||||||
extraPlugins = [cfg.package];
|
extraPlugins = [cfg.package];
|
||||||
|
|
||||||
plugins.treesitter.moduleConfig.refactor = {
|
plugins.treesitter.moduleConfig.refactor = {
|
|
@ -6,7 +6,7 @@
|
||||||
}:
|
}:
|
||||||
with lib; let
|
with lib; let
|
||||||
cfg = config.plugins.treesitter;
|
cfg = config.plugins.treesitter;
|
||||||
helpers = import ../helpers.nix {inherit lib;};
|
helpers = import ../../helpers.nix {inherit lib;};
|
||||||
in {
|
in {
|
||||||
options = {
|
options = {
|
||||||
plugins.treesitter = {
|
plugins.treesitter = {
|
Loading…
Add table
Add a link
Reference in a new issue