The Crystal Programming Language Forum

Top IDE for Crystal?

What IDE do you use and why?

I use VS CODE with all crystal extensions.

3 Likes

vscode

I like Atom more than VSCode but it doesn’t work well with WSL, so VSCode.

I’m surprised people still use Atom. What do you like about it over VS Code?

A lot of small things, matter of taste mostly. Atom shows which files were modified in files list, vscode’s file list looks dull and is always hidden below search results or changes to commit. Several months ago VSCode didn’t start if a PC doesn’t have a network card. Atom don’t ask for administrative priveleges to update.

VS Code

I use VS Code Insider with the Crystal extension you don’t need every extension, one is more than enough :slight_smile:

Notepad. The best IDE in the world

1 Like

I’ve been using Geany for about a decade now. I prefer simple text editor with just enough nice features, such as syntax highlighting, to make it easier for working on C++, D, Python, Ruby, HTML/JS/CSS, and now Crystal.

Before, I had used other text editors, but one fine day I was fixing something in an .hpp file, saved it and closed the editor window only to find a few minutes later that I had another editor up with the same .hpp file. I was making different changes to different in-memory copies of the same file! BAD! So ever since, I’ve used only editors that won’t let me make that mistake again. Editors that list all the files in a directory, and let me open only one at a time, but allow separate windows so I can look at an .hpp while writing a .cpp w/o flipping tabs other gymnastics. Swinging the ol’ eyeballs between two directions is fast, easy, natural.

I have been using Atom since July, just for to see what it does, how it’s different from other editors, and if it’s actually better or just hype from fanatics. I find it heavy, slow to come up. I like fast and light, and for now Geany is that way.

1 Like

What extension use on VS Code (for auto-completion, doc hover, formatting, …)?
I have installed https://github.com/crystal-lang-tools/vscode-crystal-lang but doesn’t work https://github.com/crystal-lang-tools/vscode-crystal-lang/issues/104

This extension no longer seems to be maintained :frowning:

EDIT: I have installed https://github.com/crystal-lang-tools/scry, it works now. :partying_face:

You should give a VSCode a try. It is an editor similar to Atom in its origins and in the stack it uses, but Microsoft (of all companies, right?) made a rather impressive job tackling the disadvantages of that breed of editors.

It’s much snappier than atom and is quite reminiscent of older simpler non-bloated editors such as geany.

I use Geany like @darenw , and I am considering using a Qt-based text editor like Kate with scry/LSP.
My main needs are:

  • Fast, quick startup, light, general-purpose text editor (editing source code, files in archives, random files etc)
  • Integrates well on my Desktop ( Qt is a nice plus for supporting Breeze Dark theme, dotfiles, system package is a plus)
  • FOSS product I can trust (the pre-built VSCode by Microsoft isn’t)
  • Simple - I don’t need an IDE with loads of features
1 Like

Crystal support in VSCode works well for you?
For me it don’t works half the time, it’s not practical without a good auto-completion, and additionally (but very useful) go to definition and outline.

vim. Of all the available options, it gives me the most flexibility and speed.

3 Likes

yeah, for me, auto-completion is very important feature.

Install scry and it should start working better.

Yeah, vim and emacs have better plugins for crystal right now, I’m trying to figure out a way to improve VSCode plugin, Scry is a good alternative to get more features, although it still requires a lot of work to be full complain to the Microsoft Language Server Protocol Specification.

VSCode extension status according to its features is:

  • Formatting: :star: :star: :star: :star: still requires full project formatting (it was available on scry)
  • Syntax color: :star: :star: :star: there still some issues in crystal.json and Crystal.tmLanguage port.
  • Go to definition: :star: it requires the crystal compiler to compile the whole project almost every time and also the issue on how the crystal compiler works, sometimes is hard to find dependencies because missing require statements, or implicit require done by the developer.
  • Completion: :-1: Hard coded completion is not feasible. I tried it just as an experiment to give basic completion by hard coding most of crystal syntax and classes in one big file. It worked at first but it is not usable for serious projects. Scry tries a better way, implemented by @laginha87 almost two years ago

Well, at least there someway to get VSCode working seamlessly with crystal :smiley:

Nim lang is a great example of a good VSCode extension