Compare commits

..

No commits in common. "3c3890f7867e46cfbb376d47ce9f5a658d4dcd9a" and "f56deabf9b81789ca9e6921cec106a4ca187a44c" have entirely different histories.

3 changed files with 36 additions and 53 deletions

View File

@ -102,12 +102,6 @@ dap.adapters.godot = {
port = 6006, port = 6006,
} }
dap.adapters.gdb = {
type = "executable",
command = "gdb",
args = { "--interpreter=dap", "--eval-command", "set print pretty on" }
}
dap.configurations.gdscript = { dap.configurations.gdscript = {
{ {
type = "godot", type = "godot",
@ -117,44 +111,3 @@ dap.configurations.gdscript = {
scene = "main" scene = "main"
} }
} }
dap.configurations.c = {
{
name = "Launch",
type = "gdb",
request = "launch",
program = function()
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
end,
args = {}, -- provide arguments if needed
cwd = "${workspaceFolder}",
stopAtBeginningOfMainSubprogram = false,
},
{
name = "Select and attach to process",
type = "gdb",
request = "attach",
program = function()
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
end,
pid = function()
local name = vim.fn.input('Executable name (filter): ')
return require("dap.utils").pick_process({ filter = name })
end,
cwd = '${workspaceFolder}'
},
{
name = 'Attach to gdbserver :1234',
type = 'gdb',
request = 'attach',
target = 'localhost:1234',
program = function()
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
end,
cwd = '${workspaceFolder}'
}
}
dap.configurations.cpp = dap.configurations.c
-- TODO: could do rust, zig, odin, jai (?)

View File

@ -23,9 +23,6 @@ vim.keymap.set('n', '<leader>ss', '<cmd>Telescope spell_suggest<cr>', opts)
vim.keymap.set('n', '<leader>t', '<cmd>Telescope<cr>', opts) vim.keymap.set('n', '<leader>t', '<cmd>Telescope<cr>', opts)
local dap = require('dap') local dap = require('dap')
local widgets = require('dap.ui.widgets')
local frame_bar = widgets.sidebar(widgets.frames)
local session_bar = widgets.sidebar(widgets.sessions)
local on_attach = function(client, bufnr) local on_attach = function(client, bufnr)
client.server_capabilities.semanticTokensProvider = nil client.server_capabilities.semanticTokensProvider = nil
@ -47,10 +44,43 @@ local on_attach = function(client, bufnr)
vim.keymap.set('n', '<F11>', dap.step_into, bufopts) vim.keymap.set('n', '<F11>', dap.step_into, bufopts)
vim.keymap.set('n', '<F12>', dap.step_out, bufopts) vim.keymap.set('n', '<F12>', dap.step_out, bufopts)
--TODO: dap.ui.widgets, widgets.sidebar --TODO: dap.ui.widgets, widgets.sidebar
vim.keymap.set('n', '<leader>df', frame_bar.toggle, bufopts)
vim.keymap.set('n', '<leader>ds', session_bar.toggle, bufopts)
end end
--local lsp_flags = {
-- debounce_text_changes = 150, --wtf is this
--}
--local lspconfig = require('lspconfig');
--lspconfig.zls.setup {
-- on_attach = on_attach,
-- flags = lsp_flags,
--}
--lspconfig.gopls.setup{
-- on_attach = on_attach,
-- flags = lsp_flags,
--}
--lspconfig.clangd.setup{
-- on_attach = on_attach,
-- flags = lsp_flags,
-- handlers = {
-- ["textDocument/publishDiagnostics"] = function(err, result, ctx, config)
-- end
-- }
--}
--lspconfig.rust_analyzer.setup{
-- on_attach = on_attach,
--}
--lspconfig.ols.setup{
-- on_attach = on_attach,
--}
--lspconfig.pylsp.setup{
-- on_attach = on_attach,
-- flags = lsp_flags,
--}
--lspconfig.gdscript.setup{
-- on_attach = on_attach,
-- flags = lsp_flags,
--}
local godot_port = os.getenv 'GDScript_Port' or '6005' local godot_port = os.getenv 'GDScript_Port' or '6005'
local lsps = { local lsps = {