diff options
| author | William Boman <william@redwill.se> | 2022-05-12 17:21:02 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-12 08:21:02 -0700 |
| commit | 9ff2a06cebd4c8c3af5259d713959ab310125bec (patch) | |
| tree | 4c7b2a496c60fc3d8812e6af921d464b05fe6e6b /lua | |
| parent | docs: update server_configurations.md (diff) | |
| download | nvim-lspconfig-9ff2a06cebd4c8c3af5259d713959ab310125bec.tar nvim-lspconfig-9ff2a06cebd4c8c3af5259d713959ab310125bec.tar.gz nvim-lspconfig-9ff2a06cebd4c8c3af5259d713959ab310125bec.tar.bz2 nvim-lspconfig-9ff2a06cebd4c8c3af5259d713959ab310125bec.tar.lz nvim-lspconfig-9ff2a06cebd4c8c3af5259d713959ab310125bec.tar.xz nvim-lspconfig-9ff2a06cebd4c8c3af5259d713959ab310125bec.tar.zst nvim-lspconfig-9ff2a06cebd4c8c3af5259d713959ab310125bec.zip | |
fix(jsonnet_ls): merge cmd_env instead of ovdrriding it entirely #1559
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/lspconfig/server_configurations/jsonnet_ls.lua | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lua/lspconfig/server_configurations/jsonnet_ls.lua b/lua/lspconfig/server_configurations/jsonnet_ls.lua index 3493e7eb..64e86cbd 100644 --- a/lua/lspconfig/server_configurations/jsonnet_ls.lua +++ b/lua/lspconfig/server_configurations/jsonnet_ls.lua @@ -17,9 +17,12 @@ return { return util.root_pattern 'jsonnetfile.json'(fname) or util.find_git_ancestor(fname) end, on_new_config = function(new_config, root_dir) - new_config.cmd_env = { - JSONNET_PATH = jsonnet_path(root_dir), - } + if not new_config.cmd_env then + new_config.cmd_env = {} + end + if not new_config.cmd_env.JSONNET_PATH then + new_config.cmd_env.JSONNET_PATH = jsonnet_path(root_dir) + end end, }, docs = { |
