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 completion of markdown links with LSP titles #533

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vandalt
Copy link

@vandalt vandalt commented Mar 30, 2025

Fixes #435 and zk-org/zk-nvim#176.

After looking at the code and testing earlier versions, it seems that the issue was introduced in #397, which fixed the issue of triggering completion manually, but also introduced offsets that account for words instead of just using a -2 offset. The -2 offset worked for both [[ and ((, but the checks in #397 only accounted for [[ which broke completion for ((.

This PR just adds an extra condition to also catch ((. Some notes:

  • I don't really know go, so comments welcome
  • It seems that trigger (non-auto) completion with [[| was fixed by fix(lsp): fix trigger completion of zk LSP #397, but that [[somewords| still does not work. And it still does not work with these small updates (but ((| works just like [[)
  • I'm marking this as a draft for now because I want to double check the TODO comments I added (basically (( is included in the word regex, but [[ is not, so I need to account for that

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.

Titles inside markdown links breaks LSP link completion
1 participant