Autocomplete of gems in text editor

0

Personal is it possible to get an autocomplete experience in some free text editor, similar to what Rubymine does by indexing the gems code? I tried several alternatives in vscode, how to use cTag, but I can only go to the definition of gem (opening another screen), no autocomplete!

Does vim have such a feature?

    
asked by anonymous 30.07.2018 / 16:57

1 answer

0

All of Ruby's dynamism complicates autocomplete . So much so that rubistas are already accustomed to not having a code completion tool like Java and C #.

When there is no language proficiency or API, in your case the gems you are working on, Vim loses to IDEs.

Still, there are some tools that bring autocomplete to Ruby, such as Solargraph a>. Just install the gem using gem install solargraph and install the Vim plugin , which is still in beta. It also has the extension for Visual Studio Code. Just have the gem installed on the system.

It's all the more complicated when you're using Rails, which does the autoload of files at runtime. Often Solargraph does not see this require and can not do autocomplete . p>

If you are using Docker, the gem must be installed locally rather than inside container .

    
01.08.2018 / 01:51