fix(plugin/overseer,dap): Overseer not loading, simplify DAP config (a bit)

This commit is contained in:
Jiří Štefka 2024-12-03 03:12:40 +01:00
parent 3fd70395b5
commit a0aae4711d
Signed by: jiriks74
GPG key ID: 1D5E30D3DB2264DE
2 changed files with 7 additions and 5 deletions
nvim/ftplugin

View file

@ -11,10 +11,12 @@ local root_files = {
'.git',
}
local root = vim.fs.dirname(vim.fs.find(root_files, { upward = true })[1])
vim.lsp.start {
name = 'clangd',
cmd = { 'clangd' },
root_dir = vim.fs.dirname(vim.fs.find(root_files, { upward = true })[1]),
root_dir = root,
capabilities = require('user.lsp').make_client_capabilities(),
filetypes = { "c" },
on_attach = function(client, bufnr)
@ -39,7 +41,7 @@ if vim.fn.executable('gdb') == 1 then
end
-- DAP loads this automatically as of now. May be needed to load the debugger for asm?
-- if require('user.file_exists').file_exists(vim.fs.dirname(vim.fs.find(root_files, { upward = true })[1]) .. "/.vscode/launch.json") then
-- if require('user.file_exists').file_exists(root .. "/.vscode/launch.json") then
-- require("dap.ext.vscode").load_launchjs(nil, { cppdbg = { "c", "cpp", "asm" } })
-- require("dap.ext.vscode").load_launchjs(nil, { gdb = { "c", "cpp", "asm" } })
-- end