diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 55b8979..74740c5 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -1 +1,2 @@ +require("config.options") require("config.lazy") diff --git a/.config/nvim/lua/plugins/dap.lua b/.config/nvim/lua/plugins/dap.lua index aeec64d..c31328f 100644 --- a/.config/nvim/lua/plugins/dap.lua +++ b/.config/nvim/lua/plugins/dap.lua @@ -1,8 +1,6 @@ -local M = { +return { "mfussenegger/nvim-dap", - dependencies = { - { "rcarriga/nvim-dap-ui" }, { "theHamsta/nvim-dap-virtual-text", config = function() @@ -16,24 +14,40 @@ local M = { config = function() require("dap-go").setup() end, - keys = { - { "y", ":lua require('dap-go').debug_test()" }, - }, }, }, + keys = { + { "DD", ":lua require'dap'.toggle_breakpoint()", desc = "Toggle Breakpoint" }, + { "Dc", ":lua require'dap'.continue()", desc = "Continue" }, + { "Di", ":lua require'dap'.step_into()", desc = "Step Into" }, + { "Do", ":lua require'dap'.step_over()", desc = "Step Over" }, + { "DO", ":lua require'dap'.step_out()", desc = "Step Out" }, + { "Dh", ":lua require'dap.ui.widgets'.hover()", desc = "Hover" }, + { "Dr", ":lua require'dap'.repl.toggle({height = 5})", desc = "Toogle Repl" }, + }, + config = function() + require("dap") + require("dap.ext.vscode").load_launchjs() + + vim.fn.sign_define( + "DapBreakpoint", + { text = "", texthl = "DapBreakpoint", linehl = "DapBreakpoint", numhl = "DapBreakpoint" } + ) + vim.fn.sign_define( + "DapBreakpointCondition", + { text = "ﳁ", texthl = "DapBreakpoint", linehl = "DapBreakpoint", numhl = "DapBreakpoint" } + ) + vim.fn.sign_define( + "DapBreakpointRejected", + { text = "", texthl = "DapBreakpoint", linehl = "DapBreakpoint", numhl = "DapBreakpoint" } + ) + vim.fn.sign_define( + "DapLogPoint", + { text = "", texthl = "DapLogPoint", linehl = "DapLogPoint", numhl = "DapLogPoint" } + ) + vim.fn.sign_define( + "DapStopped", + { text = "", texthl = "DapStopped", linehl = "DapStopped", numhl = "DapStopped" } + ) + end, } - -function M.init() - local silent = { silent = true } - vim.fn.sign_define("DapStopped", { text = "⇒", texthl = "", linehl = "debugPC", numhl = "" }) - vim.fn.sign_define("DapBreakpoint", { text = "🧘", texthl = "", linehl = "debugPC", numhl = "" }) - vim.keymap.set("n", "DD", ":lua require 'dap'.toggle_breakpoint()", silent) - vim.keymap.set("n", "Dc", ":lua require 'dap'.continue()", silent) - vim.keymap.set("n", "Di", ":lua require 'dap'.step_into()", silent) - vim.keymap.set("n", "Do", ":lua require 'dap'.step_over()", silent) - vim.keymap.set("n", "DO", ":lua require 'dap'.step_out()", silent) - vim.keymap.set("n", "Dr", ":lua require 'dap'.repl.toggle({height = 5})", silent) - vim.keymap.set("n", "Dh", ":lua require 'dap.ui.widgets'.hover()", silent) -end - -return M diff --git a/.config/nvim/lua/plugins/misc.lua b/.config/nvim/lua/plugins/misc.lua index 4689229..24391dd 100644 --- a/.config/nvim/lua/plugins/misc.lua +++ b/.config/nvim/lua/plugins/misc.lua @@ -104,13 +104,13 @@ return { end, }, - { - url = "https://git.sr.ht/~whynothugo/lsp_lines.nvim", - config = function() - require("lsp_lines").setup() - vim.diagnostic.config({ - virtual_text = false, - }) - end, - }, + -- { + -- url = "https://git.sr.ht/~whynothugo/lsp_lines.nvim", + -- config = function() + -- require("lsp_lines").setup() + -- vim.diagnostic.config({ + -- virtual_text = false, + -- }) + -- end, + -- }, } diff --git a/.config/nvim/lua/plugins/null-ls.lua b/.config/nvim/lua/plugins/null-ls.lua index 1a74e9c..f8bab18 100644 --- a/.config/nvim/lua/plugins/null-ls.lua +++ b/.config/nvim/lua/plugins/null-ls.lua @@ -15,6 +15,7 @@ function M.config() builtins.formatting.shfmt, builtins.formatting.sqlfluff, builtins.formatting.buildifier, + builtins.formatting.prettierd, builtins.completion.spell, builtins.code_actions.eslint_d, builtins.diagnostics.buf.with({ diff --git a/.config/nvim/lua/plugins/telescope.lua b/.config/nvim/lua/plugins/telescope.lua index 4848f50..cb54946 100644 --- a/.config/nvim/lua/plugins/telescope.lua +++ b/.config/nvim/lua/plugins/telescope.lua @@ -26,7 +26,7 @@ function M.config() vim.keymap.set("n", "f", 'lua require("telescope.builtin").oldfiles()') vim.keymap.set("n", "", 'lua require("telescope.builtin").oldfiles({cwd_only=true})') vim.keymap.set("n", "", 'lua require("telescope.builtin").oldfiles()') - vim.keymap.set("n", "d", 'lua require("telescope.builtin").diagnostics()') + vim.keymap.set("n", "d", 'lua require("telescope.builtin").diagnostics({bufnr=0})') vim.keymap.set("n", "e", 'lua require("telescope.builtin").git_files()') vim.keymap.set("n", "g", 'lua require("telescope.builtin").git_status()') vim.keymap.set("n", "a", 'lua require("telescope.builtin").lsp_code_actions()')