From eb1e6c6c345c4a588c28d2937949adc1b440133f Mon Sep 17 00:00:00 2001 From: Naz Date: Tue, 2 Sep 2025 10:12:27 +0100 Subject: =?UTF-8?q?=F0=9F=A6=84org:=20now=20using=20an=20org=20document=20?= =?UTF-8?q?to=20configure=20nvim.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I know I messed up --- lua/plugins/debugging.lua | 130 ++++++++++++++++++++++++++-------------------- 1 file changed, 74 insertions(+), 56 deletions(-) (limited to 'lua/plugins/debugging.lua') diff --git a/lua/plugins/debugging.lua b/lua/plugins/debugging.lua index 0479f28..434fef8 100644 --- a/lua/plugins/debugging.lua +++ b/lua/plugins/debugging.lua @@ -1,68 +1,86 @@ return { - "mfussenegger/nvim-dap", - dependencies = { - "rcarriga/nvim-dap-ui", - "nvim-neotest/nvim-nio", - }, + { + "mfussenegger/nvim-dap", + dependencies = { + "rcarriga/nvim-dap-ui", + "nvim-neotest/nvim-nio", + }, - config = function() - local dap, dapui = require("dap"), require("dapui") + config = function() + local dap, dapui = require("dap"), require("dapui") - require("dapui").setup() + require("dapui").setup() - 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 + 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 - dap.adapters.lldb = { - type = "executable", - command = "/usr/bin/lldb-vscode", - name = "lldb", - } + dap.adapters.lldb = { + type = "executable", + command = "/usr/bin/lldb-vscode", + name = "lldb", + } - dap.configurations.rust = { - { - name = "Launch", - type = "lldb", - request = "launch", - program = function() - return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/", "file") - end, - cwd = "${workspaceFolder}", - stopOnEntry = false, - args = {}, + dap.configurations.rust = { + { + name = "Launch", + type = "lldb", + request = "launch", + program = function() + return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/", "file") + end, + cwd = "${workspaceFolder}", + stopOnEntry = false, + args = {}, - initCommands = function() - -- Find out where to look for the pretty printer Python module - local rustc_sysroot = vim.fn.trim(vim.fn.system("rustc --print sysroot")) + initCommands = function() + -- Find out where to look for the pretty printer Python module + local rustc_sysroot = vim.fn.trim(vim.fn.system("rustc --print sysroot")) - local script_import = 'command script import "' - .. rustc_sysroot - .. '/lib/rustlib/etc/lldb_lookup.py"' - local commands_file = rustc_sysroot .. "/lib/rustlib/etc/lldb_commands" + local script_import = 'command script import "' + .. rustc_sysroot + .. '/lib/rustlib/etc/lldb_lookup.py"' + local commands_file = rustc_sysroot .. "/lib/rustlib/etc/lldb_commands" - local commands = {} - local file = io.open(commands_file, "r") - if file then - for line in file:lines() do - table.insert(commands, line) + local commands = {} + local file = io.open(commands_file, "r") + if file then + for line in file:lines() do + table.insert(commands, line) + end + file:close() end - file:close() - end - table.insert(commands, 1, script_import) + table.insert(commands, 1, script_import) - return commands - end, - }, - } - end, + return commands + end, + }, + } + end, + }, + { + "kristijanhusak/vim-dadbod-ui", + dependencies = { + { "tpope/vim-dadbod", lazy = true }, + { "kristijanhusak/vim-dadbod-completion", ft = { "sql", "mysql", "plsql", "sqloracle" }, lazy = true }, + }, + cmd = { + "DBUI", + "DBUIToggle", + "DBUIAddConnection", + "DBUIFindBuffer", + }, + init = function() + vim.g.db_ui_use_nerd_fonts = 1 + end, + }, } -- cgit v1.2.3