diff --git a/.config/nvim/lua/plugins/dap.lua b/.config/nvim/lua/plugins/dap.lua new file mode 100644 index 0000000..477cb39 --- /dev/null +++ b/.config/nvim/lua/plugins/dap.lua @@ -0,0 +1,14 @@ +require("dap") +local map = require('dln.utils').map +local silent = { silent = true } + +vim.fn.sign_define("DapStopped", { text = "⇒", texthl = "", linehl = "debugPC", numhl = "" }) +vim.fn.sign_define("DapBreakpoint", { text = "🧘", texthl = "", linehl = "debugPC", numhl = "" }) + +map("n", "DD", ":lua require 'dap'.toggle_breakpoint()", silent) +map("n", "Dc", ":lua require 'dap'.continue()", silent) +map("n", "Di", ":lua require 'dap'.step_into()", silent) +map("n", "Do", ":lua require 'dap'.step_over()", silent) +map("n", "DO", ":lua require 'dap'.step_out()", silent) +map("n", "Dr", ":lua require 'dap'.repl.toggle({height = 5})", silent) +map("n", "Dh", ":lua require 'dap.ui.widgets'.hover()", silent) diff --git a/.config/nvim/lua/plugins/null-ls.lua b/.config/nvim/lua/plugins/null-ls.lua new file mode 100644 index 0000000..afaf1d4 --- /dev/null +++ b/.config/nvim/lua/plugins/null-ls.lua @@ -0,0 +1,13 @@ +local null_ls = require("null-ls") +local builtins = require("null-ls.builtins") + +null_ls.setup({ + sources = { + require("null-ls").builtins.formatting.prettierd, + require("null-ls").builtins.formatting.protolint, + require("null-ls").builtins.formatting.stylua, + require("null-ls").builtins.diagnostics.eslint, + require("null-ls").builtins.completion.spell, + }, + debug = true, +}) diff --git a/.config/nvim/lua/plugins/nvim-dap-go.lua b/.config/nvim/lua/plugins/nvim-dap-go.lua new file mode 100644 index 0000000..eb8ae9a --- /dev/null +++ b/.config/nvim/lua/plugins/nvim-dap-go.lua @@ -0,0 +1,6 @@ +local dapgo = require('dap-go') +local map = require('dln.utils').map +local silent = { silent=true } + +dapgo.setup() +map("n", "y", ":lua require('dap-go').debug_test()", silent)