mirror of
https://github.com/dense-analysis/ale.git
synced 2026-01-03 18:14:01 +08:00
Fix eclipse.jdt.ls workspace data path.
We were setting the -data parameter to the project root but this caused the language server to fail initialization and synch of gradle dependencies. As consequence ALE failed to work fully on gradle projects. This fix sets the workspace to the parent folder of the project root. Normally this corresponds to the correct Eclipse workspace path. When this is not the case, this fix also allows users to explicitly set the absolute path to the workspace via configuration variable.
This commit is contained in:
@@ -61,11 +61,11 @@ Execute(The eclipselsp callback should return the correct default value):
|
||||
\ '-noverify',
|
||||
\ '-Xmx1G',
|
||||
\ '-jar',
|
||||
\ '',
|
||||
\ ale#Escape(''),
|
||||
\ '-configuration',
|
||||
\ b:cfg,
|
||||
\ ale#Escape(b:cfg),
|
||||
\ '-data',
|
||||
\ ''
|
||||
\ ale#Escape(ale#path#Simplify(''))
|
||||
\]
|
||||
AssertLinter 'java', join(cmd, ' ')
|
||||
|
||||
@@ -79,11 +79,11 @@ Execute(The eclipselsp callback should allow custom executable):
|
||||
\ '-noverify',
|
||||
\ '-Xmx1G',
|
||||
\ '-jar',
|
||||
\ '',
|
||||
\ ale#Escape(''),
|
||||
\ '-configuration',
|
||||
\ b:cfg,
|
||||
\ ale#Escape(b:cfg),
|
||||
\ '-data',
|
||||
\ ''
|
||||
\ ale#Escape(ale#path#Simplify(''))
|
||||
\]
|
||||
AssertLinter '/bin/foobar', join(cmd, ' ')
|
||||
|
||||
@@ -97,10 +97,10 @@ Execute(The eclipselsp callback should allow custom configuration path):
|
||||
\ '-noverify',
|
||||
\ '-Xmx1G',
|
||||
\ '-jar',
|
||||
\ '',
|
||||
\ ale#Escape(''),
|
||||
\ '-configuration',
|
||||
\ ale#path#Simplify('/home/config'),
|
||||
\ ale#Escape(ale#path#Simplify('/home/config')),
|
||||
\ '-data',
|
||||
\ ''
|
||||
\ ale#Escape(ale#path#Simplify(''))
|
||||
\]
|
||||
AssertLinter 'java', join(cmd, ' ')
|
||||
|
||||
Reference in New Issue
Block a user