fix(plugin/overseer,dap): Overseer not loading, simplify DAP config (a bit)
This commit is contained in:
parent
3fd70395b5
commit
a0aae4711d
@ -11,10 +11,12 @@ local root_files = {
|
|||||||
'.git',
|
'.git',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
local root = vim.fs.dirname(vim.fs.find(root_files, { upward = true })[1])
|
||||||
|
|
||||||
vim.lsp.start {
|
vim.lsp.start {
|
||||||
name = 'clangd',
|
name = 'clangd',
|
||||||
cmd = { '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(),
|
capabilities = require('user.lsp').make_client_capabilities(),
|
||||||
filetypes = { "c" },
|
filetypes = { "c" },
|
||||||
on_attach = function(client, bufnr)
|
on_attach = function(client, bufnr)
|
||||||
@ -39,7 +41,7 @@ if vim.fn.executable('gdb') == 1 then
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- DAP loads this automatically as of now. May be needed to load the debugger for asm?
|
-- 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, { cppdbg = { "c", "cpp", "asm" } })
|
||||||
-- require("dap.ext.vscode").load_launchjs(nil, { gdb = { "c", "cpp", "asm" } })
|
-- require("dap.ext.vscode").load_launchjs(nil, { gdb = { "c", "cpp", "asm" } })
|
||||||
-- end
|
-- end
|
||||||
|
@ -8,7 +8,7 @@ local file_exists = require("user.file_exists").file_exists
|
|||||||
require("which-key").add({
|
require("which-key").add({
|
||||||
{ "<leader>o", group = "[o]verseer", icon = "" },
|
{ "<leader>o", group = "[o]verseer", icon = "" },
|
||||||
{ "<leader>ot", "<Cmd>OverseerToggle<CR>", desc = "[o]verseer: [t]oggle " },
|
{ "<leader>ot", "<Cmd>OverseerToggle<CR>", desc = "[o]verseer: [t]oggle " },
|
||||||
{ "<leader>oc", "<Cmd>OverseerRunCmd<CR>", desc = "[o]verseer: run [c]ommand" },
|
{ "<leader>oc", "<Cmd>OverseerRunCmd<CR>", desc = "[o]verseer: run [c]ommand" },
|
||||||
{ "<leader>or", "<Cmd>OverseerRun<CR>", desc = "[o]verseer: [r]un task" },
|
{ "<leader>or", "<Cmd>OverseerRun<CR>", desc = "[o]verseer: [r]un task" },
|
||||||
{ "<leader>oq", "<Cmd>OverseerQuickAction<CR>", desc = "[o]verseer: [q]uick action" },
|
{ "<leader>oq", "<Cmd>OverseerQuickAction<CR>", desc = "[o]verseer: [q]uick action" },
|
||||||
{ "<leader>oa", "<Cmd>OverseerTaskAction<CR>", desc = "[o]verseer: task [a]ction" },
|
{ "<leader>oa", "<Cmd>OverseerTaskAction<CR>", desc = "[o]verseer: task [a]ction" },
|
||||||
@ -20,10 +20,10 @@ local root_files = {
|
|||||||
'.git',
|
'.git',
|
||||||
}
|
}
|
||||||
|
|
||||||
local root = vim.fs.find(root_files, { upward = true })[1]
|
local root = vim.fs.dirname(vim.fs.find(root_files, { upward = true })[1])
|
||||||
|
|
||||||
if root then
|
if root then
|
||||||
if file_exists(root .. ".vscode/tasks.json") then
|
if file_exists(root .. "/.vscode/tasks.json") then
|
||||||
require('overseer').setup({
|
require('overseer').setup({
|
||||||
strategy = {
|
strategy = {
|
||||||
"toggleterm",
|
"toggleterm",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user