mirror of
https://github.com/LunarVim/LunarVim.git
synced 2024-09-20 18:45:08 +02:00
java updates
This commit is contained in:
parent
b2d4207543
commit
b157f8f4b8
4 changed files with 1 additions and 34 deletions
|
@ -5,16 +5,13 @@ end
|
||||||
if O.lang.java.java_tools.active then
|
if O.lang.java.java_tools.active then
|
||||||
-- find_root looks for parent directories relative to the current buffer containing one of the given arguments.
|
-- find_root looks for parent directories relative to the current buffer containing one of the given arguments.
|
||||||
if vim.fn.has "mac" == 1 then
|
if vim.fn.has "mac" == 1 then
|
||||||
JAVA_LS_EXECUTABLE = CONFIG_PATH .. "/utils/bin/java-mac-ls"
|
|
||||||
WORKSPACE_PATH = "/Users/" .. USER .. "/workspace/"
|
WORKSPACE_PATH = "/Users/" .. USER .. "/workspace/"
|
||||||
elseif vim.fn.has "unix" == 1 then
|
elseif vim.fn.has "unix" == 1 then
|
||||||
JAVA_LS_EXECUTABLE = CONFIG_PATH .. "/utils/bin/java-linux-ls"
|
|
||||||
WORKSPACE_PATH = "/home/" .. USER .. "/workspace/"
|
WORKSPACE_PATH = "/home/" .. USER .. "/workspace/"
|
||||||
else
|
else
|
||||||
print "Unsupported system"
|
print "Unsupported system"
|
||||||
end
|
end
|
||||||
print(JAVA_LS_EXECUTABLE)
|
JAVA_LS_EXECUTABLE = CONFIG_PATH .. "/utils/bin/jdtls"
|
||||||
print(WORKSPACE_PATH)
|
|
||||||
|
|
||||||
require("jdtls").start_or_attach {
|
require("jdtls").start_or_attach {
|
||||||
on_attach = require("lsp").common_on_attach,
|
on_attach = require("lsp").common_on_attach,
|
||||||
|
|
|
@ -1,28 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# NOTE:
|
|
||||||
# This doesn't work as is on Windows. You'll need to create an equivalent `.bat` file instead
|
|
||||||
#
|
|
||||||
# NOTE:
|
|
||||||
# If you're not using Linux you'll need to adjust the `-configuration` option
|
|
||||||
# to point to the `config_mac' or `config_win` folders depending on your system.
|
|
||||||
|
|
||||||
JAR="$HOME/.config/nvim/.language-servers/eclipse.jdt.ls/org.eclipse.jdt.ls.product/target/repository/plugins/org.eclipse.equinox.launcher_*.jar"
|
|
||||||
GRADLE_HOME=$HOME/gradle $HOME/.sdkman/candidates/java/current/bin/java \
|
|
||||||
-Declipse.application=org.eclipse.jdt.ls.core.id1 \
|
|
||||||
-Dosgi.bundles.defaultStartLevel=4 \
|
|
||||||
-Declipse.product=org.eclipse.jdt.ls.core.product \
|
|
||||||
-Dlog.protocol=true \
|
|
||||||
-Dlog.level=ALL \
|
|
||||||
-javaagent:/usr/local/share/lombok/lombok.jar \
|
|
||||||
-Xms1g \
|
|
||||||
-Xmx2G \
|
|
||||||
-jar $(echo "$JAR") \
|
|
||||||
-configuration "$HOME/.config/nvim/.language-servers/eclipse.jdt.ls/org.eclipse.jdt.ls.product/target/repository/config_linux" \
|
|
||||||
-data "${1:-$HOME/workspace}" \
|
|
||||||
--add-modules=ALL-SYSTEM \
|
|
||||||
--add-opens java.base/java.util=ALL-UNNAMED \
|
|
||||||
--add-opens java.base/java.lang=ALL-UNNAMED
|
|
||||||
|
|
||||||
# for older java versions if you wanna use lombok
|
|
||||||
# -Xbootclasspath/a:/usr/local/share/lombok/lombok.jar \
|
|
|
@ -1,2 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
nvim -u ~/.config/nvim/init.lua
|
|
Loading…
Reference in a new issue