Skip to content

Commit c16c328

Browse files
authored
Use vim.lsp.start_client instead of vim.lsp.start (#91)
Starting from neovim 0.10, vim.lsp.start will return nil if there's no buf specified for attachment. As llm.nvim will handle the buf attachment by itself, it's okay to use `start_client` instead of `start` Reference: - Neovim 0.9 implementation return client_id regardless of attachment: https://github.com/neovim/neovim/blob/release-0.9/runtime/lua/vim/lsp.lua#L889 - Neovim 0.10 starts to return nil, which caused llm.nvim to fail: https://github.com/neovim/neovim/blob/89dc8f8f4e754e70cbe1624f030fb61bded41bc2/runtime/lua/vim/lsp.lua#L274 Testing: Checked neovim 0.10 / 0.9.5 shows proper suggestion with the fix
1 parent 3234641 commit c16c328

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/llm/language_server.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ function M.setup()
202202
cmd = { llm_ls_path }
203203
end
204204

205-
local client_id = lsp.start({
205+
local client_id = lsp.start_client({
206206
name = "llm-ls",
207207
cmd = cmd,
208208
root_dir = vim.fs.dirname(vim.fs.find({ ".git" }, { upward = true })[1]),

0 commit comments

Comments
 (0)