mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 16:39:00 +02:00
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:
parent
9265d1ab08
commit
6c9d178ecc
1 changed files with 19 additions and 0 deletions
|
@ -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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue