diff --git a/lazy-lock.json b/lazy-lock.json index 2b17856..130dbf7 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -20,12 +20,15 @@ "multicursor.nvim": { "branch": "1.0", "commit": "ffe2e402e85150516d096842f7be99fd1321a72b" }, "neoconf.nvim": { "branch": "main", "commit": "a7b03bc23971ea9d569da70e21817d9d49b78c19" }, "nvim-dap": { "branch": "master", "commit": "7523676a4be17644587aa47e4d42f6f7646d4727" }, + "nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" }, + "nvim-dap-virtual-text": { "branch": "master", "commit": "fbdb48c2ed45f4a8293d0d483f7730d24467ccb6" }, "nvim-genghis": { "branch": "main", "commit": "cdf584d05ffc9d5c1f247079991552249e4f7487" }, "nvim-jdtls": { "branch": "master", "commit": "b69924ca90014fef485ee153571bdcbc1ece8c2e" }, "nvim-lint": { "branch": "master", "commit": "0864f81c681e15d9bdc1156fe3a17bd07db5a3ed" }, "nvim-lspconfig": { "branch": "master", "commit": "d9879110d0422a566fa01d732556f4d5515e1738" }, "nvim-luadev": { "branch": "master", "commit": "3ba0c02c378503739f1fdb95cff3ea2aad48db3e" }, "nvim-metals": { "branch": "main", "commit": "db6c9ffb32ec698b96d11cba1317dccc26f5c16d" }, + "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, "nvim-quick-switcher": { "branch": "main", "commit": "b56ba55cff165ae1551836a79313933bf4d43ae2" }, "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, "nvim-treesitter-context": { "branch": "master", "commit": "41847d3dafb5004464708a3db06b14f12bde548a" }, diff --git a/lua/plugins/conform.lua b/lua/plugins/conform.lua index 93322cb..a3e85df 100644 --- a/lua/plugins/conform.lua +++ b/lua/plugins/conform.lua @@ -23,7 +23,7 @@ return { javascript = { "prettierd", "prettier", stop_after_first = true }, }, -- Set up format-on-save - format_on_save = { timeout_ms = 500, lsp_fallback = true }, + --format_on_save = { timeout_ms = 500, lsp_fallback = true }, -- Customize formatters formatters = { shfmt = { diff --git a/lua/plugins/dap.lua b/lua/plugins/dap.lua new file mode 100644 index 0000000..eaff0c6 --- /dev/null +++ b/lua/plugins/dap.lua @@ -0,0 +1,60 @@ +return { + { + "mfussenegger/nvim-dap", + config = function() + local dap = require("dap") + dap.adapters["pwa-node"] = { + type = "server", + host = "localhost", + port = "${port}", + executable = { + command = "js-debug-adapter", + args = { "${port}" }, + } + } + dap.configurations.javascript = { + { + type = "pwa-node", + request = "launch", + name = "Launch file", + program = "${file}", + cwd = "${workspaceFolder}", + }, + { + type = 'pwa-node', + request = 'attach', + name = 'Attach to Node app', + address = 'localhost', + port = 9229, + cwd = '${workspaceFolder}', + restart = true, + }, + } + end + }, + { + "rcarriga/nvim-dap-ui", + dependencies = { "mfussenegger/nvim-dap", "nvim-neotest/nvim-nio" }, + config = function(opts) + local dap, dapui = require("dap"), require("dapui") + dapui.setup(opts) + dap.listeners.before.attach.dapui_config = function() + dapui.open() + end + dap.listeners.before.launch.dapui_config = function() + dapui.open() + end + dap.listeners.before.event_terminated.dapui_config = function() + dapui.close() + end + dap.listeners.before.event_exited.dapui_config = function() + dapui.close() + end + end, + }, + { + "theHamsta/nvim-dap-virtual-text", + dependencies = { "mfussenegger/nvim-dap", "nvim-treesitter/nvim-treesitter" } + } + +} diff --git a/lua/plugins/lazydev.lua b/lua/plugins/lazydev.lua index 571212f..f0afd20 100644 --- a/lua/plugins/lazydev.lua +++ b/lua/plugins/lazydev.lua @@ -7,6 +7,7 @@ return { -- See the configuration section for more details -- Load luvit types when the `vim.uv` word is found { path = "${3rd}/luv/library", words = { "vim%.uv" } }, + "nvim-dap-ui" }, }, }, @@ -46,9 +47,9 @@ return { completion = { documentation = { auto_show = false }, list = { selection = { preselect = false, auto_insert = true } }, + ghost_text = { enabled = true }, }, fuzzy = { implementation = "prefer_rust_with_warning" }, - ghost_text = { enabled = true }, }, opts_extend = { "sources.default" }, }, diff --git a/lua/plugins/ui.lua b/lua/plugins/ui.lua index 7d5f458..620c3fe 100644 --- a/lua/plugins/ui.lua +++ b/lua/plugins/ui.lua @@ -23,22 +23,22 @@ return { --}, config = function() local highlightLines = { - "RainbowRed", + "RainbowCyan", "RainbowYellow", "RainbowBlue", "RainbowOrange", "RainbowGreen", "RainbowViolet", - "RainbowCyan", + "RainbowRed", } local highlightDimLines = { - "RainbowDimRed", + "RainbowDimCyan", "RainbowDimYellow", "RainbowDimBlue", "RainbowDimOrange", "RainbowDimGreen", "RainbowDimViolet", - "RainbowDimCyan", + "RainbowDimRed", } local hooks = require 'ibl.hooks'