File tree Expand file tree Collapse file tree 1 file changed +5
-18
lines changed Expand file tree Collapse file tree 1 file changed +5
-18
lines changed Original file line number Diff line number Diff line change @@ -713,19 +713,8 @@ return {
713
713
.. project_name
714
714
os.execute (" mkdir " .. workspace_dir )
715
715
716
- -- get the mason install path
717
- local install_path =
718
- require (" mason-registry" ).get_package (" jdtls" ):get_install_path ()
719
-
720
- -- get the current OS
721
- local os
722
- if vim .fn .has (" macunix" ) then
723
- os = " mac"
724
- elseif vim .fn .has (" win32" ) then
725
- os = " win"
726
- else
727
- os = " linux"
728
- end
716
+ -- get the mason jdtls path
717
+ local jdtls_files = vim .fn .expand (" $MASON/share/jdtls" )
729
718
730
719
-- return the server config
731
720
return {
@@ -736,19 +725,17 @@ return {
736
725
" -Declipse.product=org.eclipse.jdt.ls.core.product" ,
737
726
" -Dlog.protocol=true" ,
738
727
" -Dlog.level=ALL" ,
739
- " -javaagent:" .. install_path .. " /lombok.jar" ,
728
+ " -javaagent:" .. jdtls_files .. " /lombok.jar" ,
740
729
" -Xms1g" ,
741
730
" --add-modules=ALL-SYSTEM" ,
742
731
" --add-opens" ,
743
732
" java.base/java.util=ALL-UNNAMED" ,
744
733
" --add-opens" ,
745
734
" java.base/java.lang=ALL-UNNAMED" ,
746
735
" -jar" ,
747
- vim .fn .glob (
748
- install_path .. " /plugins/org.eclipse.equinox.launcher_*.jar"
749
- ),
736
+ jdtls_files .. " /plugins/org.eclipse.equinox.launcher.jar" ,
750
737
" -configuration" ,
751
- install_path .. " /config_ " .. os ,
738
+ jdtls_files .. " /config " ,
752
739
" -data" ,
753
740
workspace_dir ,
754
741
},
You can’t perform that action at this time.
0 commit comments