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

Integration with Vimtex #258

Closed
krillin666 opened this issue Sep 11, 2021 · 15 comments
Closed

Integration with Vimtex #258

krillin666 opened this issue Sep 11, 2021 · 15 comments

Comments

@krillin666
Copy link

First of all, thanks for the work done on this beautiful project.

I rely heavily on Vimtex for my academic writing and used it along Deoplete.
Vimtex supports a lot of autocomplete plugins and has documentation for those, but coq is missing.

Do you know of a way of integrating the autocompletion of Vimtex into coq ?

Thank you !

@dnaaun
Copy link
Contributor

dnaaun commented Sep 12, 2021

Hey @krillin666 , I'm a vimtex user too. For completion, it provides an omnifunc, which coq doesn't support as a source. What I did was that I installed texlab, a latex LSP, which gave me autocompletion. It actually supports continous compiling and synctex as well, but I've been too lazy to fully convert over, and I just use texlab for completion, and vimtex for continous compiling.

Let me know if you have any questions.

@ms-jpq
Copy link
Owner

ms-jpq commented Sep 12, 2021

yeah im thinking about how to integrate third party completion sources,

the issue is that as soon as you start support a single third party client, your code base starts to ossify, since you will be necessarily be exposing some of the internals to third parties.

in order to limit the ossification, you have to build solid abstractions first, and while I think coq.nvim has pretty good internals, i will still need to put much more design work into this.

what i absolutely do not want is to get into a situation where everything is so ossified that a clean break has to occur for any more potential improvements .

@ms-jpq
Copy link
Owner

ms-jpq commented Sep 12, 2021

so the status on this is, its gonna come eventually, but i make zero promises on when

@dnaaun
Copy link
Contributor

dnaaun commented Sep 12, 2021

@krillin666 , it looks like your best bet is to install texlab like I suggested.

@ms-jpq
Copy link
Owner

ms-jpq commented Sep 12, 2021

i have some ideas of how i would implement the shim layer though :) i slept on it and it will come after next week i think (im busy entire week next week)

@ms-jpq
Copy link
Owner

ms-jpq commented Sep 12, 2021

basically the shim layer will re-use the LSP parser, that way no internals are exposed

@ms-jpq
Copy link
Owner

ms-jpq commented Sep 12, 2021

and all the sources get stuff like caching, etc for free

@krillin666
Copy link
Author

@davidatbu Thank you for the temporary workaround !
@ms-jpq Thank you for your answer and the for considering adding support for Vimtex (or Omnifunctions). I really do want to use nvim-coq so I'll wait till the integration is possible, best of luck !

@ms-jpq
Copy link
Owner

ms-jpq commented Sep 12, 2021

WIP

#261

@krillin666
Copy link
Author

WIP

#261

You are insane ! I'm sure you're going to figure it out. I just spent a whole day trying to find a replacement autocompletion plugin which worked with Omnifunction and Ultisnips but none were worth it.

@ms-jpq
Copy link
Owner

ms-jpq commented Sep 12, 2021

don't get your hopes up :p,

its not gonna get all done for 2-3 days, because I also need to write the third party integration from vimtex -> coq on top of making coq accept third party plugins.

and its actually sunny today , so im gonna touch some grass first :D

@ms-jpq
Copy link
Owner

ms-jpq commented Sep 12, 2021

but yeah the final sources thingy will be very simple to write:

https://github.com/ms-jpq/coq_nvim/blob/dev/docs/CUSTOM_SOURCES.md

@krillin666
Copy link
Author

don't get your hopes up :p,

its not gonna get all done for 2-3 days, because I also need to write the third party integration from vimtex -> coq on top of making coq accept third party plugins.

and its actually sunny today , so im gonna touch some grass first :D

Please do take the necessary time to maintain the code core integrity, but above all to have time to enjoy life 😄

@ms-jpq
Copy link
Owner

ms-jpq commented Sep 13, 2021

@krillin666
图片

I will use this for a day or so and see if everything is good, after that ill merge it

@ms-jpq
Copy link
Owner

ms-jpq commented Sep 14, 2021

https://github.com/ms-jpq/coq_nvim/blob/coq/docs/CUSTOM_SOURCES.md

done,

its even faster than just using vimtex, orgmode, etc, because coq transparently adds a layer of sqlite cache

@ms-jpq ms-jpq closed this as completed Sep 14, 2021
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

No branches or pull requests

3 participants