Shatur / neovim-cmake

CMake integration for Neovim
GNU General Public License v3.0
87 stars 19 forks source link

Questions about dap configurations #37

Closed hiuxia closed 2 years ago

hiuxia commented 2 years ago

Hello, Thank you very much for this awesome Plugin which really make it convenient to build cpp files. However, after reading a lot of documents, I can't figure out how to combine this plugin's settings with the existing c++ dap configuration.My cpp configuration lists following:

local M = {}
M.names = {
    adapters = 'lldb',
    configurations = 'cpp',
}

M.adapters = {
    type = 'executable',
    -- command = vim.fn.exepath('lldb-vscode'),
    command = 'lldb-vscode',
    -- env = {
    --     LLDB_LAUNCH_FLAG_LAUNCH_IN_TTY = 'YES',
    -- },
    name = 'lldb',
}
M.configurations = {
    {
        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 = {},
        runInTerminal = true,
        console = "integratedTerminal"
    },
}

return M

When I input the CMake debug command(after configure and build), it seems that the settings of this plugin and existing cpp dap settings(aforementioned) conflict each other. So My question is how to reset this plugin or change sth of the aforementioned cpp dap settings?(Maybe change the program part?) My English is poor, so please pardon me for the inappropriate part! Thank you!

Shatur commented 2 years ago

This plugin have separate dap setting. Just configure it as you need.

hiuxia commented 2 years ago

Thankx for your useful instant feedback! Got it!