From 2627d0484adb226f43392648326a72da448edeb7 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Tue, 18 Apr 2023 01:11:02 +0300 Subject: [PATCH] feat: fix for when internal formatter is true --- modules/languages/default.nix | 2 +- modules/languages/nix.nix | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/languages/default.nix b/modules/languages/default.nix index 3708737..b3b7d34 100644 --- a/modules/languages/default.nix +++ b/modules/languages/default.nix @@ -2,7 +2,7 @@ with lib; let mkEnable = desc: mkOption { - description = "Turn on ${desc} for enabled langauges by default"; + description = "Turn on ${desc} for enabled languages by default"; type = types.bool; default = false; }; diff --git a/modules/languages/nix.nix b/modules/languages/nix.nix index 3313c34..c6dae73 100644 --- a/modules/languages/nix.nix +++ b/modules/languages/nix.nix @@ -15,7 +15,7 @@ with builtins; let servers = { rnix = { package = pkgs.rnix-lsp; - internalFormatter = true; + internalFormatter = cfg.format.type == "nixpkgs-fmt"; lspConfig = '' lspconfig.rnix.setup{ capabilities = capabilities, @@ -31,7 +31,7 @@ with builtins; let nil = { package = pkgs.nil; - internalFormatter = cfg.format.type != "nixpkgs-fmt"; + internalFormatter = true; lspConfig = '' lspconfig.nil_ls.setup{ capabilities = capabilities,