formatting

This commit is contained in:
2025-05-09 00:16:55 -05:00
parent a6007ff694
commit f3bd08968a
2 changed files with 17 additions and 12 deletions

View File

@ -11,7 +11,8 @@ local java_dap_install = vim.fs.joinpath(vim.fn.stdpath('data'),
local config = {
cmd = {
"/usr/lib/jvm/openjdk21/bin/java", -- 💀
"-jar", vim.fn.glob(jdtls_install.."/plugins/org.eclipse.equinox.launcher_*.jar"), -- 💀
"-jar", -- 💀
vim.fn.glob(jdtls_install.."/plugins/org.eclipse.equinox.launcher_*.jar"),
"-configuration", jdtls_install.."/config_linux",
"-data", vim.fn.stdpath("cache").."/nvim-jdtls",
@ -79,10 +80,12 @@ local config = {
}
-- generate the path to the java file(s)
---@type string|nil
local cache_path = vim.fs.joinpath(vim.fn.stdpath("cache"), "/JavaVersion.class")
---@type string|nil
local src_path = vim.fs.joinpath(vim.fn.stdpath("config"), "/extras/JavaVersion.java")
---@type string?
local cache_path = vim.fs.joinpath(vim.fn.stdpath("cache"),
"/JavaVersion.class")
---@type string?
local src_path = vim.fs.joinpath(vim.fn.stdpath("config"),
"/extras/JavaVersion.java")
-- if either path is invalid
if not cache_path or not src_path then
@ -99,11 +102,12 @@ local function build_cache()
end
-- compile our code
vim.system({ "javac", src_path, "-d", vim.fn.stdpath("cache") }, {}, function(out)
if out.code ~= 0 then
cache_path = nil
end
end)
vim.system({ "javac", src_path, "-d", vim.fn.stdpath("cache"), }, {},
function(out)
if out.code ~= 0 then
cache_path = nil
end
end)
end)
end
@ -142,7 +146,7 @@ local function version_check()
elseif v.major < 21 then
vim.notify(string.format(
"java version %s < 21.0.0 Cannot run jdtls, bailing out",
v[1] .. "." .. v[2] .. "." .. v[3]),
v[1].."."..v[2].."."..v[3]),
vim.log.levels.ERROR, { title = misc.appid })
return false
end

View File

@ -16,5 +16,6 @@ end)
-- change neovim root
map_local("n", "rt", function()
vim.api.nvim_set_current_dir(vim.b.netrw_curdir)
vim.notify("root dir updated: "..vim.b.netrw_curdir, vim.log.levels.LOW, { title = misc.appid })
vim.notify("root dir updated: "..vim.b.netrw_curdir, vim.log.levels.LOW,
{ title = misc.appid })
end)