summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--after/ftplugin/java.lua26
-rw-r--r--after/ftplugin/netrw.lua3
2 files changed, 17 insertions, 12 deletions
diff --git a/after/ftplugin/java.lua b/after/ftplugin/java.lua
index 5a5ae44..9e11fa6 100644
--- a/after/ftplugin/java.lua
+++ b/after/ftplugin/java.lua
@@ -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
diff --git a/after/ftplugin/netrw.lua b/after/ftplugin/netrw.lua
index 98d7dd7..eb37bd5 100644
--- a/after/ftplugin/netrw.lua
+++ b/after/ftplugin/netrw.lua
@@ -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)