Skip to content

fix: call lsp.start after loading buffer #508

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 8, 2025

Conversation

powerman
Copy link
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