Skip to content

fix: call lsp.start after loading buffer#508

Merged
AntoineGS merged 1 commit intozbirenbaum:masterfrom
powerman:fix-buf-not-loaded-on-signin
Jul 8, 2025
Merged

fix: call lsp.start after loading buffer#508
AntoineGS merged 1 commit intozbirenbaum:masterfrom
powerman:fix-buf-not-loaded-on-signin

Conversation

@powerman
Copy link
Copy Markdown
Contributor

@powerman powerman commented Jul 4, 2025

Without lazy loading copilot.setup() is called before buffer 1 is actually loaded.

Then happens this call chain: copilot.setup - auth.signin - use_client - lsp.start - lsp.buf_attach_client, and the last one checks for loaded buffer using api.nvim_buf_is_loaded(bufnr), fails and fail lsp.start which returns nothing as result and this sends error starting LSP client: nil notification to a user.

Fixes #507

@AntoineGS AntoineGS merged commit f26345d into zbirenbaum:master Jul 8, 2025
@powerman powerman deleted the fix-buf-not-loaded-on-signin branch July 8, 2025 17:33
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.

Without lazy loading always get error on start: error starting LSP client: nil

2 participants