Fix java configuration
This commit is contained in:
parent
e2697f61fd
commit
762c673365
3 changed files with 7 additions and 3 deletions
|
@ -1 +1,4 @@
|
|||
|
||||
vim.opt_local.shiftwidth = 2
|
||||
vim.opt_local.tabstop = 2
|
||||
vim.opt_local.tw = 180
|
||||
vim.opt_local.colorcolumn = "+1"
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
set tw=120
|
|
@ -3,6 +3,7 @@
|
|||
return {
|
||||
{
|
||||
"mfussenegger/nvim-jdtls",
|
||||
ft = "java",
|
||||
config = function()
|
||||
local jdtls = require("jdtls")
|
||||
|
||||
|
@ -13,7 +14,7 @@ return {
|
|||
local style_path = vim.fn.expand("~/.config/nvim/GoogleStyle.xml")
|
||||
|
||||
local config = {
|
||||
cmd = { "jdtls" }, -- or path to your startup script
|
||||
cmd = { "/Library/Java/JavaVirtualMachines/temurin-21.jdk/Contents/Home/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", "-Xms1g", "--add-modules=ALL-SYSTEM", "--add-opens", "java.base/java.util=ALL-UNNAMED", "--add-opens", "java.base/java.lang=ALL-UNNAMED", "-jar", vim.fn.glob(vim.fn.stdpath("data") .. "/mason/packages/jdtls/plugins/org.eclipse.equinox.launcher_*.jar"), "-configuration", vim.fn.glob(vim.fn.stdpath("data") .. "/mason/packages/jdtls/config_mac"), "-data", vim.fn.expand("~/.cache/jdtls-workspace/") .. "/" .. root_dir:gsub(":", "_") },
|
||||
root_dir = root_dir,
|
||||
settings = {
|
||||
java = {
|
||||
|
@ -163,6 +164,7 @@ return {
|
|||
|
||||
local ensure_installed = vim.tbl_keys(servers or {})
|
||||
vim.list_extend(ensure_installed, {
|
||||
"jdtls",
|
||||
"stylua",
|
||||
"black",
|
||||
"clang-format",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue