Last active
June 4, 2021 10:44
-
-
Save noecker/a9234a9e849d428c68c41a21084ded29 to your computer and use it in GitHub Desktop.
ALE + Solargraph autocomplete
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" I believe this to be the minimum necessary config | |
" to get ALE + Solargraph running with autocomplete. | |
" | |
" You must install the solargraph gem. Ideally you'll | |
" install to system gems so that solargraph is available | |
" everywhere. | |
" | |
" You may also want to run `solargraph config` from the | |
" root directory of any project where you want to use | |
" solargraph. | |
" | |
" After opening your first Ruby file in a fresh vim session, | |
" you'll need to wait a few seconds for Solargraph to | |
" start and be indexed. | |
" This assumes vim-plug is installed | |
call plug#begin('~/.vim/plugged') | |
Plug 'w0rp/ale' " Linting & autocomplete | |
call plug#end() | |
" ALE Settings | |
" Specify ruby linters, you'll likely want others enabled | |
let g:ale_linters = {'ruby': ['solargraph']} | |
" Set the executable for ALE to call to get Solargraph | |
" up and running in a given session | |
let g:ale_ruby_solargraph_executable = 'solargraph' | |
let g:ale_ruby_solargraph_options = {} | |
let g:ale_completion_enabled = 1 | |
" Fixes the bug identified in this issue: | |
" https://github.com/w0rp/ale/issues/1700 | |
set completeopt=menu,menuone,preview,noselect,noinsert |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment