Comments (5)
Progress!
from conjure.
So you can try out the completion by depending on c434e00d949c3e7b17b9d15cef472f8c1df8a287
and ensuring you have some version of compliment installed in your project. If you have CIDER / nREPL then I think it comes along with that anyway, so it may already be there.
It works but it can slow you down as you type, not ideal. I could make it entirely async by updating the completions for the buffer in the background when you make changes or the cursor idles then just filter down that list of namespace specific completions.
I took this approach in the Rust version and it worked really well but I'd love to use compliment's context features, that requires actual async completion. I can't think of a way to do that through omnifunc so I think the only way would be through an async completion framework of some kind.
I did however find this interesting gist: https://gist.github.com/prabirshrestha/0b3b7b4e2112c662979bfeeec4e1edb7
It's a tad hack-y but basically on cursor hold they send off some job to get the completions at the cursor. Once that's done it invokes the omnifunc and reads the results from the pre-populated list of completions, including the context.
This gets us the best of both worlds (snappy completion + context aware) but I wonder how that "trigger omnifunc when I'm done fetching" works in practice. I could see it causing all sorts of issues if you're moving the cursor fast enough. Like not needing omnifunc but having it popup at random times anyway.
Maybe I'll try it and see how it actually behaves in practice, I'd love to have actual async completions taking the context into account, it's just going to be tricky within the tools Neovim has to offer.
from conjure.
Anyone's thoughts on this are much appreciated 😄 are buffer local completions enough for you if they're super fast? Do you love having completions within let bindings? Do you use a Neovim completion framework that would allow me to hook into it easily? I use deoplete so I worry that I'd need to implement it for every framework under the sun... I hear there's one called CoC?
Maybe I could just not take a hacky route, do it all correctly but require that you have one of a handful of very popular completion frameworks installed. Could be a good tradeoff.
from conjure.
Decided to only provide the basic omnicomplete support, async autocompletion can come at a later date through deoplete, CoC or similar. It'll definitely require some work to get their Python processes talking to Conjure's JVM though 😬
For now I'll go with what's stable, easy and predictable. Omnicomplete triggered by <c-x><c-o>
, nothing fancy. So I'll add context support, some quick first pass docs and release this.
from conjure.
Spent a long time tinkering trying to get autocomplete and context working but ultimately it's a lot of changes for very little gain. I'm going for MVP right now where omnicompletion works and works well. I'll get this released so people can actually start using it.
Async completion should be solved through an async completion framework which will require a bunch of thought about how those Python processes will communicate with Conjure. The context support in compliment can be used but just requires changing some of the form reading stuff I think, I'll probably do that in the future once I have a test suite.
from conjure.
Related Issues (20)
- [Clojure]: A way to configure a default namespace HOT 6
- Swap `__name__` to something other than `__main__` in Python REPLs HOT 3
- README Suggestion HOT 2
- Cannot connect to Scheme through socket HOT 2
- Async/await doesn't work with ipython REPL HOT 13
- stdio repl handling of both stderr and stdout for a form can be a problem sometimes HOT 1
- <localleader>ee, <localleader>E evaluate the whole file HOT 9
- Problems with evaluation: wrong returns HOT 3
- Guile over nREPL, guile-ares-rs integration HOT 4
- Clojure Debugger: Evaluation failing on debug reader tags HOT 4
- Local leader key not active when open scm files HOT 7
- Common-Lisp: Only first expression is evaluated using ConjureEvalBuf HOT 19
- Feature request: Re-run last test HOT 2
- Disable ConjureOmnifunc for Janet? HOT 4
- Common Lisp/ros/swank not behaving as expected HOT 15
- No syntax highlighting in log buffer when opening file using telescope. HOT 7
- HUD not popping up when using AstroVim HOT 1
- Adapt `IRust` support HOT 5
- Hy client not showing output HOT 5
- Disable LSP and Treesitter for the log buffer by default HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from conjure.