Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(debugging): add telescope dap extension #377

Merged
merged 3 commits into from
Jul 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions lua/astrocommunity/debugging/telescope-dap-nvim/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# telescope-dap.nvim

Integration for `nvim-dap` with `telescope.nvim`.

This plugin is also overriding `dap` internal `ui`, so running any `dap` command, which makes use of the internal ui, will result in a `telescope` prompt.

**Repository:** <https://github.com/nvim-telescope/telescope-dap.nvim>

62 changes: 62 additions & 0 deletions lua/astrocommunity/debugging/telescope-dap-nvim/init.lua
owittek marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
local prefix = "<leader>fd"

return {
{
"nvim-telescope/telescope-dap.nvim",
name = "telescope_dap",
event = "User AstroFile",
keys = {
{
prefix .. "c",
"<Cmd>lua require('telescope').extensions.dap.commands{}<CR>",
{ silent = true, expr = false },
mode = {
"n",
},
desc = "Telescope DAP commands",
},
{
prefix .. "g",
"<Cmd>lua require('telescope').extensions.dap.configurations{}<CR>",
{ silent = true, expr = false },
mode = {
"n",
},
desc = "Telescope DAP configurations",
},
{
prefix .. "l",
"<Cmd>lua require('telescope').extensions.dap.list_breakpoints{}<CR>",
{ silent = true, expr = false },
mode = {
"n",
},
desc = "Telescope DAP list breakpoints",
},
{
prefix .. "v",
"<Cmd>lua require('telescope').extensions.dap.variables{}<CR>",
{ silent = true, expr = false },
mode = {
"n",
},
desc = "Telescope DAP variables",
},
{
prefix .. "f",
"<Cmd>lua require('telescope').extensions.dap.frames{}<CR>",
{ silent = true, expr = false },
mode = {
"n",
},
desc = "Telescope DAP frames",
},
},
},
{
"nvim-telescope/telescope.nvim",
optional = true,
dependencies = { "telescope_dap" },
opts = function() require("telescope").load_extension "dap" end,
},
}