diff options
| author | Gabriel Ebner <gebner@gebner.org> | 2022-01-04 16:31:21 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-04 07:31:21 -0800 |
| commit | 1a2415ef115f100b018fc02285070aa640d503b2 (patch) | |
| tree | 898dd60a53a8f0c253d637285d88b8d65f486d18 /lua/lspconfig/server_configurations/leanls.lua | |
| parent | docs: update server_configurations.md (diff) | |
| download | nvim-lspconfig-1a2415ef115f100b018fc02285070aa640d503b2.tar nvim-lspconfig-1a2415ef115f100b018fc02285070aa640d503b2.tar.gz nvim-lspconfig-1a2415ef115f100b018fc02285070aa640d503b2.tar.bz2 nvim-lspconfig-1a2415ef115f100b018fc02285070aa640d503b2.tar.lz nvim-lspconfig-1a2415ef115f100b018fc02285070aa640d503b2.tar.xz nvim-lspconfig-1a2415ef115f100b018fc02285070aa640d503b2.tar.zst nvim-lspconfig-1a2415ef115f100b018fc02285070aa640d503b2.zip | |
feat(leanls): add root dir as command-line arg (#1634)
The argument is ignored by the server, but it is useful because it is
shown by `htop`, `ps ax`, etc., so you can figure out which Lean servers
are running.
The lean3ls doesn't require a corresponding change: we use the
`lean-language-server` wrapper, which appends the root directory itself
to the wrapped `lean --server` command.
Diffstat (limited to 'lua/lspconfig/server_configurations/leanls.lua')
| -rw-r--r-- | lua/lspconfig/server_configurations/leanls.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lua/lspconfig/server_configurations/leanls.lua b/lua/lspconfig/server_configurations/leanls.lua index efefa913..52d55545 100644 --- a/lua/lspconfig/server_configurations/leanls.lua +++ b/lua/lspconfig/server_configurations/leanls.lua @@ -19,6 +19,10 @@ return { or stdlib_dir or util.find_git_ancestor(fname) end, + on_new_config = function(config, root_dir) + -- add root dir as command-line argument for `ps aux` + table.insert(config.cmd, root_dir) + end, single_file_support = true, }, docs = { |
