Skip to content

Commit

Permalink
feat(osv): listen on port 7052 instead
Browse files Browse the repository at this point in the history
Signed-off-by: Jint-lzxy <[email protected]>
  • Loading branch information
Jint-lzxy committed Jun 20, 2024
1 parent abda840 commit 063dfa8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions lua/keymap/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ local plug_map = {
["n|<leader>do"] = map_cr("lua require('dap').step_out()"):with_noremap():with_silent(),
["n|<leader>dO"] = map_cr("lua require('dap').repl.open()"):with_noremap():with_silent(),
["n|<leader>dr"] = map_cr("lua require('dap').continue()"):with_noremap():with_silent(),
["n|<leader>dn"] = map_cr("lua require('osv').launch({ port = 7052 })"):with_noremap():with_silent(),
["n|<leader>dR"] = map_cr("lua require('osv').run_this()"):with_noremap():with_silent(),
["n|<leader>dt"] = map_cr("lua require('dap').terminate()"):with_noremap():with_silent(),
["n|<leader>dv"] = map_cr("lua require('dap').step_over()"):with_noremap():with_silent(),
Expand Down
9 changes: 5 additions & 4 deletions lua/modules/configs/tool/dap/clients/osv.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ local dap = require("dap")

dap.configurations.lua = {
{
type = "nlua",
type = "nvim",
request = "attach",
name = "Attach to running Neovim instance",
name = "Attach to a running Neovim instance",
},
}
dap.adapters.nlua = function(callback, config)
callback({ type = "server", host = config.host or "127.0.0.1", port = config.port or 28695 })

dap.adapters.nvim = function(callback, config)
callback({ type = "server", host = config.host or "127.0.0.1", port = config.port or 7052 })
end
1 change: 1 addition & 0 deletions lua/modules/configs/tool/which-key.lua
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ return function()
d = "debug: Close debug panels",
i = "debug: Step into",
l = "debug: Do last run again",
n = "debug: Use this nvim instance as server",
o = "debug: Step out",
O = "debug: Open repl",
r = "debug: Run/Continue",
Expand Down

0 comments on commit 063dfa8

Please sign in to comment.