Support setting ftconfig
There should be a way to set config specific to certain filetypes using ftplugin files, for both performance and convenience. For examples for setting mappings that are only relevant on certain filetypes.
I am willing to implement it, but I'd like to discuss the design first, hence this issue.
The first challenge is how to organise the options, since mostly we want to pretty much duplicate all the options for filetype specific commands, so we would need to find a way to keep it both ergonomic to use but hopefully without too much nix wizardry.
The second one is that this feature is not supported by the neovim infrastructure in nixpkgs which this plugin is based on. One possible workaround would be to put it in functions in init.vim that are then autocalled. It would allow working on this on nixvim side while in parallel trying to extend things on the nixpkgs side.
I think the best-case scenario for this would be something like
{
ft."nix" = {
plugins.nix.enable = true;
options.numbers = true;
};
}
as in, allowing the full range of nixvim options inside of it. This would definitely require some reworking though. I'd say the same options should work for autocommands, too. Not fully sure how to implement this though, but it's definitely doable with some effort
Fixed by https://github.com/pta2002/nixvim/pull/246