From c90f6659cb0b6081b5c91b8da57d150c321a78cf Mon Sep 17 00:00:00 2001 From: Soliprem Date: Mon, 7 Oct 2024 13:42:12 +0200 Subject: [PATCH] kotlin: cleanup --- modules/plugins/languages/kotlin.nix | 46 ---------------------------- 1 file changed, 46 deletions(-) diff --git a/modules/plugins/languages/kotlin.nix b/modules/plugins/languages/kotlin.nix index 4cffc1f7..cd3eeefa 100644 --- a/modules/plugins/languages/kotlin.nix +++ b/modules/plugins/languages/kotlin.nix @@ -31,31 +31,6 @@ ''; }; - defaultFormat = "ktlint"; - formats = { - ktlint = { - package = pkgs.ktlint; - nullConfig = '' - table.insert( - ls_sources, - null_ls.builtins.formatting.ktlint.with({ - command = "${cfg.format.package}/bin/ktlint", - }) - ) - ''; - }; - ktfmt = { - package = pkgs.ktfmt; - nullConfig = '' - table.insert( - ls_sources, - null_ls.builtins.formatting.ktlint.with({ - command = "${cfg.format.package}/bin/ktfmt", - }) - ) - ''; - }; - }; defaultDiagnosticsProvider = ["ktlint"]; diagnosticsProviders = { ktlint = { @@ -89,22 +64,6 @@ in { }; }; - format = { - enable = mkEnableOption "Kotlin document formatting" // {default = config.vim.languages.enableFormat;}; - - type = mkOption { - description = "Kotlin formatter to use"; - type = enum (attrNames formats); - default = defaultFormat; - }; - - package = mkOption { - description = "Kotlin formatter package"; - type = package; - default = formats.${cfg.format.type}.package; - }; - }; - extraDiagnostics = { enable = mkEnableOption "extra Kotlin diagnostics" // {default = config.vim.languages.enableExtraDiagnostics;}; @@ -121,11 +80,6 @@ in { vim.treesitter.grammars = [cfg.treesitter.package]; }) - # (mkIf cfg.format.enable { - # vim.lsp.null-ls.enable = true; - # vim.lsp.null-ls.sources.kotlin-format = formats.${cfg.format.type}.nullConfig; - # }) - (mkIf cfg.extraDiagnostics.enable { vim.lsp.null-ls.enable = true; vim.lsp.null-ls.sources = diagnosticsToLua {