Skip to content

Commit d94c1a1

Browse files
lalala-233fbricon
authored andcommitted
feat: support Termux
1 parent ed2494f commit d94c1a1

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

  • org.eclipse.jdt.ls.product/scripts

org.eclipse.jdt.ls.product/scripts/jdtls.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ def get_shared_config_path(jdtls_base_path):
6767

6868
if system in ['Linux', 'FreeBSD']:
6969
config_dir = 'config_linux'
70+
# or use system == 'Android'
71+
elif 'TERMUX_VERSION' in os.environ:
72+
config_dir = 'config_linux'
7073
elif system == 'Darwin':
7174
config_dir = 'config_mac'
7275
elif system == 'Windows':
@@ -87,6 +90,8 @@ def main(args):
8790
cachedir = Path(os.environ['HOME']) / 'Library' / 'Caches'
8891
elif system == 'Linux' and 'HOME' in os.environ:
8992
cachedir = Path(os.environ['HOME']) / '.cache'
93+
elif 'TERMUX_VERSION' in os.environ and 'HOME' in os.environ:
94+
cachedir = Path(os.environ['HOME']) / '.cache'
9095
else:
9196
cachedir = Path(tempfile.gettempdir())
9297

0 commit comments

Comments
 (0)