mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-07-01 13:04:26 +02:00
Updated 6. Configurasi (markdown)
parent
807bec7853
commit
b88c41251b
1 changed files with 23 additions and 1 deletions
|
@ -479,6 +479,10 @@ echo $JAVA_HOME
|
||||||
-- use this function notation to build some variables
|
-- use this function notation to build some variables
|
||||||
vim.opt_local.shiftwidth = 4
|
vim.opt_local.shiftwidth = 4
|
||||||
vim.opt_local.tabstop = 4
|
vim.opt_local.tabstop = 4
|
||||||
|
vim.opt_local.softtabstop = 4
|
||||||
|
vim.opt_local.ts = 4
|
||||||
|
vim.opt_local.expandtab = true
|
||||||
|
|
||||||
local status, jdtls = pcall(require, "jdtls")
|
local status, jdtls = pcall(require, "jdtls")
|
||||||
if not status then
|
if not status then
|
||||||
return
|
return
|
||||||
|
@ -537,6 +541,17 @@ else
|
||||||
os = "linux"
|
os = "linux"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local bundles = {}
|
||||||
|
local mason_path = vim.fn.glob(vim.fn.stdpath("data") .. "/mason/")
|
||||||
|
vim.list_extend(bundles, vim.split(vim.fn.glob(mason_path .. "packages/java-test/extension/server/*.jar"), "\n"))
|
||||||
|
vim.list_extend(
|
||||||
|
bundles,
|
||||||
|
vim.split(
|
||||||
|
vim.fn.glob(mason_path .. "packages/java-debug-adapter/extension/server/com.microsoft.java.debug.plugin-*.jar"),
|
||||||
|
"\n"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
local config = {
|
local config = {
|
||||||
cmd = {
|
cmd = {
|
||||||
"java",
|
"java",
|
||||||
|
@ -566,12 +581,19 @@ local config = {
|
||||||
},
|
},
|
||||||
|
|
||||||
init_options = {
|
init_options = {
|
||||||
bundles = {},
|
bundles = {
|
||||||
|
vim.fn.glob(
|
||||||
|
mason_path .. "packages/java-debug-adapter/extension/server/com.microsoft.java.debug.plugin-*.jar",
|
||||||
|
"\n"
|
||||||
|
),
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
config["on_attach"] = function(client, bufnr)
|
config["on_attach"] = function(client, bufnr)
|
||||||
local _, _ = pcall(vim.lsp.codelens.refresh)
|
local _, _ = pcall(vim.lsp.codelens.refresh)
|
||||||
|
require("jdtls.dap").setup_dap_main_class_configs()
|
||||||
|
jdtls.setup_dap({ hotcodereplace = "auto" })
|
||||||
require("user.lsp.handlers").on_attach(client, bufnr)
|
require("user.lsp.handlers").on_attach(client, bufnr)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue