From 854184e10ee791ad46c1e405b0bdb3190bcc7038 Mon Sep 17 00:00:00 2001 From: Snoweuph Date: Sat, 11 Apr 2026 13:29:38 +0200 Subject: [PATCH] lsp/presets/taplo: init --- modules/plugins/lsp/presets/default.nix | 1 + modules/plugins/lsp/presets/taplo.nix | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 modules/plugins/lsp/presets/taplo.nix diff --git a/modules/plugins/lsp/presets/default.nix b/modules/plugins/lsp/presets/default.nix index 1e2b6e09..711ea32a 100644 --- a/modules/plugins/lsp/presets/default.nix +++ b/modules/plugins/lsp/presets/default.nix @@ -3,6 +3,7 @@ ./deno.nix ./harper.nix ./lemminx.nix + ./taplo.nix ./tinymist.nix ./twig-language-server.nix ./typescript-go.nix diff --git a/modules/plugins/lsp/presets/taplo.nix b/modules/plugins/lsp/presets/taplo.nix new file mode 100644 index 00000000..6cd0aed3 --- /dev/null +++ b/modules/plugins/lsp/presets/taplo.nix @@ -0,0 +1,24 @@ +{ + config, + lib, + pkgs, + ... +}: let + inherit (lib.meta) getExe; + inherit (lib.modules) mkIf; + inherit (lib.options) mkEnableOption; + + cfg = config.vim.lsp.presets.taplo; +in { + options.vim.lsp.presets.taplo = { + enable = mkEnableOption "the Taplo Language Server"; + }; + + config = mkIf cfg.enable { + vim.lsp.servers.taplo = { + enable = true; + cmd = [(getExe pkgs.taplo) "lsp" "stdio"]; + root_markers = [".git"]; + }; + }; +}