mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-03-15 21:26:03 +00:00
language/fluent: init
This commit is contained in:
parent
daf181249b
commit
77e7f8da36
5 changed files with 52 additions and 0 deletions
34
modules/plugins/languages/fluent.nix
Normal file
34
modules/plugins/languages/fluent.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.modules) mkIf;
|
||||
|
||||
cfg = config.vim.languages.fluent;
|
||||
in {
|
||||
options.vim.languages.fluent = {
|
||||
enable = mkEnableOption "Fluent language support";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
vim = {
|
||||
lazy.plugins.fluent-nvim = {
|
||||
package = "fluent-nvim";
|
||||
ft = ["fluent"];
|
||||
};
|
||||
autocmds = [
|
||||
{
|
||||
event = [
|
||||
"BufRead"
|
||||
"BufNewFile"
|
||||
];
|
||||
pattern = ["*.ftl"];
|
||||
desc = "Set fluent filetype";
|
||||
command = "set filetype=fluent";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue