3 ms·
The new auto-complete is really impressive. I've always been a big fan of using snippets and auto-completing based on open buffers in a project instead of usin
by nickjj 5y ago
The new auto-complete is really impressive.
I've always been a big fan of using snippets and auto-completing based on open buffers in a project instead of using LSPs.
I haven't used ST in a while but decided to install ST4 to try it out.
I opened a Flask application that uses SQLAlchemy. I opened a Python file and typed User. and then it showed me a list of fields and methods on my User model without having the User model open in a buffer.
I did the same thing in an Elixir project and after installing the Elixir package it worked for project specific "things" in my app. Like after typing UserView. it showed me only functions available in that view. Likewise it did the same thing with context modules, it picked up all functions inside of a specific module.
In both cases as I started typing "User" it showed me options to pick from. In both cases it also listed out the number of definitions for a specific "thing" and lets you quickly jump to a specific one. If you mouse over a function it brings up the list to pick a definition / reference. There's also key binds to bring up a CTRL+p'ish feeling menu to see and preview the file where something is being used.
It's not as good as a LSP but it's definitely a few notches above what I've seen in other editors and the best part about it is not needing to configure multiple LSPs and it's lightning fast.
- Fnoord 5y ago> The new auto-complete is really impressive. How does it compare to YouCompleteMe or TabNine?
- nickjj 5y agoI haven't tried TabNine but according to its home page it doesn't support Elixir. It also requires a monthly subscription (the daily limit would be consumed in about 5-10 minutes of coding). I don't mind paying for things but at this time I'm not interested in subscribing to more services. YCM feels more like a LSP client than buffer / project level auto-complete. AFAIK it requires you to have a language's runtime specifically installed which is a deal breaker for me. Most of my apps run in Docker and I don't have local copies of any runtimes installed. ST4 works wonderfully in this case because it parses everything out based on syntax highlighting rules.
- fpoling 5y agoVSCode supports remote editing and running language server in a container.
- chiumichael 5y agoIt's much better than YouCompleteMe imo. The context-awareness of it is quite amazing.
- unknown_error 5y agoHow does it compare to the autocomplete in IntelliJ/Webstorm/Phpstorm? The amazing autocomplete is most of what keeps me on Jetbrains, but their software is soooo slow.
- nickjj 5y agoIntelliJ's autocomplete is much better, but it's doing some heavy lifting to get such good results. I haven't gone crazy testing ST4 btw, I played with it for like 20 minutes. It felt like it was maybe 65% between ST3's auto-complete and what you'd get with a LSP back-end using VSCode. Meaning it's closer to VSCode than it is than ST3, but not as good as a LSP, but there's also no effort to get it set up so it's a reasonable trade off if you're someone like me who just wants pretty good auto complete without configuring a million tools to run in the background.
- mundanevoice 5y ago> Many plugin API additions particularly to better support plugins like LSP It is coming with LSP support so that will work as well.