nvim,tmux,kitty: full config overhaul (AstroNvim → native 0.12)
Replaces AstroNvim v5 with from-scratch Neovim 0.12 config using vim.lsp.config()/vim.lsp.enable() natively, lazy.nvim, blink.cmp, and smart-splits tmux integration. tmux: new C-Space prefix, hjkl pane nav, resize key table, tpm plugins. kitty: add allow_remote_control for smart-splits.
This commit is contained in:
79
dot_config/nvim/lua/plugins/dap/init.lua
Normal file
79
dot_config/nvim/lua/plugins/dap/init.lua
Normal file
@@ -0,0 +1,79 @@
|
||||
return {
|
||||
-- Debug Adapter Protocol base
|
||||
{
|
||||
"mfussenegger/nvim-dap",
|
||||
dependencies = {
|
||||
"rcarriga/nvim-dap-ui",
|
||||
"theHamsta/nvim-dap-virtual-text",
|
||||
"nvim-neotest/nvim-nio",
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>db", function() require("dap").toggle_breakpoint() end, desc = "Toggle breakpoint" },
|
||||
{ "<leader>dB", function() require("dap").set_breakpoint(vim.fn.input("Condition: ")) end, desc = "Conditional breakpoint" },
|
||||
{ "<leader>dc", function() require("dap").continue() end, desc = "Continue" },
|
||||
{ "<leader>di", function() require("dap").step_into() end, desc = "Step into" },
|
||||
{ "<leader>do", function() require("dap").step_over() end, desc = "Step over" },
|
||||
{ "<leader>dO", function() require("dap").step_out() end, desc = "Step out" },
|
||||
{ "<leader>dr", function() require("dap").repl.open() end, desc = "Open REPL" },
|
||||
{ "<leader>du", function() require("dapui").toggle() end, desc = "Toggle DAP UI" },
|
||||
{ "<leader>dv", function() require("nvim-dap-virtual-text").toggle() end, desc = "Toggle virtual text" },
|
||||
},
|
||||
config = function()
|
||||
local dap = require("dap")
|
||||
local dapui = require("dapui")
|
||||
|
||||
-- Auto-open/close DAP UI
|
||||
dap.listeners.after.event_initialized["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
|
||||
|
||||
-- Load language-specific configs
|
||||
require("plugins.dap.rust")
|
||||
require("plugins.dap.js")
|
||||
end,
|
||||
},
|
||||
|
||||
-- DAP UI panels
|
||||
{
|
||||
"rcarriga/nvim-dap-ui",
|
||||
lazy = true,
|
||||
dependencies = { "mfussenegger/nvim-dap", "nvim-neotest/nvim-nio" },
|
||||
opts = {
|
||||
icons = { expanded = "", collapsed = "", current_frame = "" },
|
||||
layouts = {
|
||||
{
|
||||
elements = {
|
||||
{ id = "scopes", size = 0.25 },
|
||||
{ id = "breakpoints", size = 0.25 },
|
||||
{ id = "stacks", size = 0.25 },
|
||||
{ id = "watches", size = 0.25 },
|
||||
},
|
||||
size = 40,
|
||||
position = "left",
|
||||
},
|
||||
{
|
||||
elements = {
|
||||
{ id = "repl", size = 0.5 },
|
||||
{ id = "console", size = 0.5 },
|
||||
},
|
||||
size = 10,
|
||||
position = "bottom",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- Inline variable values during debug session
|
||||
{
|
||||
"theHamsta/nvim-dap-virtual-text",
|
||||
lazy = true,
|
||||
opts = {
|
||||
enabled = true,
|
||||
enabled_commands = true,
|
||||
highlight_changed_variables = true,
|
||||
highlight_new_as_changed = false,
|
||||
commented = false,
|
||||
virt_text_pos = "eol",
|
||||
},
|
||||
},
|
||||
}
|
||||
41
dot_config/nvim/lua/plugins/dap/js.lua
Normal file
41
dot_config/nvim/lua/plugins/dap/js.lua
Normal file
@@ -0,0 +1,41 @@
|
||||
local M = {}
|
||||
|
||||
local function setup()
|
||||
local dap = require("dap")
|
||||
local mason_path = vim.fn.stdpath("data") .. "/mason/packages/js-debug-adapter"
|
||||
|
||||
dap.adapters["pwa-node"] = {
|
||||
type = "server",
|
||||
host = "localhost",
|
||||
port = "${port}",
|
||||
executable = {
|
||||
command = "node",
|
||||
args = { mason_path .. "/js-debug/src/dapDebugServer.js", "${port}" },
|
||||
},
|
||||
}
|
||||
|
||||
local js_config = {
|
||||
{
|
||||
type = "pwa-node",
|
||||
request = "launch",
|
||||
name = "Launch file",
|
||||
program = "${file}",
|
||||
cwd = "${workspaceFolder}",
|
||||
sourceMaps = true,
|
||||
},
|
||||
{
|
||||
type = "pwa-node",
|
||||
request = "attach",
|
||||
name = "Attach",
|
||||
processId = require("dap.utils").pick_process,
|
||||
cwd = "${workspaceFolder}",
|
||||
},
|
||||
}
|
||||
|
||||
for _, lang in ipairs({ "javascript", "typescript", "svelte" }) do
|
||||
dap.configurations[lang] = js_config
|
||||
end
|
||||
end
|
||||
|
||||
setup()
|
||||
return M
|
||||
43
dot_config/nvim/lua/plugins/dap/rust.lua
Normal file
43
dot_config/nvim/lua/plugins/dap/rust.lua
Normal file
@@ -0,0 +1,43 @@
|
||||
local M = {}
|
||||
|
||||
local function setup()
|
||||
local dap = require("dap")
|
||||
local mason_path = vim.fn.stdpath("data") .. "/mason/packages/codelldb"
|
||||
|
||||
dap.adapters.codelldb = {
|
||||
type = "server",
|
||||
port = "${port}",
|
||||
executable = {
|
||||
command = mason_path .. "/extension/adapter/codelldb",
|
||||
args = { "--port", "${port}" },
|
||||
},
|
||||
}
|
||||
|
||||
dap.configurations.rust = {
|
||||
{
|
||||
name = "Launch (Rust)",
|
||||
type = "codelldb",
|
||||
request = "launch",
|
||||
program = function()
|
||||
return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/target/debug/", "file")
|
||||
end,
|
||||
cwd = "${workspaceFolder}",
|
||||
stopOnEntry = false,
|
||||
args = {},
|
||||
},
|
||||
{
|
||||
name = "Launch Tauri (Rust)",
|
||||
type = "codelldb",
|
||||
request = "launch",
|
||||
program = function()
|
||||
return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/src-tauri/target/debug/", "file")
|
||||
end,
|
||||
cwd = "${workspaceFolder}/src-tauri",
|
||||
stopOnEntry = false,
|
||||
args = {},
|
||||
},
|
||||
}
|
||||
end
|
||||
|
||||
setup()
|
||||
return M
|
||||
Reference in New Issue
Block a user