tabnine-nvim
tabnine-nvim copied to clipboard
add build lua
feat: add a build.lua file
This is supported by lazy.nvim to automagically build the project.
I think we shouldn't call it on every initialization (because this makes network requests), but maybe if there's no binaries installed, then run it?
Yes, that's what I meant :).. this is how it works with other plugins
@amirbilu Having tried to implement this for a while, there doesn't seem to be an easy way without up-ending the rest of the codebase.
In order to build asynchronously (and not block the entire editor), I would have to change every invocation to TabnineBinary:start and :request to be callback-based.
I can do this if you'd like, but it would be a much larger PR and likely would be a (set of) breaking change(s).
I can build it synchronously if you'd like, but this would freeze the entire editor window.
Got you. What are you suggesting? What option is better in your opinion
Got you. What are you suggesting? What option is better in your opinion
Well, ideally, we’d go to a callback-based system, but I would rather not implement those changes, so perhaps we run it synchronously and just deal with the freeze? It should only happen once anyways, right?
Freezing the IDE sounds scary to me.. but I would not want to give up on this. Maybe I could find time to refactor this to async
I've rebased this to the current state of master (eb914c268228e5a04652fbcc3aff93a5bdb996d2)
@amirbilu Ive rethought this pr, and I think i can make it work asynchronously (I'm going to copy from nvim-treesitter's async install).
should I also add a :TabnineBuild and/or :TabnineChatBuild command here, or add that to a new PR after I finish work here?