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: add coq_nvim completion integration #1597

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

Conversation

TheLeoP
Copy link
Contributor

@TheLeoP TheLeoP commented Oct 20, 2024

Fixes #1594

Copy link
Contributor

@benlubas benlubas left a comment

Choose a reason for hiding this comment

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

I have no way to easily test this. I trust that the heart reaction means that it worked.

Just a few lines to remove and then I will merge

-- the following fields. Not all of them are used by Neorg, but
-- they are left here for future reference
local context = {
start_offset = nil,
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the point of setting a key to nil here? In lua this is the same as not including the key at all

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I left them there for future reference.

As far as i can tell, there is no formal definition/interface for what the completion context should have. When i originally added support for coq, I missed a lot of fields (and the type inference of lua-ls didn't help (because of how the modules are structured, I think. I didn't look into it).

For this PR i had to look into both nvim-cmp and nvim-compe source code to know what fields a context is supposed to have and what the value of each one is supposed to be. Not all of the context's fields were currently being used by neorg, but since the current implementation seems tightly coupled with what nvim-compe consideres a context I thought leaving them here will help with future changes (removing the need to check nvim-compe and nvim-cmp codebases)

@LoCrealloc
Copy link

the heart reaction meant something like "great that someone is putting effort into this", i did not test this pull request (yet)

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.

Errors when using coq_nvim for autocompletion
3 participants