Skip to content
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

fix multi project setup get_lsp_clients #31

Merged
merged 1 commit into from
Jan 23, 2022
Merged

Conversation

jan-xyz
Copy link
Contributor

@jan-xyz jan-xyz commented Jan 22, 2022

The previous code actually ran into a problem, the client IDs are not continuous so, when you open a second project I ran into exactly this problem: neovim/neovim#14618

The problem is that the IDs are numbered from 1 counting up for every new client, so a new project starts with at least ID 2. That means that ipairs skips the entire table and returns 0. pairs doesn't validate indices and just iterates over the table (see here).

without the fix:

Screen.Recording.2022-01-23.at.13.38.10.mov

with the fix:

Screen.Recording.2022-01-23.at.13.44.07.mov

@jan-xyz jan-xyz changed the title fix multi workspace setup fix multi workspace setup get_lsp_clients Jan 22, 2022
@jan-xyz jan-xyz changed the title fix multi workspace setup get_lsp_clients fix multi project setup get_lsp_clients Jan 23, 2022
@ojroques ojroques merged commit da71801 into ojroques:main Jan 23, 2022
@ojroques
Copy link
Owner

thanks :)

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.

None yet

2 participants