Skip to content

feat(config): accept to run llm-ls in PATH#116

Merged
McPatate merged 3 commits intohuggingface:mainfrom
teto:teto/look-for-llm-ls-in-PATH
Jan 9, 2025
Merged

feat(config): accept to run llm-ls in PATH#116
McPatate merged 3 commits intohuggingface:mainfrom
teto:teto/look-for-llm-ls-in-PATH

Conversation

@teto
Copy link
Copy Markdown
Contributor

@teto teto commented Jan 3, 2025

It's uncommon to completely ignore PATH. I have llm-ls installed via my package manager, and the downloaded one wouldn't work anyway. If bin_path is not set, llm.nvim will try to start llm-ls from PATH, else fallback to config.lsp.bin_path. Note that we dont check The 'version' of llm-ls so it's possible for the plugin to run a version that doesn't match the one configured (for instance if you've added it after the first run of llm.nvim). A version check could/should be added later.

It's uncommon to completely ignore PATH. I have llm-ls installed via my package manager, and the downloaded one wouldn't work anyway. If bin_path is not set, llm.nvim will try to start llm-ls from PATH, else fallback to config.lsp.bin_path. Note that we dont check The 'version' of llm-ls so it's possible for the plugin to run a version that doesn't match the one configured (for instance if you've added it after the first run of llm.nvim). A version check could/should be added later.
@teto teto mentioned this pull request Jan 3, 2025
Copy link
Copy Markdown
Member

@McPatate McPatate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than the small nit, lgtm!

return
end

local cmd
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd leave this here and put cmd = { bin_path } in an else clause after line 200, for reading consistency.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ty for review. I've pushed a fixup tested locally. If it's good I can squash or you can do it from github UI.

Comment thread lua/llm/language_server.lua Outdated
Copy link
Copy Markdown
Member

@McPatate McPatate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again for the contribution!

@McPatate McPatate merged commit ce69731 into huggingface:main Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants