mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-04-02 19:11:53 +00:00
language/ocaml: migrate to conform/nvim-lint
This commit is contained in:
parent
e0bcd93bea
commit
09e5a13c61
1 changed files with 7 additions and 11 deletions
|
@ -37,14 +37,6 @@
|
||||||
formats = {
|
formats = {
|
||||||
ocamlformat = {
|
ocamlformat = {
|
||||||
package = pkgs.ocamlPackages.ocamlformat;
|
package = pkgs.ocamlPackages.ocamlformat;
|
||||||
nullConfig = ''
|
|
||||||
table.insert(
|
|
||||||
ls_sources,
|
|
||||||
null_ls.builtins.formatting.ocamlformat.with({
|
|
||||||
command = "${cfg.format.package}/bin/ocamlformat",
|
|
||||||
})
|
|
||||||
)
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
|
@ -97,9 +89,13 @@ in {
|
||||||
})
|
})
|
||||||
|
|
||||||
(mkIf cfg.format.enable {
|
(mkIf cfg.format.enable {
|
||||||
vim.lsp.null-ls.enable = true;
|
vim.formatter.conform-nvim = {
|
||||||
vim.lsp.null-ls.sources.ocamlformat = formats.${cfg.format.type}.nullConfig;
|
enable = true;
|
||||||
vim.extraPackages = [formats.${cfg.format.type}.package];
|
setupOpts.formatters_by_ft.ocaml = [cfg.format.type];
|
||||||
|
setupOpts.formatters.${cfg.format.type} = {
|
||||||
|
command = getExe cfg.format.package;
|
||||||
|
};
|
||||||
|
};
|
||||||
})
|
})
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue