Add mason plugins for null_ls and nvim_dap

This commit is contained in:
Evie Litherland-Smith 2023-02-21 17:31:50 +00:00
parent 4b3526f81b
commit 1dcd678137
7 changed files with 39 additions and 14 deletions

View file

@ -1,4 +1,4 @@
return { return {
ensure_installed = { "lua_ls" }, ensure_installed = { "lua_ls" },
automatic_installation = true, automatic_installation = false,
} }

View file

@ -0,0 +1,5 @@
return {
ensure_installed = { "stylua", "prettier" },
automatic_installation = false,
automatic_setup = true,
}

View file

@ -0,0 +1,5 @@
return {
ensure_installed = {},
automatic_installation = false,
automatic_setup = true,
}

View file

@ -16,6 +16,8 @@ end
require("mason").setup() require("mason").setup()
require("mason-lspconfig").setup(require "config.mason_lspconfig") require("mason-lspconfig").setup(require "config.mason_lspconfig")
require("mason-null-ls").setup(require "config.mason_null_ls")
require("mason-nvim-dap").setup()
require("neodev").setup() require("neodev").setup()
M.on_attach = require "lsp.attach" M.on_attach = require "lsp.attach"
@ -31,5 +33,13 @@ require("mason-lspconfig").setup_handlers {
} }
end, end,
} }
require("null-ls").setup {
sources = require "lsp.null_ls_sources",
on_attach = M.on_attach,
flags = M.lsp_flags,
capabilities = M.capabilities,
}
require("mason-null-ls").setup_handlers()
require("mason-nvim-dap").setup_handlers()
return M return M

View file

@ -1,13 +1,7 @@
local null_ls = require "null-ls" local null_ls = require "null-ls"
return { return {
null_ls.builtins.code_actions.gitsigns, null_ls.builtins.code_actions.gitsigns,
null_ls.builtins.diagnostics.mypy,
null_ls.builtins.diagnostics.zsh, null_ls.builtins.diagnostics.zsh,
null_ls.builtins.formatting.black,
null_ls.builtins.formatting.isort,
null_ls.builtins.formatting.trim_whitespace, null_ls.builtins.formatting.trim_whitespace,
null_ls.builtins.formatting.stylua,
null_ls.builtins.formatting.shfmt,
null_ls.builtins.formatting.prettier,
null_ls.builtins.hover.dictionary, null_ls.builtins.hover.dictionary,
} }

View file

@ -15,13 +15,7 @@ return {
{ "windwp/nvim-autopairs" }, { "windwp/nvim-autopairs" },
}, },
config = function() config = function()
local config = require "lsp.config" require "lsp.config"
require("null-ls").setup {
sources = require "lsp.null_ls_sources",
on_attach = config.on_attach,
flags = config.lsp_flags,
capabilities = config.capabilities,
}
require "lsp.cmp" require "lsp.cmp"
end, end,
}, },
@ -42,5 +36,6 @@ return {
cmd = "CmpStatus", cmd = "CmpStatus",
}, },
{ "jose-elias-alvarez/null-ls.nvim", dependencies = { "neovim/nvim-lspconfig" }, lazy = true }, { "jose-elias-alvarez/null-ls.nvim", dependencies = { "neovim/nvim-lspconfig" }, lazy = true },
{ "mfussenegger/nvim-dap", dependencies = {"neovim/nvim-lspconfig"}, lazy = true },
{ "folke/neodev.nvim", dependencies = { "neovim/nvim-lspconfig", "hrsh7th/nvim-cmp" }, lazy = true }, { "folke/neodev.nvim", dependencies = { "neovim/nvim-lspconfig", "hrsh7th/nvim-cmp" }, lazy = true },
} }

View file

@ -12,4 +12,20 @@ return {
}, },
lazy = true, lazy = true,
}, },
{
"jay-babu/mason-null-ls.nvim",
dependencies = {
"jose-elias-alvarez/null-ls.nvim",
"neovim/nvim-lspconfig",
},
lazy = true,
},
{
"jay-babu/mason-nvim-dap.nvim",
dependencies = {
"mfussenegger/nvim-dap",
"neovim/nvim-lspconfig",
},
lazy = true,
},
} }