ms-jpq / coq_nvim

Fast as FUCK nvim completion. SQLite, concurrent scheduler, hundreds of hours of optimization.
GNU General Public License v3.0
3.54k stars 100 forks source link

Adding new source completion? #80

Closed MadPocong closed 3 years ago

MadPocong commented 3 years ago

Thanks for the great work on this plugin :+1:

But i have question, I use orgmode for note-taking (kristijanhusak/orgmode.nvim), in compe, I just add new line for source orgmode like this:

screenshot_18-Aug-2021_1548

how bout coq_nvim?

Shougo commented 3 years ago

kristijanhusak/orgmode.nvim has the source for nvim-compe. But for coq_nvim does not.

ms-jpq commented 3 years ago

I do not have third party sources for now, I need to think deeper about how to make everything work together before I can add something like that.

Mte90 commented 3 years ago

As you are thinking of it I want to share an idea.

I did for deoplete a plugin that it's here https://github.com/Mte90/deoplete-wp-hooks

Basically uses 2 json as sources but the autocomplete is executed when the cursor is inside a function for a specific parameter like add_action('autocompleteherefromthejson.

Now after moving to compe and now coq I don't have anymore something similar but for WordPress development is very useful.

As coq is very fast, I was thinking that maybe a python file (that read the json) or a json itself with instructions how to handle those "sentences" can be a way to create something that doesn't require any code.

ms-jpq commented 3 years ago

I havn't begun thinking about it haha,

still got a few things like custom snippets and what not before I worry about this.

and since its like 3 am right now my brain is basically -200 :D


also my 3AM brain thinks https://www.youtube.com/watch?v=Dz8cpq2PjlQ is a good song,

ms-jpq commented 3 years ago

honestly thought, i might try and see how hard it would be to write an LSP lmao, since that technically is a source...

Mte90 commented 3 years ago

well at 3 am is hard for everyone but here is 12 am so my thoughts are not so tired 😂

ms-jpq commented 3 years ago

solution here https://github.com/ms-jpq/coq_nvim/issues/258

will code it in the next week

ms-jpq commented 3 years ago

@MadPocong

how do I test out orgmode?

:echom OrgmodeOmni(0, 'string') gives back [], what are some of the special string i need in my buffer to send back results?

ms-jpq commented 3 years ago

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