2021-12-11 16:56:27 +00:00
|
|
|
{
|
2023-11-06 15:04:08 +01:00
|
|
|
lib,
|
|
|
|
helpers,
|
2023-02-20 11:42:13 +01:00
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
with lib; let
|
|
|
|
cfg = config.plugins.intellitab;
|
|
|
|
in {
|
2021-12-11 16:56:27 +00:00
|
|
|
options = {
|
2022-09-18 11:19:23 +01:00
|
|
|
plugins.intellitab = {
|
2021-12-11 16:56:27 +00:00
|
|
|
enable = mkEnableOption "intellitab.nvim";
|
2023-01-19 10:45:15 +00:00
|
|
|
|
2023-03-26 15:44:45 +02:00
|
|
|
package = helpers.mkPackageOption "intellitab.nvim" pkgs.vimPlugins.intellitab-nvim;
|
2021-12-11 16:56:27 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
2023-02-20 11:42:13 +01:00
|
|
|
extraPlugins = [cfg.package];
|
2021-12-11 16:56:27 +00:00
|
|
|
|
2023-09-15 14:35:13 +02:00
|
|
|
keymaps = [
|
|
|
|
{
|
|
|
|
mode = "i";
|
|
|
|
key = "<Tab>";
|
|
|
|
action = "require('intellitab').indent";
|
|
|
|
lua = true;
|
|
|
|
}
|
|
|
|
];
|
2022-09-18 11:19:23 +01:00
|
|
|
plugins.treesitter = {
|
|
|
|
indent = true;
|
2021-12-11 16:56:27 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|