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(lsp): fix trigger completion of zk LSP #397

Merged
merged 1 commit into from
Mar 31, 2024

Conversation

Rahlir
Copy link
Contributor

@Rahlir Rahlir commented Mar 30, 2024

This commit introduces trigger completion: until now zk LSP generated completion only on auto trigger. In particular this fixes zk-org/zk-nvim#155

The completion bugs came from three sources: there was a wrong implementation of tag completion which forgot to ignore the '#' character, the completion function never made a call for trigger completion, and offset for textEdit on link completion was hardcoded to -2 which is wrong if there is an additional text entered before a trigger is pressed. This commit fixes these three bugs.

This commit introduces trigger completion: until now zk LSP generated
completion only on auto trigger.
@jurica
Copy link
Member

jurica commented Mar 30, 2024

Nice, thanks for the PR. On first sight it looks good, but I'll take a closer look in the next days and also want to test it.

@jurica jurica self-requested a review March 31, 2024 09:49
Copy link
Member

@jurica jurica left a comment

Choose a reason for hiding this comment

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

LGTM and works as expected!

@jurica jurica merged commit 05c50a7 into zk-org:main Mar 31, 2024
3 checks passed
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.

completion only works with autocomplete, not via manual trigger (nvim-cmp)
2 participants