mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-12-15 16:41:03 +00:00
gleam: not using formatter
This commit is contained in:
parent
8ca3a1e1ac
commit
75b27f2198
1 changed files with 0 additions and 37 deletions
|
|
@ -30,22 +30,6 @@
|
|||
'';
|
||||
};
|
||||
};
|
||||
|
||||
defaultFormat = "gleam_format";
|
||||
formats = {
|
||||
gleam_format = {
|
||||
package = pkgs.gleam;
|
||||
nullConfig = ''
|
||||
table.insert(
|
||||
ls_sources,
|
||||
null_ls.builtins.formatting.gleam_format.with({
|
||||
command = "${cfg.format.package}/bin/gleam",
|
||||
})
|
||||
)
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
in {
|
||||
options.vim.languages.gleam = {
|
||||
enable = mkEnableOption "Gleam language support";
|
||||
|
|
@ -74,22 +58,6 @@ in {
|
|||
description = "gleam LSP server package, or the command to run as a list of strings";
|
||||
};
|
||||
};
|
||||
|
||||
format = {
|
||||
enable = mkEnableOption "Gleam formatting" // {default = config.vim.languages.enableFormat;};
|
||||
|
||||
type = mkOption {
|
||||
type = enum (attrNames formats);
|
||||
default = defaultFormat;
|
||||
description = "Gleam formatter to use";
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = package;
|
||||
default = formats.${cfg.format.type}.package;
|
||||
description = "Gleam formatter package";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable (mkMerge [
|
||||
|
|
@ -102,10 +70,5 @@ in {
|
|||
vim.lsp.lspconfig.enable = true;
|
||||
vim.lsp.lspconfig.sources.gleam-lsp = servers.${cfg.lsp.server}.lspConfig;
|
||||
})
|
||||
|
||||
(mkIf cfg.format.enable {
|
||||
vim.lsp.null-ls.enable = true;
|
||||
vim.lsp.null-ls.sources.gleam-format = formats.${cfg.format.type}.nullConfig;
|
||||
})
|
||||
]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue