1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-03 01:00:05 +08:00

docs(ruby): add solargraph to Code completion section

This commit is contained in:
Andrés 2023-06-16 21:08:20 -04:00 committed by GitHub
parent f0e1718720
commit 95c7ef70e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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