From 2f0efdbf15ed20192bfa67eecda712a728ea0df3 Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Mon, 11 Sep 2023 15:19:55 +0200 Subject: [PATCH 01/14] feat: make nix lsp install optional --- modules/languages/nix.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/languages/nix.nix b/modules/languages/nix.nix index 5ee616c..81f96c5 100644 --- a/modules/languages/nix.nix +++ b/modules/languages/nix.nix @@ -12,6 +12,10 @@ with builtins; let noFormat = "on_attach = attach_keymaps"; defaultServer = "nil"; + packageToCmd = package: defaultCmd: + if isList package + then lib.nvim.lua.expToLua package + else ''{"${package}/bin/${defaultCmd}"}''; servers = { rnix = { package = pkgs.rnix-lsp; @@ -24,7 +28,7 @@ with builtins; let then useFormat else noFormat }, - cmd = {"${cfg.lsp.package}/bin/rnix-lsp"}, + cmd = ${packageToCmd cfg.lsp.package "rnix-lsp"}, } ''; }; @@ -40,7 +44,7 @@ with builtins; let then useFormat else noFormat }, - cmd = {"${cfg.lsp.package}/bin/nil"}, + cmd = ${packageToCmd cfg.lsp.package "nil"}, ${optionalString cfg.format.enable '' settings = { ["nil"] = { @@ -131,7 +135,7 @@ in { }; package = mkOption { description = "Nix LSP server package"; - type = types.package; + type = with types; either package (listOf str); default = servers.${cfg.lsp.server}.package; }; }; From 3907c61f9b46b029067c08c7686331210c71cadc Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Thu, 14 Sep 2023 23:40:04 +0200 Subject: [PATCH 02/14] feat: make go lsp install optional --- modules/languages/go.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/languages/go.nix b/modules/languages/go.nix index aae808b..1bde15b 100644 --- a/modules/languages/go.nix +++ b/modules/languages/go.nix @@ -16,7 +16,11 @@ with builtins; let lspconfig.gopls.setup { capabilities = capabilities; on_attach = default_on_attach; - cmd = {"${cfg.lsp.package}/bin/gopls", "serve"}, + cmd = ${ + if isList cfg.lsp.package + then nvim.lua.expToLua cfg.lsp.package + else ''{"${cfg.lsp.package}/bin/gopls", "serve"}'' + }, } ''; }; @@ -82,7 +86,7 @@ in { package = mkOption { description = "Go LSP server package"; - type = types.package; + type = with types; either package (listOf str); default = servers.${cfg.lsp.server}.package; }; }; From 3ca97bccbc01e118aea298f0c01e24b6cb3a17df Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Thu, 14 Sep 2023 23:55:11 +0200 Subject: [PATCH 03/14] feat: make rust lsp install optional --- modules/languages/rust.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/languages/rust.nix b/modules/languages/rust.nix index 21ab58d..b3ad758 100644 --- a/modules/languages/rust.nix +++ b/modules/languages/rust.nix @@ -30,7 +30,7 @@ in { package = mkOption { description = "rust-analyzer package"; - type = types.package; + type = with types; either package (listOf str); default = pkgs.rust-analyzer; }; @@ -118,7 +118,11 @@ in { server = { capabilities = capabilities, on_attach = rust_on_attach, - cmd = {"${cfg.lsp.package}/bin/rust-analyzer"}, + cmd = ${ + if isList cfg.lsp.package + then nvim.lua.expToLua cfg.lsp.package + else ''{"${cfg.lsp.package}/bin/rust-analyzer"}'' + }, settings = { ${cfg.lsp.opts} } From 2075211c185b50a65a1573f0d96a34491e631a41 Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Fri, 15 Sep 2023 00:02:34 +0200 Subject: [PATCH 04/14] feat: make zig lsp install optional --- modules/languages/zig.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/languages/zig.nix b/modules/languages/zig.nix index f6c42d3..2f3bcec 100644 --- a/modules/languages/zig.nix +++ b/modules/languages/zig.nix @@ -21,7 +21,7 @@ in { package = mkOption { description = "ZLS package"; - type = types.package; + type = with types; either package (listOf str); default = pkgs.zls; }; @@ -44,7 +44,11 @@ in { lspconfig.zls.setup { capabilities = capabilities, on_attach=default_on_attach, - cmd = {"${cfg.lsp.package}/bin/zls"}, + cmd = ${ + if isList cfg.lsp.package + then nvim.lua.expToLua cfg.lsp.package + else ''{"${cfg.lsp.package}/bin/zls"}'' + }, settings = { ["zls"] = { zig_exe_path = "${cfg.lsp.zigPackage}/bin/zig", From a0399722a0d39fc230f27711e743cf434dd0ca0e Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Fri, 15 Sep 2023 00:17:12 +0200 Subject: [PATCH 05/14] feat: make java lsp install optional --- modules/languages/java.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/languages/java.nix b/modules/languages/java.nix index 1792824..f090611 100644 --- a/modules/languages/java.nix +++ b/modules/languages/java.nix @@ -21,7 +21,7 @@ in { package = mkOption { description = "java language server"; - type = types.package; + type = with types; either package (listOf str); default = pkgs.jdt-language-server; }; }; @@ -32,7 +32,11 @@ in { vim.lsp.lspconfig.enable = true; vim.lsp.lspconfig.sources.jdtls = '' lspconfig.jdtls.setup { - cmd = {"${cfg.lsp.package}/bin/jdt-language-server", "-data", vim.fn.stdpath("cache").."/jdtls/workspace"}, + cmd = ${ + if isList cfg.lsp.package + then nvim.lua.expToLua cfg.lsp.package + else ''{"${cfg.lsp.package}/bin/jdt-language-server", "-data", vim.fn.stdpath("cache").."/jdtls/workspace"}'' + }, } ''; }) From 13c3026362688b473fbf89b9d732730d23e1ae07 Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Tue, 19 Sep 2023 00:40:09 +0200 Subject: [PATCH 06/14] feat: make typescript lsp install optional --- modules/languages/ts.nix | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/modules/languages/ts.nix b/modules/languages/ts.nix index 2d651ed..8902f66 100644 --- a/modules/languages/ts.nix +++ b/modules/languages/ts.nix @@ -16,7 +16,11 @@ with builtins; let lspconfig.tsserver.setup { capabilities = capabilities; on_attach = attach_keymaps, - cmd = { "${cfg.lsp.package}/bin/typescript-language-server", "--stdio" } + cmd = ${ + if isList cfg.lsp.package + then nvim.lua.expToLua cfg.lsp.package + else ''{"${cfg.lsp.package}/bin/typescript-language-server", "--stdio"}'' + } } ''; }; @@ -27,7 +31,11 @@ with builtins; let lspconfig.denols.setup { capabilities = capabilities; on_attach = attach_keymaps, - cmd = { "${cfg.lsp.package}/bin/deno", "lsp" } + cmd = ${ + if isList cfg.lsp.package + then nvim.lua.expToLua cfg.lsp.package + else ''{"${cfg.lsp.package}/bin/deno", "lsp"}'' + } } ''; }; @@ -96,7 +104,7 @@ in { package = mkOption { description = "Typescript/Javascript LSP server package"; - type = types.package; + type = with types; either package (listOf str); default = servers.${cfg.lsp.server}.package; }; }; From 54f52bec2ba6d4991421325cee94c18d0b0e0f14 Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Tue, 19 Sep 2023 00:50:49 +0200 Subject: [PATCH 07/14] feat: make python lsp install optional --- modules/languages/python.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/languages/python.nix b/modules/languages/python.nix index daea5b8..8c85c27 100644 --- a/modules/languages/python.nix +++ b/modules/languages/python.nix @@ -16,7 +16,11 @@ with builtins; let lspconfig.pyright.setup{ capabilities = capabilities; on_attach = default_on_attach; - cmd = {"${cfg.lsp.package}/bin/pyright-langserver", "--stdio"} + cmd = ${ + if isList cfg.lsp.package + then nvim.lua.expToLua cfg.lsp.package + else ''{"${cfg.lsp.package}/bin/pyright-langserver", "--stdio"}'' + } } ''; }; @@ -123,7 +127,7 @@ in { package = mkOption { description = "python LSP server package"; - type = types.package; + type = with types; either package (listOf string); default = servers.${cfg.lsp.server}.package; }; }; From 35e86d1f12058b617adc1f0c04dd18480c74cdb9 Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Tue, 19 Sep 2023 01:26:29 +0200 Subject: [PATCH 08/14] feat: make sql lsp install optional --- modules/languages/sql.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/languages/sql.nix b/modules/languages/sql.nix index 4093ec9..0f1a4e9 100644 --- a/modules/languages/sql.nix +++ b/modules/languages/sql.nix @@ -20,7 +20,11 @@ with builtins; let on_attach_keymaps(client, bufnr) require'sqls'.setup{} end, - cmd = { "${cfg.lsp.package}/bin/sqls", "-config", string.format("%s/config.yml", vim.fn.getcwd()) } + cmd = ${ + if isList cfg.lsp.package + then nvim.lua.expToLua cfg.lsp.package + else ''{ "${cfg.lsp.package}/bin/sqls", "-config", string.format("%s/config.yml", vim.fn.getcwd()) }'' + } } ''; }; @@ -88,7 +92,7 @@ in { package = mkOption { description = "SQL LSP server package"; - type = types.package; + type = with types; either package (listOf str); default = servers.${cfg.lsp.server}.package; }; }; From ed09cb7ed65feddbd0eb848ea49b26f75b139ca4 Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Tue, 19 Sep 2023 01:26:41 +0200 Subject: [PATCH 09/14] feat: make dart lsp install optional --- modules/languages/dart/config.nix | 6 +++++- modules/languages/dart/dart.nix | 8 ++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/modules/languages/dart/config.nix b/modules/languages/dart/config.nix index c4761cd..991a384 100644 --- a/modules/languages/dart/config.nix +++ b/modules/languages/dart/config.nix @@ -15,7 +15,11 @@ with builtins; let lspconfig.dartls.setup{ capabilities = capabilities; on_attach=default_on_attach; - cmd = {"${pkgs.dart}/bin/dart", "language-server", "--protocol=lsp"}; + cmd = ${ + if isList cfg.lsp.package + then nvim.lua.expToLua cfg.lsp.package + else ''{"${cfg.lsp.package}/bin/dart", "language-server", "--protocol=lsp"}'' + }; ${optionalString (cfg.lsp.opts != null) "init_options = ${cfg.lsp.dartOpts}"} } ''; diff --git a/modules/languages/dart/dart.nix b/modules/languages/dart/dart.nix index b985224..adee61f 100644 --- a/modules/languages/dart/dart.nix +++ b/modules/languages/dart/dart.nix @@ -15,7 +15,11 @@ with builtins; let lspconfig.dartls.setup{ capabilities = capabilities; on_attach=default_on_attach; - cmd = {"${pkgs.dart}/bin/dart", "language-server", "--protocol=lsp"}; + cmd = ${ + if isList cfg.lsp.package + then nvim.lua.expToLua cfg.lsp.package + else ''{"${cfg.lsp.package}/bin/dart", "language-server", "--protocol=lsp"}'' + }; ${optionalString (cfg.lsp.opts != null) "init_options = ${cfg.lsp.dartOpts}"} } ''; @@ -39,7 +43,7 @@ in { }; package = mkOption { description = "Dart LSP server package"; - type = types.package; + type = with types; either package (listOf str); default = servers.${cfg.lsp.server}.package; }; opts = mkOption { From 232d93024c933a65999c38feebbcef9030c2d873 Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Tue, 19 Sep 2023 01:30:45 +0200 Subject: [PATCH 10/14] feat: make clang lsp install optional --- modules/languages/clang.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/languages/clang.nix b/modules/languages/clang.nix index 7d201e4..3235c45 100644 --- a/modules/languages/clang.nix +++ b/modules/languages/clang.nix @@ -9,6 +9,10 @@ with builtins; let cfg = config.vim.languages.clang; defaultServer = "ccls"; + packageToCmd = package: defaultCmd: + if isList cfg.lsp.package + then nvim.lua.expToLua cfg.lsp.package + else ''{ "${cfg.lsp.package}/bin/${defaultCmd}" }''; servers = { ccls = { package = pkgs.ccls; @@ -16,7 +20,7 @@ with builtins; let lspconfig.ccls.setup{ capabilities = capabilities; on_attach=default_on_attach; - cmd = {"${cfg.lsp.package}/bin/ccls"}; + cmd = ${packageToCmd cfg.lsp.package "ccls"}; ${optionalString (cfg.lsp.opts != null) "init_options = ${cfg.lsp.opts}"} } ''; @@ -30,7 +34,7 @@ with builtins; let lspconfig.clangd.setup{ capabilities = clangd_cap; on_attach=default_on_attach; - cmd = {"${cfg.lsp.package}/bin/clangd"}; + cmd = ${packageToCmd cfg.lsp.package "clangd"}; ${optionalString (cfg.lsp.opts != null) "init_options = ${cfg.lsp.opts}"} } ''; @@ -95,7 +99,7 @@ in { package = mkOption { description = "clang LSP server package"; - type = types.package; + type = with types; either package (listOf str); default = servers.${cfg.lsp.server}.package; }; From 0e66f6282bd7579504a0ce8eb18c6bcc4af44c23 Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Tue, 19 Sep 2023 01:40:56 +0200 Subject: [PATCH 11/14] feat: make svelte lsp install optional --- modules/languages/svelte.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/languages/svelte.nix b/modules/languages/svelte.nix index a300f05..33c0bf3 100644 --- a/modules/languages/svelte.nix +++ b/modules/languages/svelte.nix @@ -16,7 +16,11 @@ with builtins; let lspconfig.svelte.setup { capabilities = capabilities; on_attach = attach_keymaps, - cmd = { "${cfg.lsp.package}/bin/svelteserver", "--stdio" } + cmd = ${ + if isList cfg.lsp.package + then nvim.lua.expToLua cfg.lsp.package + else ''{"${cfg.lsp.package}/bin/svelteserver", "--stdio"}'' + } } ''; }; @@ -74,7 +78,7 @@ in { package = mkOption { description = "Svelte LSP server package"; - type = types.package; + type = with types; either package (listOf str); default = servers.${cfg.lsp.server}.package; }; }; From 0843e95efa886086adaeae46506e02cfc56a2ced Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Sat, 23 Sep 2023 00:28:39 +0200 Subject: [PATCH 12/14] doc: update description of all lsp.package --- modules/languages/clang.nix | 3 ++- modules/languages/dart/dart.nix | 3 ++- modules/languages/go.nix | 3 ++- modules/languages/java.nix | 3 ++- modules/languages/nix.nix | 3 ++- modules/languages/python.nix | 3 ++- modules/languages/rust.nix | 3 ++- modules/languages/sql.nix | 3 ++- modules/languages/svelte.nix | 3 ++- modules/languages/ts.nix | 3 ++- modules/languages/zig.nix | 3 ++- 11 files changed, 22 insertions(+), 11 deletions(-) diff --git a/modules/languages/clang.nix b/modules/languages/clang.nix index 3235c45..d8a7cc0 100644 --- a/modules/languages/clang.nix +++ b/modules/languages/clang.nix @@ -98,7 +98,8 @@ in { }; package = mkOption { - description = "clang LSP server package"; + description = "clang LSP server package, or the command to run as a list of strings"; + example = ''[lib.getExe pkgs.jdt-language-server " - data " " ~/.cache/jdtls/workspace "]''; type = with types; either package (listOf str); default = servers.${cfg.lsp.server}.package; }; diff --git a/modules/languages/dart/dart.nix b/modules/languages/dart/dart.nix index adee61f..07623cf 100644 --- a/modules/languages/dart/dart.nix +++ b/modules/languages/dart/dart.nix @@ -42,7 +42,8 @@ in { default = defaultServer; }; package = mkOption { - description = "Dart LSP server package"; + description = "Dart LSP server package, or the command to run as a list of strings"; + example = ''[lib.getExe pkgs.jdt-language-server "-data" "~/.cache/jdtls/workspace"]''; type = with types; either package (listOf str); default = servers.${cfg.lsp.server}.package; }; diff --git a/modules/languages/go.nix b/modules/languages/go.nix index 1bde15b..0c69fe5 100644 --- a/modules/languages/go.nix +++ b/modules/languages/go.nix @@ -85,7 +85,8 @@ in { }; package = mkOption { - description = "Go LSP server package"; + description = "Go LSP server package, or the command to run as a list of strings"; + example = ''[lib.getExe pkgs.jdt-language-server " - data " " ~/.cache/jdtls/workspace "]''; type = with types; either package (listOf str); default = servers.${cfg.lsp.server}.package; }; diff --git a/modules/languages/java.nix b/modules/languages/java.nix index f090611..9bea591 100644 --- a/modules/languages/java.nix +++ b/modules/languages/java.nix @@ -20,7 +20,8 @@ in { enable = mkEnableOption "Java LSP support (java-language-server)" // {default = config.vim.languages.enableLSP;}; package = mkOption { - description = "java language server"; + description = "java language server package, or the command to run as a list of strings"; + example = ''[lib.getExe pkgs.jdt-language-server "-data" "~/.cache/jdtls/workspace"]''; type = with types; either package (listOf str); default = pkgs.jdt-language-server; }; diff --git a/modules/languages/nix.nix b/modules/languages/nix.nix index 81f96c5..29f0025 100644 --- a/modules/languages/nix.nix +++ b/modules/languages/nix.nix @@ -134,7 +134,8 @@ in { default = defaultServer; }; package = mkOption { - description = "Nix LSP server package"; + description = "Nix LSP server package, or the command to run as a list of strings"; + example = ''[lib.getExe pkgs.jdt-language-server "-data" "~/.cache/jdtls/workspace"]''; type = with types; either package (listOf str); default = servers.${cfg.lsp.server}.package; }; diff --git a/modules/languages/python.nix b/modules/languages/python.nix index 8c85c27..6739471 100644 --- a/modules/languages/python.nix +++ b/modules/languages/python.nix @@ -126,7 +126,8 @@ in { }; package = mkOption { - description = "python LSP server package"; + description = "python LSP server package, or the command to run as a list of strings"; + example = ''[lib.getExe pkgs.jdt-language-server "-data" "~/.cache/jdtls/workspace"]''; type = with types; either package (listOf string); default = servers.${cfg.lsp.server}.package; }; diff --git a/modules/languages/rust.nix b/modules/languages/rust.nix index b3ad758..95f03a5 100644 --- a/modules/languages/rust.nix +++ b/modules/languages/rust.nix @@ -29,7 +29,8 @@ in { enable = mkEnableOption "Rust LSP support (rust-analyzer with extra tools)" // {default = config.vim.languages.enableLSP;}; package = mkOption { - description = "rust-analyzer package"; + description = "rust-analyzer package, or the command to run as a list of strings"; + example = ''[lib.getExe pkgs.jdt-language-server "-data" "~/.cache/jdtls/workspace"]''; type = with types; either package (listOf str); default = pkgs.rust-analyzer; }; diff --git a/modules/languages/sql.nix b/modules/languages/sql.nix index 0f1a4e9..20b6896 100644 --- a/modules/languages/sql.nix +++ b/modules/languages/sql.nix @@ -91,7 +91,8 @@ in { }; package = mkOption { - description = "SQL LSP server package"; + description = "SQL LSP server package, or the command to run as a list of strings"; + example = ''[lib.getExe pkgs.jdt-language-server "-data" "~/.cache/jdtls/workspace"]''; type = with types; either package (listOf str); default = servers.${cfg.lsp.server}.package; }; diff --git a/modules/languages/svelte.nix b/modules/languages/svelte.nix index 33c0bf3..dee4618 100644 --- a/modules/languages/svelte.nix +++ b/modules/languages/svelte.nix @@ -77,7 +77,8 @@ in { }; package = mkOption { - description = "Svelte LSP server package"; + description = "Svelte LSP server package, or the command to run as a list of strings"; + example = ''[lib.getExe pkgs.jdt-language-server "-data" "~/.cache/jdtls/workspace"]''; type = with types; either package (listOf str); default = servers.${cfg.lsp.server}.package; }; diff --git a/modules/languages/ts.nix b/modules/languages/ts.nix index 8902f66..0637873 100644 --- a/modules/languages/ts.nix +++ b/modules/languages/ts.nix @@ -103,7 +103,8 @@ in { }; package = mkOption { - description = "Typescript/Javascript LSP server package"; + description = "Typescript/Javascript LSP server package, or the command to run as a list of strings"; + example = ''[lib.getExe pkgs.jdt-language-server "-data" "~/.cache/jdtls/workspace"]''; type = with types; either package (listOf str); default = servers.${cfg.lsp.server}.package; }; diff --git a/modules/languages/zig.nix b/modules/languages/zig.nix index 2f3bcec..0fe4c38 100644 --- a/modules/languages/zig.nix +++ b/modules/languages/zig.nix @@ -20,7 +20,8 @@ in { enable = mkEnableOption "Zig LSP support (zls)" // {default = config.vim.languages.enableLSP;}; package = mkOption { - description = "ZLS package"; + description = "ZLS package, or the command to run as a list of strings"; + example = ''[lib.getExe pkgs.jdt-language-server "-data" "~/.cache/jdtls/workspace"]''; type = with types; either package (listOf str); default = pkgs.zls; }; From 7d8cc1ec20d52f16c4ba1aaccd19cab3f3765794 Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Sat, 23 Sep 2023 00:33:05 +0200 Subject: [PATCH 13/14] doc: update release notes --- docs/release-notes/rl-0.5.adoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/release-notes/rl-0.5.adoc b/docs/release-notes/rl-0.5.adoc index 78c18f5..10beb6a 100644 --- a/docs/release-notes/rl-0.5.adoc +++ b/docs/release-notes/rl-0.5.adoc @@ -14,6 +14,8 @@ https://github.com/horriblename[horriblename]: * Streamlined and simplified extra plugin API with the addition of <> +* Allow using command names in place of LSP packages to avoid automatic installation. + https://github.com/amanse[amanse]: * Added daily notes options for obsidian plugin. From cd778b6ddc43d8f6e01ede2514b14003bb256edb Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Sat, 23 Sep 2023 02:42:26 +0200 Subject: [PATCH 14/14] doc: add custom LSP command doc to manual --- docs/manual/languages.adoc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/manual/languages.adoc b/docs/manual/languages.adoc index edc70e7..e6c9cbe 100644 --- a/docs/manual/languages.adoc +++ b/docs/manual/languages.adoc @@ -18,3 +18,18 @@ Language specific support means there is a combination of language specific plug Adding support for more languages, and improving support for existing ones are great places where you can contribute with a PR. +=== LSP Custom Packages/Command + +In any of the `opt.languages..lsp.package` options you can provide your own LSP package, or provide the command to launch the language server, as a list of strings. + +You can use this to skip automatic installation of a language server, and instead use the one found in your `$PATH` during runtime, for example: + +[source,nix] +---- +vim.languages.java = { + lsp = { + enable = true; + package = ["jdt-language-server" "-data" "~/.cache/jdtls/workspace"]; + }; +} +----