mirror of
https://github.com/dense-analysis/ale.git
synced 2026-05-19 14:59:55 +08:00
Changed sbtserver to just work off of the address variable
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
" Author: ophirr33 <coghlan.ty@gmail.com>
|
||||
" Description: TCP lsp client for sbt Server
|
||||
|
||||
call ale#Set('scala_sbtserver_address', '')
|
||||
call ale#Set('scala_sbtserver_address', '127.0.0.1:4273')
|
||||
call ale#Set('scala_sbtserver_project_root', '')
|
||||
|
||||
function! ale_linters#scala#sbtserver#GetProjectRoot(buffer) abort
|
||||
@@ -15,16 +15,6 @@ endfunction
|
||||
|
||||
function! ale_linters#scala#sbtserver#GetAddress(buffer) abort
|
||||
let l:address = ale#Var(a:buffer, 'scala_sbtserver_address')
|
||||
if l:address is? ''
|
||||
let l:project_root = ale_linters#scala#sbtserver#GetProjectRoot(a:buffer)
|
||||
let l:active_file = l:project_root . '/project/target/active.json'
|
||||
if !empty(glob(l:active_file))
|
||||
let l:active = json_decode(join(readfile(l:project_root . '/project/target/active.json')))
|
||||
if has_key(l:active, 'uri')
|
||||
return substitute(l:active.uri, 'tcp://', '', '')
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
return l:address
|
||||
endfunction
|
||||
|
||||
|
||||
Reference in New Issue
Block a user