diff options
| author | Kyren223 <Kyren223@proton.me> | 2025-04-24 11:36:39 +0300 |
|---|---|---|
| committer | Kyren223 <Kyren223@proton.me> | 2025-04-24 11:36:39 +0300 |
| commit | 6bef8f32b19778fdfe52f0eb39719425508dcc7b (patch) | |
| tree | f293141ed7e8676b76bb06c07a0fa9472b10e2ac /.config/nvim/lua/custom/plugins/nvim-dap.lua | |
| parent | dbd9a6fdd0c44e26b200fb706aacd120a2e09c47 (diff) | |
Refactored nvim config to make it easier and less insanely nested
Diffstat (limited to '.config/nvim/lua/custom/plugins/nvim-dap.lua')
| -rw-r--r-- | .config/nvim/lua/custom/plugins/nvim-dap.lua | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/.config/nvim/lua/custom/plugins/nvim-dap.lua b/.config/nvim/lua/custom/plugins/nvim-dap.lua deleted file mode 100644 index a6387dc..0000000 --- a/.config/nvim/lua/custom/plugins/nvim-dap.lua +++ /dev/null @@ -1,58 +0,0 @@ -return { - 'mfussenegger/nvim-dap', - dependencies = { 'williamboman/mason.nvim' }, - -- NOTE:nvim-dap has no setup function - -- if there is just opts, lazy will attempt to call setup which causes an error - -- Having an empty config function makes lazy not call setup which fixes the issue - config = function() end, - opts = function() - -- Load dap keymaps - require('custom.config.dap-keymaps') - local dap = require('dap') - - -- Setup C/C++ dap - if not dap.adapters['codelldb'] then - dap.adapters['codelldb'] = { - type = 'server', - host = 'localhost', - port = '${port}', - executable = { - command = 'codelldb', - args = { - '--port', - '${port}', - }, - }, - } - end - for _, lang in ipairs({ 'c', 'cpp' }) do - dap.configurations[lang] = { - { - type = 'codelldb', - request = 'launch', - name = 'Launch file', - program = function() - if vim.g.dap_codelldb_exe then - return vim.fn.getcwd() .. '/' .. vim.g.dap_codelldb_exe - end - return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file') - end, - args = function() - if vim.g.dap_codelldb_args then - return vim.g.dap_codelldb_args - end - return {} - end, - cwd = '${workspaceFolder}', - }, - { - type = 'codelldb', - request = 'attach', - name = 'Attach to process', - pid = require('dap.utils').pick_process, - cwd = '${workspaceFolder}', - }, - } - end - end, -} |
