mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-23 01:08:53 +02:00
add: custom mason ensure installed
This commit is contained in:
parent
fc32c1b69c
commit
6da9ec51d8
9 changed files with 100 additions and 17 deletions
|
@ -1,11 +1,11 @@
|
|||
return {
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
event = "VeryLazy",
|
||||
dependencies = {
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
lazy = true,
|
||||
event = "BufRead",
|
||||
cmd = {
|
||||
"LspInfo",
|
||||
"LspInstall",
|
||||
|
@ -62,7 +62,6 @@ return {
|
|||
end,
|
||||
},
|
||||
},
|
||||
event = "BufReadPre",
|
||||
opts = function()
|
||||
local servers = { "lua_ls" }
|
||||
local mason_install = pcode.mason_ensure_installed or {}
|
|
@ -9,9 +9,10 @@ end
|
|||
return {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = {
|
||||
ensure_installed = ts_list,
|
||||
},
|
||||
opts = function(_, opts)
|
||||
opts.ensure_installed = opts.ensure_installed or {}
|
||||
vim.list_extend(opts.ensure_installed, ts_list)
|
||||
end,
|
||||
config = function(_, opts)
|
||||
local parser_config = require("nvim-treesitter.parsers").get_parser_configs()
|
||||
|
|
@ -4,6 +4,29 @@ if pcode.active_java_config.active then
|
|||
-- {
|
||||
-- "mfussenegger/nvim-jdtls",
|
||||
-- },
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
opts.ensure_installed = opts.ensure_installed or {}
|
||||
vim.list_extend(opts.ensure_installed, { "java" })
|
||||
end,
|
||||
},
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
opts = function(_, opts)
|
||||
opts.ensure_installed = opts.ensure_installed or {}
|
||||
vim.list_extend(opts.ensure_installed, { "jdtls" })
|
||||
end,
|
||||
},
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = function(_, opts)
|
||||
local package="google-java-format"
|
||||
require("user.utils.mason").try_install(package)
|
||||
opts.formatters_by_ft.java = { package }
|
||||
end,
|
||||
},
|
||||
{
|
||||
"nvim-neotest/neotest",
|
||||
dependencies = {
|
||||
|
|
|
@ -6,6 +6,7 @@ return {
|
|||
dependencies = {
|
||||
{
|
||||
"jayp0521/mason-null-ls.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
ensure_installed = pcode.null_ls_ensure_installed or {},
|
||||
automatic_setup = true,
|
||||
|
|
|
@ -110,11 +110,11 @@ if pcode.active_cpp_config then
|
|||
pcode.nvim_dap = true
|
||||
end
|
||||
-- run if java config true
|
||||
if pcode.active_java_config.active then
|
||||
table.insert(pcode.treesitter_ensure_installed, "java")
|
||||
table.insert(pcode.mason_ensure_installed, "jdtls")
|
||||
table.insert(pcode.null_ls_ensure_installed, "google_java_format")
|
||||
-- table.insert(pcode.dap_ensure_installed, "javadbg")
|
||||
-- table.insert(pcode.unregister_lsp, "jdtls")
|
||||
end
|
||||
-- if pcode.active_java_config.active then
|
||||
-- table.insert(pcode.treesitter_ensure_installed, "java")
|
||||
-- table.insert(pcode.mason_ensure_installed, "jdtls")
|
||||
-- table.insert(pcode.null_ls_ensure_installed, "google_java_format")
|
||||
-- table.insert(pcode.dap_ensure_installed, "javadbg")
|
||||
-- table.insert(pcode.unregister_lsp, "jdtls")
|
||||
-- end
|
||||
return {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue