diff options
author | Horacio Sanson <horacio@allm.net> | 2018-08-24 13:02:51 +0900 |
---|---|---|
committer | Horacio Sanson <horacio@allm.net> | 2018-08-27 10:58:17 +0900 |
commit | 1980245b94d7b997c6ba376d8a2644397afe02d6 (patch) | |
tree | 505aa9d0b20902e044926f9f2965ddbb3abe2067 /ale_linters | |
parent | 3c85c7ef65242cf80279cf9dcf843523f6d7875b (diff) | |
download | ale-1980245b94d7b997c6ba376d8a2644397afe02d6.zip |
Add solargraph LSP linter.
Diffstat (limited to 'ale_linters')
-rw-r--r-- | ale_linters/ruby/solargraph.vim | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/ale_linters/ruby/solargraph.vim b/ale_linters/ruby/solargraph.vim new file mode 100644 index 00000000..a53bcaa3 --- /dev/null +++ b/ale_linters/ruby/solargraph.vim @@ -0,0 +1,19 @@ +" Author: Horacio Sanson - https://github.com/hsanson +" Description: Solargraph Language Server https://solargraph.org/ + +call ale#Set('ruby_solargraph_host', '127.0.0.1') +call ale#Set('ruby_solargraph_port', '7658') + +function! ale_linters#ruby#solargraph#GetAddress(buffer) abort + let l:host = ale#Var(a:buffer, 'ruby_solargraph_host') + let l:port = ale#Var(a:buffer, 'ruby_solargraph_port') + return l:host . ':' . l:port +endfunction + +call ale#linter#Define('ruby', { +\ 'name': 'solargraph', +\ 'lsp': 'socket', +\ 'address_callback': 'ale_linters#ruby#solargraph#GetAddress', +\ 'language': 'ruby', +\ 'project_root_callback': 'ale#ruby#FindProjectRoot' +\}) |