diff options
| author | jrop <jrapodaca@gmail.com> | 2025-04-26 06:14:59 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-26 05:14:59 -0700 |
| commit | 8bb2facd6fa664fe200d2d491f9f7734202426fd (patch) | |
| tree | 2c381e17cebf08f0fe593f4ac2c7b77afe4a3bbc /lua | |
| parent | docs: update configs.md (diff) | |
| download | nvim-lspconfig-8bb2facd6fa664fe200d2d491f9f7734202426fd.tar nvim-lspconfig-8bb2facd6fa664fe200d2d491f9f7734202426fd.tar.gz nvim-lspconfig-8bb2facd6fa664fe200d2d491f9f7734202426fd.tar.bz2 nvim-lspconfig-8bb2facd6fa664fe200d2d491f9f7734202426fd.tar.lz nvim-lspconfig-8bb2facd6fa664fe200d2d491f9f7734202426fd.tar.xz nvim-lspconfig-8bb2facd6fa664fe200d2d491f9f7734202426fd.tar.zst nvim-lspconfig-8bb2facd6fa664fe200d2d491f9f7734202426fd.zip | |
fix(configs): remove sanitize_cmd #3778
Problem:
exepath is slow on WSL/Windows.
Solution:
Remove sanitize_cmd: absolute paths are nice, but not necessary.
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/lspconfig/configs.lua | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/lua/lspconfig/configs.lua b/lua/lspconfig/configs.lua index b32b8001..3b9967c1 100644 --- a/lua/lspconfig/configs.lua +++ b/lua/lspconfig/configs.lua @@ -24,17 +24,6 @@ local configs = {} --- @field root_dir? string|fun(filename: string, bufnr: number) --- @field commands? table<string, lspconfig.Config.command> ---- @param cmd any -local function sanitize_cmd(cmd) - if cmd and type(cmd) == 'table' and not vim.tbl_isempty(cmd) then - local original = cmd[1] - cmd[1] = vim.fn.exepath(cmd[1]) - if #cmd[1] == 0 then - cmd[1] = original - end - end -end - ---@param t table ---@param config_name string ---@param config_def table Config definition read from `lspconfig.configs.<name>`. @@ -64,8 +53,6 @@ function configs.__newindex(t, config_name, config_def) local config = tbl_deep_extend('keep', user_config, default_config) - sanitize_cmd(config.cmd) - if util.on_setup then pcall(util.on_setup, config, user_config) end |
