diff --git a/lua/plugins/cmake-tools.lua b/lua/plugins/cmake-tools.lua index 6cedfc1..5857b24 100644 --- a/lua/plugins/cmake-tools.lua +++ b/lua/plugins/cmake-tools.lua @@ -5,6 +5,7 @@ return { cmake_generate_options = { "-D", "CMAKE_EXPORT_COMPILE_COMMANDS=1", '-G', 'Ninja' }, cmake_show_console = "always", cmake_build_directory = "build_nvim", + cmake_dap_configuration = { name = "cpp", type = "codelldb", request = "launch" }, -- dap configuration, optional }, cmd = { 'CMakeGenerate', @@ -24,4 +25,13 @@ return { 'CMakeClean', 'CMakeStop', }, + keys = { + { + '', + function() + require('cmake-tools').debug({}) + end, + desc = 'Run and debug target from cmake' + } + } }