plugins/rest: add filetype association option

This gives users a quick way to setup the filetype association that is
expected to be configured for proper usage of the plugin.
This commit is contained in:
Austin Horstman 2024-09-09 17:05:33 -05:00
parent 9265d1ab08
commit 6c9d178ecc
No known key found for this signature in database

View file

@ -399,4 +399,23 @@ helpers.neovim-plugin.mkNeovimPlugin {
] ]
]; ];
}; };
extraOptions = {
enableHttpFiletypeAssociation = lib.mkOption {
type = types.bool;
default = true;
description = ''
Sets up the filetype association of `.http` files to trigger treesitter support.
'';
};
};
extraConfig = cfg: {
filetype = lib.mkIf cfg.enableHttpFiletypeAssociation {
extension = {
"http" = "http";
};
};
};
} }