From 95c7ef70e7568e1ecc83452ecd72445b1ea68542 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s?= <39093711+a-chacon@users.noreply.github.com> Date: Fri, 16 Jun 2023 21:08:20 -0400 Subject: [PATCH] docs(ruby): add solargraph to Code completion section --- .../2019-02-18-use-vim-as-a-ruby-ide.md | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/docs/_posts/2019-02-18-use-vim-as-a-ruby-ide.md b/docs/_posts/2019-02-18-use-vim-as-a-ruby-ide.md index e481214d1..5a0d5f124 100644 --- a/docs/_posts/2019-02-18-use-vim-as-a-ruby-ide.md +++ b/docs/_posts/2019-02-18-use-vim-as-a-ruby-ide.md @@ -45,6 +45,29 @@ The completion menu will be opened as you type. ![rubycomplete](https://user-images.githubusercontent.com/13142418/53355518-20202080-3964-11e9-92f3-476060f2761e.png) +#### Solargraph + +If you want to use solargraph for a more advance code completion, you can do it through [coc]("https://github.com/neoclide/coc.nvim"). For use `coc` +like your autocompletion engine, you must set the next variable: + +``` +[options] +autocomplete_method = "coc" +``` + +Be sure to have solargraph installed: + +``` +gem install solargraph +``` + +Then install [coc-solargraph](https://github.com/neoclide/coc-solargraph) extension for `coc` to support solargraph with the next command: + +``` +:CocInstall coc-solargraph +``` + + ### Syntax linting The checkers layer is enabled by default. This layer provides asynchronous syntax linting via [neomake](https://github.com/neomake/neomake). @@ -69,6 +92,15 @@ SpaceVim use built-in plugin to manager the files in a project, you can add a `. } ``` +For a Rails project with Minitest use this: + +```json +{ + "app/*.rb": {"alternate": "test/{}_test.rb"}, + "test/*_test.rb": {"alternate": "app/{}.rb"} +} +``` + With this configuration, you can jump between the source code and test file via command `:A` ### running code