# Neovim + DebugAdapter.jl

**URL:** <https://discourse.julialang.org/t/neovim-debugadapter-jl/116529>\
**Category:** Tooling\
**Tags:** editors\
**Created:** [July 2, 2024, 2:39pm UTC](https://discourse.julialang.org/t/neovim-debugadapter-jl/116529 "2024-07-02T14:39:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kdheepak](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kdheepak/32/10881_2.png) [@kdheepak](https://discourse.julialang.org/u/kdheepak)\
**Post date:** [July 2, 2024, 2:39pm UTC](https://discourse.julialang.org/t/neovim-debugadapter-jl/116529/1 "2024-07-02T14:39:22Z")

</div>

Hi neovim users,

Similar to [Neovim + LanguageServer.jl](https://discourse.julialang.org/t/neovim-languageserver-jl/) I thought I’d make a post about neovim and [`DebugAdapter.jl`](https://github.com/julia-vscode/DebugAdapter.jl/).

You might already know that neovim supports the [Microsoft Debug Adapter Protocol (DAP)](https://microsoft.github.io/debug-adapter-protocol/) using [mfussenegger/nvim-dap](https://github.com/mfussenegger/nvim-dap). Recently @davidanthoff merged support for DAP into `DebugAdapter.jl`. And now you can use it in neovim!

Here’s an example of the config in lua that I used to generate the video above:

```lua
return {
  {
    "mfussenegger/nvim-dap",
    dependencies = {
      "rcarriga/nvim-dap-ui",
      "theHamsta/nvim-dap-virtual-text",
      "nvim-neotest/nvim-nio",
      "kdheepak/nvim-dap-julia",
    },
    config = function()
      local dap = require("dap")
      local ui = require("dapui")

      require("dapui").setup()
      require("nvim-dap-julia").setup()

      vim.keymap.set("n", "<space>b", dap.toggle_breakpoint)
      vim.keymap.set("n", "<space>B", dap.run_to_cursor)

      vim.keymap.set("n", "<F1>", dap.continue)
      vim.keymap.set("n", "<F2>", dap.step_into)
      vim.keymap.set("n", "<F3>", dap.step_over)
      vim.keymap.set("n", "<F4>", dap.step_out)
      vim.keymap.set("n", "<F5>", dap.step_back)
      vim.keymap.set("n", "<F12>", dap.restart)

      dap.listeners.before.attach.dapui_config = function()
        ui.open()
      end
      dap.listeners.before.launch.dapui_config = function()
        ui.open()
      end
      dap.listeners.before.event_terminated.dapui_config = function()
        ui.close()
      end
      dap.listeners.before.event_exited.dapui_config = function()
        ui.close()
      end
    end,
  },
}

```

Check out how it works here:

> **[GitHub - kdheepak/nvim-dap-julia](https://github.com/kdheepak/nvim-dap-julia)**
>
> Contribute to kdheepak/nvim-dap-julia development by creating an account on GitHub.
