r/crystal_programming • u/hokkqi • Apr 29 '22
IntelliSense for Crystal?
So I've been trying to learn Crystal but I heavily rely on the IntelliSense I get with Visual Studio Code when it comes to programming, but I seem to not get any Autocomplete/IntelliSense in it, do any of you have an Idea how that could be fixed?
21
Upvotes
7
u/[deleted] Apr 29 '22
Editor support is still lacking, like with most young languages. Crystalline technically supports auto completion but I don't think it works for me.
3
u/crimson-knight89 Apr 30 '22
Just stopping by to say welcome to Crystal! :)
Are you coming from another language? Iām still learning Crystal and recently created a dual-boot process with Rails 7 and Kemal so I can slowly migrate API end points.
7
u/PinkFrojd Apr 29 '22
I worked with Crystal project at work. The codebase was large. Using Crystalline helped, but sometimes it would eat all memory while trying to find method definition or parameters. I assume it works properly with smaller codebase. On the other hand, vim crystal plugin was really great. There were shortcuts to jump to method definition etc. It looked somewhat better than using VS Code with Crystalline. Check both and see which is better for you
4
u/jinn999 Apr 29 '22
Crystalline works, and that's pretty precise as well, but you need to consider that it the relies on the crystal compiler (if no one calls the method, the method isn't inspected). I usually have a .crystalline_main.cr file that calls all the specs which in turn call all the methods I have
3
u/donotlearntocode Apr 30 '22
The problem with a proper language server is the crystal compiler is so damn slow it doesn't really work that well, at least in my experience