Skip to content

Commit

Permalink
plugins/rest: add filetype association option
Browse files Browse the repository at this point in the history
This gives users a quick way to setup the filetype association that is
expected to be configured for proper usage of the plugin.
  • Loading branch information
khaneliman committed Sep 9, 2024
1 parent 9265d1a commit 6c9d178
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions plugins/by-name/rest/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
};
};
};
}

0 comments on commit 6c9d178

Please sign in to comment.