perf(nvim): improve nvim-java lazy loading
Some checks failed
Check Formatting of Files / Check-Formatting (push) Has been cancelled
Some checks failed
Check Formatting of Files / Check-Formatting (push) Has been cancelled
This commit is contained in:
parent
c307824597
commit
86e58fd6cc
@ -151,50 +151,88 @@ return {
|
|||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"williamboman/mason.nvim",
|
||||||
|
opts = {
|
||||||
|
max_concurrent_installers = 12,
|
||||||
|
registries = {
|
||||||
|
"github:nvim-java/mason-registry",
|
||||||
|
"github:mason-org/mason-registry",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
cmd = {
|
||||||
|
"Mason",
|
||||||
|
"MasonLog",
|
||||||
|
"MasonUpdate",
|
||||||
|
"MasonInstall",
|
||||||
|
"MasonUninstall",
|
||||||
|
"MasonUninstallAll",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nvim-java/nvim-java",
|
||||||
|
ft = { "java" },
|
||||||
|
config = function()
|
||||||
|
require("lspconfig").jdtls.setup({
|
||||||
|
capabilities = lsp_capabilities,
|
||||||
|
on_attach = on_attach,
|
||||||
|
-- HACK: Have to define this to make jdtls show hovers, etc.
|
||||||
|
init_options = {},
|
||||||
|
settings = {
|
||||||
|
java = {
|
||||||
|
completion = {
|
||||||
|
postfix = {
|
||||||
|
enabled = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
inlayHints = {
|
||||||
|
parameterNames = {
|
||||||
|
enabled = "all",
|
||||||
|
exclusions = { "this" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
dependencies = {
|
||||||
|
"nvim-java/lua-async-await",
|
||||||
|
"nvim-java/nvim-java-refactor",
|
||||||
|
"nvim-java/nvim-java-core",
|
||||||
|
"nvim-java/nvim-java-test",
|
||||||
|
"nvim-java/nvim-java-dap",
|
||||||
|
"MunifTanjim/nui.nvim",
|
||||||
|
"mfussenegger/nvim-dap",
|
||||||
|
"williamboman/mason.nvim",
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
|
"williamboman/mason.nvim",
|
||||||
"Decodetalkers/csharpls-extended-lsp.nvim",
|
"Decodetalkers/csharpls-extended-lsp.nvim",
|
||||||
{
|
{
|
||||||
"williamboman/mason-lspconfig.nvim",
|
"williamboman/mason-lspconfig.nvim",
|
||||||
opts = {
|
opts = {
|
||||||
|
|
||||||
automatic_installation = true,
|
automatic_installation = true,
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
"tsserver",
|
"tsserver",
|
||||||
},
|
},
|
||||||
},
|
handlers = {
|
||||||
},
|
["jdtls"] = function()
|
||||||
{
|
require("java").setup({
|
||||||
"nvim-java/nvim-java",
|
-- Handled by $JAVA_HOME
|
||||||
dependencies = {
|
jdk = {
|
||||||
"nvim-java/lua-async-await",
|
auto_install = false,
|
||||||
"nvim-java/nvim-java-refactor",
|
},
|
||||||
"nvim-java/nvim-java-core",
|
notifications = {
|
||||||
"nvim-java/nvim-java-test",
|
dap = false,
|
||||||
"nvim-java/nvim-java-dap",
|
},
|
||||||
"MunifTanjim/nui.nvim",
|
})
|
||||||
"mfussenegger/nvim-dap",
|
end,
|
||||||
"williamboman/mason.nvim",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"williamboman/mason.nvim",
|
|
||||||
opts = {
|
|
||||||
max_concurrent_installers = 12,
|
|
||||||
registries = {
|
|
||||||
"github:nvim-java/mason-registry",
|
|
||||||
"github:mason-org/mason-registry",
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
cmd = {
|
|
||||||
"Mason",
|
|
||||||
"MasonLog",
|
|
||||||
"MasonUpdate",
|
|
||||||
"MasonInstall",
|
|
||||||
"MasonUninstall",
|
|
||||||
"MasonUninstallAll",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
"Hoffs/omnisharp-extended-lsp.nvim",
|
"Hoffs/omnisharp-extended-lsp.nvim",
|
||||||
"b0o/schemastore.nvim",
|
"b0o/schemastore.nvim",
|
||||||
|
Loading…
Reference in New Issue
Block a user