feat: support dap
This commit is contained in:
@@ -7,10 +7,12 @@ vim.api.nvim_create_autocmd("InsertLeave", {
|
||||
-- Disable the concealing in some file formats
|
||||
-- The default conceallevel is 3 in LazyVim
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = {"*.js","*.tsx","*.ts", "*.json", "*.jsonc", "*.markdown","*.md" },
|
||||
pattern = {"js","tsx","ts", "json", "jsonc", "markdown","md","css","html" },
|
||||
callback = function()
|
||||
vim.opt.conceallevel = 0
|
||||
vim.o.tabstop = 2
|
||||
vim.o.shiftwidth = 2
|
||||
vim.bo.tabstop = 2
|
||||
vim.bo.softtabstop = 2
|
||||
vim.bo.shiftwidth = 2
|
||||
vim.bo.expand = true
|
||||
end,
|
||||
})
|
||||
|
||||
@@ -14,6 +14,7 @@ require("lazy").setup({
|
||||
{ import = "lazyvim.plugins.extras.lang.typescript" },
|
||||
{ import = "lazyvim.plugins.extras.lang.json" },
|
||||
{ import = "lazyvim.plugins.extras.lang.go" },
|
||||
{ import = "lazyvim.plugins.extras.dap.core" },
|
||||
{ import = "lazyvim.plugins.extras.formatting.prettier" },
|
||||
-- { import = "lazyvim.plugins.extras.ui.mini-animate" },
|
||||
-- import/override with your plugins
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
return {
|
||||
"leoluz/nvim-dap-go",
|
||||
keys = {
|
||||
{ "<F5>", function() require("dap").continue({ before = get_args }) end, desc = "Run with Args" },
|
||||
{ "<F6>",":lua require('dap-go').debug_test()<cr>", desc = "Debug Test" },
|
||||
{ "<F9>", function() require("dap").toggle_breakpoint() end, desc = "Toggle Breakpoint" },
|
||||
{ "<F10>", function() require("dap").step_over() end, desc = "Step Over" },
|
||||
{ "<F11>", function() require("dap").step_into() end, desc = "Step Into" },
|
||||
{ "<S-F11>", function() require("dap").step_out() end, desc = "Step Out" },
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user