nvim-spider
nvim-spider copied to clipboard
feat: integration with precognition.nvim
What problem does this PR solve?
This PR integrates spider.nvim with precognition.nvim, see #57
How does the PR solve it?
Exposes a Precognition Adapter based on spider’s motions.
Checklist
- [x] Used only
camelCasevariable names. - [x] If functionality is added or modified, also made respective changes to the
README.md(the.txtfile is auto-generated and does not need to be modified).
- The failing type check is expected due to using precognition's typing. You can just add an lua-ls ignore comment for that.
- Just a nit, but the folder should be named with a
-and not a_. People rarely_in lua requires, making it easy to overlook an underscore here.
What do you think about registering the adapter by default rather than returning the adapter (as described in https://github.com/chrisgrieser/nvim-spider/issues/57)? @tandetat
What do you think about registering the adapter by default rather than returning the adapter (as described in #57)? @tandetat
That might be a better approach than what I’m currently doing, which is registering the adapter inside precognition’s setup(). I changed it to what you suggested but I think this doesn’t work with what Tristan asked in this comment https://github.com/tris203/precognition.nvim/pull/105#issuecomment-2773650010
@chrisgrieser sorry but I’m having problems with listing the title for the integration section in the README. Do you know why the linting is failing?
Error: README.md:24:4 MD051/link-fragments Link fragments should be valid [Context: "Precognition.nvim Integration"] https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md051.md
I think you need to escape the . in #precognition.nvim-integration. As far as I remember, url-encoding applies? (I simply use markdown-toc to auto-generate the table of contents, so I don't remember the details)
Also, if that's the only issue left, you can also go ahead and set the PR for ready for review, no need to hold up the PR for something so minor, I can fix it myself after merging then.
Error: README.md:24:4 MD051/link-fragments Link fragments should be valid [Context: "Precognition.nvim Integration"] https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md051.md
I think you need to escape the
.in#precognition.nvim-integration. As far as I remember, url-encoding applies? (I simply usemarkdown-tocto auto-generate the table of contents, so I don't remember the details)Also, if that's the only issue left, you can also go ahead and set the PR for ready for review, no need to hold up the PR for something so minor, I can fix it myself after merging then.
Sounds good! I still have to change some things so when I get an ok on both PRs I’ll set them ready for review.
I think I fixed all of the issues you pointed out! I used markdown-toc to regenerate the toc for the README, let's see if that fixes the issue with the markdown linting
looks good now, there are still some issues with the readme (markdownlint, also your markdown-toc using different indentation), but I can fix that myself if that's quicker.
However, GitHub blocks merging on my end due to conflicts. I then tried checking out your feature branch, but it seems the commit history is a bit of a mess, apparently you merged from main multiple times instead of rebasing onto your feature branch? Thus, even merging manually on the command line isn't really straightforward.
Not totally sure how to fix this. I think it's probably easier if you just created a new PR onto the up-to-date main branch and manually copy over your changes there…
About the merge conflicts, that's super weird because on my end github says the branch has no conflicts with base.
Okay I tried rebasing and resolving the conflicts, let me know if github still blocks the merge
Yeah works now. Thanks for the PR!