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 = { local config = {
cmd = { cmd = {
"/usr/lib/jvm/openjdk21/bin/java", -- 💀 "/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", "-configuration", jdtls_install.."/config_linux",
"-data", vim.fn.stdpath("cache").."/nvim-jdtls", "-data", vim.fn.stdpath("cache").."/nvim-jdtls",
@ -79,10 +80,12 @@ local config = {
} }
-- generate the path to the java file(s) -- generate the path to the java file(s)
---@type string|nil ---@type string?
local cache_path = vim.fs.joinpath(vim.fn.stdpath("cache"), "/JavaVersion.class") local cache_path = vim.fs.joinpath(vim.fn.stdpath("cache"),
---@type string|nil "/JavaVersion.class")
local src_path = vim.fs.joinpath(vim.fn.stdpath("config"), "/extras/JavaVersion.java") ---@type string?
local src_path = vim.fs.joinpath(vim.fn.stdpath("config"),
"/extras/JavaVersion.java")
-- if either path is invalid -- if either path is invalid
if not cache_path or not src_path then if not cache_path or not src_path then
@ -99,7 +102,8 @@ local function build_cache()
end end
-- compile our code -- compile our code
vim.system({ "javac", src_path, "-d", vim.fn.stdpath("cache") }, {}, function(out) vim.system({ "javac", src_path, "-d", vim.fn.stdpath("cache"), }, {},
function(out)
if out.code ~= 0 then if out.code ~= 0 then
cache_path = nil cache_path = nil
end end

View File

@ -16,5 +16,6 @@ end)
-- change neovim root -- change neovim root
map_local("n", "rt", function() map_local("n", "rt", function()
vim.api.nvim_set_current_dir(vim.b.netrw_curdir) 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) end)