mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-09 12:20:05 +08:00
docs(ruby): add solargraph to Code completion section
This commit is contained in:
parent
f0e1718720
commit
95c7ef70e7
@ -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)
|
![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
|
### Syntax linting
|
||||||
|
|
||||||
The checkers layer is enabled by default. This layer provides asynchronous syntax linting via [neomake](https://github.com/neomake/neomake).
|
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`
|
With this configuration, you can jump between the source code and test file via command `:A`
|
||||||
|
|
||||||
### running code
|
### running code
|
||||||
|
Loading…
Reference in New Issue
Block a user