lsp now uses lspconfig
This commit is contained in:
48
nvim/.config/nvim/lua/plugin/dap/zig.lua
Normal file
48
nvim/.config/nvim/lua/plugin/dap/zig.lua
Normal file
@ -0,0 +1,48 @@
|
||||
local dap = require('dap')
|
||||
|
||||
dap.adapters.lldb = {
|
||||
id = 'lldb',
|
||||
type = 'executable',
|
||||
command = 'lldb-dap',
|
||||
}
|
||||
|
||||
dap.configurations.zig = {
|
||||
{
|
||||
name = 'Run executable (lldb)',
|
||||
type = 'lldb',
|
||||
request = 'launch',
|
||||
program = function()
|
||||
local path = vim.fn.input({
|
||||
prompt = 'Path to executable: ',
|
||||
default = vim.fn.getcwd() .. '/',
|
||||
completion = 'file',
|
||||
})
|
||||
return (path and path ~= '') and path or dap.ABORT
|
||||
end,
|
||||
},
|
||||
{
|
||||
name = 'Run executable with arguments (lldb)',
|
||||
type = 'lldb',
|
||||
request = 'launch',
|
||||
program = function()
|
||||
local path = vim.fn.input({
|
||||
prompt = 'Path to executable: ',
|
||||
default = vim.fn.getcwd() .. '/',
|
||||
completion = 'file',
|
||||
})
|
||||
return (path and path ~= '') and path or dap.ABORT
|
||||
end,
|
||||
args = function()
|
||||
local args_str = vim.fn.input({
|
||||
prompt = 'Arguments: ',
|
||||
})
|
||||
return vim.split(args_str, ' +')
|
||||
end
|
||||
},
|
||||
{
|
||||
name = 'Attach to process (lldb)',
|
||||
type = 'lldb',
|
||||
request = 'lldb',
|
||||
processId = require('dap.utils').pick_process,
|
||||
},
|
||||
}
|
Reference in New Issue
Block a user