Skip to content

fix(picker.lspconfig): take into account when cmd is a function - #2933

Open
dpetka2001 wants to merge 1 commit into
folke:mainfrom
dpetka2001:fix/lspconfig_cmd_function
Open

fix(picker.lspconfig): take into account when cmd is a function#2933
dpetka2001 wants to merge 1 commit into
folke:mainfrom
dpetka2001:fix/lspconfig_cmd_function

Conversation

@dpetka2001

Copy link
Copy Markdown
Contributor

Description

Takes into account when cmd is a function. Not sure about the approach of using Neovim private fields, but couldn't find another solution. The alternative would be to add a guard in M.preview() when type(cmd) == "function" and show message that the installed binary could not be determined instead of showing not installed.

I also opted to only do this for items that have item.enabled, otherwise the pcall would execute for all available items and in some cases I would get Could not connect to 127.0.0.1:6005, reason: "ECONNREFUSED", which I assume is because the pcall is executed for LSP servers that are not available on the system.

Related Issue(s)

Fixes #2932

Screenshots

@github-actions github-actions Bot added size/m Medium PR (<50 lines changed) picker labels Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

picker size/m Medium PR (<50 lines changed)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: lsp_config picker reports "not installed" for servers with function-based cmd (e.g. jsonls, yamlls)

1 participant