nvim: Enable automatic installation of DAPs with mason
This commit is contained in:
parent
51595b8b81
commit
4bc0ef9ed7
3 changed files with 35 additions and 1 deletions
|
|
@ -41,6 +41,7 @@
|
|||
"markmap.nvim": { "branch": "main", "commit": "5fb6755cf5434511cc23a4936c9eb76b9142fba5" },
|
||||
"mason-conform.nvim": { "branch": "main", "commit": "f3b96fa2217fcb1513301eefbe10ea0e765e33eb" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "5477d67a5ca12b704f2a8a55a057fc79750f3dbb" },
|
||||
"mason-nvim-dap.nvim": { "branch": "main", "commit": "4c2cdc69d69fe00c15ae8648f7e954d99e5de3ea" },
|
||||
"mason-nvim-lint": { "branch": "main", "commit": "b579a00ee39dcd590b1023028dc8fb3d203a67b0" },
|
||||
"mason.nvim": { "branch": "main", "commit": "7f265cd6ae56cecdd0aa50c8c73fc593b0604801" },
|
||||
"mcphub.nvim": { "branch": "main", "commit": "85a7a659fc82da1429a2241ab61e9ce07b3db374" },
|
||||
|
|
@ -61,6 +62,7 @@
|
|||
"nvim-colorizer.lua": { "branch": "master", "commit": "517df88cf2afb36652830df2c655df2da416a0ae" },
|
||||
"nvim-coverage": { "branch": "main", "commit": "a939e425e363319d952a6c35fb3f38b34041ded2" },
|
||||
"nvim-dap": { "branch": "master", "commit": "6a5bba0ddea5d419a783e170c20988046376090d" },
|
||||
"nvim-dap-go": { "branch": "main", "commit": "8763ced35b19c8dc526e04a70ab07c34e11ad064" },
|
||||
"nvim-dap-python": { "branch": "master", "commit": "261ce649d05bc455a29f9636dc03f8cdaa7e0e2c" },
|
||||
"nvim-dap-repl-highlights": { "branch": "master", "commit": "307cff2c364d3bf02501d59c405a817967fcd5fb" },
|
||||
"nvim-dap-view": { "branch": "main", "commit": "fc0315087a871f9e74ef88559760b81dae81bc6d" },
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ local languages = {
|
|||
ts = { "bash" },
|
||||
lint = { bash = { "shellcheck" } },
|
||||
format = { bash = { "shellharden", "shfmt" } },
|
||||
dap = { "bash" },
|
||||
},
|
||||
beancount = { lsp = { beancount = {} }, ts = { "beancount" }, format = { beancount = { "bean-format" } } },
|
||||
bibtex = { ts = { "bibtex" }, format = { bib = { "bibtex-tidy" } } },
|
||||
|
|
@ -63,7 +64,13 @@ local languages = {
|
|||
format = { javascript = { "prettier" }, javascriptreact = { "prettier" } },
|
||||
},
|
||||
git = { ts = { "git_config", "git_rebase", "gitattributes", "gitcommit", "gitignore" } },
|
||||
go = { lsp = { gopls = {} }, ts = { "go" }, lint = { go = { "revive" } }, format = { go = { "gofumpt" } } },
|
||||
go = {
|
||||
lsp = { gopls = {} },
|
||||
ts = { "go" },
|
||||
lint = { go = { "revive" } },
|
||||
format = { go = { "gofumpt" } },
|
||||
dap = { "delve" },
|
||||
},
|
||||
graphql = { format = { graphql = { "prettier" } } },
|
||||
html = { format = { html = { "prettier", "rustywind" } } },
|
||||
julia = { lsp = { julials = {} }, ts = { "julia" } },
|
||||
|
|
@ -104,6 +111,7 @@ local languages = {
|
|||
lsp = { basedpyright = {}, ruff = {} },
|
||||
ts = { "python" },
|
||||
format = { python = { "ruff_format", "ruff_organize_imports" } },
|
||||
dap = { "python" },
|
||||
},
|
||||
quarto = { lint = { quarto = { "markdownlint" } }, format = { quarto = { "prettier", "injected" } } },
|
||||
sh = { lint = { sh = { "shellcheck" } }, format = { sh = { "shellharden", "shfmt" } } },
|
||||
|
|
|
|||
|
|
@ -1,3 +1,17 @@
|
|||
local function get_all_daps()
|
||||
local enabled_daps = {}
|
||||
for _, lang in pairs(Languages) do
|
||||
if not lang.dap then
|
||||
goto continue
|
||||
end
|
||||
for _, name in pairs(lang.dap) do
|
||||
table.insert(enabled_daps, name)
|
||||
end
|
||||
::continue::
|
||||
end
|
||||
return enabled_daps
|
||||
end
|
||||
|
||||
return {
|
||||
{
|
||||
"mfussenegger/nvim-dap",
|
||||
|
|
@ -26,6 +40,7 @@ return {
|
|||
},
|
||||
},
|
||||
},
|
||||
{ "jay-babu/mason-nvim-dap.nvim", opts = { ensure_installed = get_all_daps() } },
|
||||
},
|
||||
config = function()
|
||||
local dap, dv = require("dap"), require("dap-view")
|
||||
|
|
@ -156,4 +171,13 @@ return {
|
|||
require("dap-python").setup("debugpy-adapter")
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"leoluz/nvim-dap-go",
|
||||
dependencies = { { "mfussenegger/nvim-dap", optional = true } },
|
||||
ft = { "go" },
|
||||
config = function()
|
||||
require("dap-go").setup()
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue