-
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: Lazily require adapter mappings (#70)
- Loading branch information
Showing
15 changed files
with
93 additions
and
92 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
return { | ||
type = 'executable', | ||
command = vim.fn.exepath('bash-debug-adapter'), | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
return { | ||
type = 'executable', | ||
command = vim.fn.exepath('chrome-debug-adapter'), | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
local M = { | ||
type = 'server', | ||
port = '${port}', | ||
executable = { | ||
command = vim.fn.exepath('codelldb'), | ||
args = { '--port', '${port}' }, | ||
}, | ||
} | ||
|
||
if vim.fn.has('win32') == 1 then | ||
M.codelldb.executable.detached = false | ||
end | ||
|
||
return M |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
return { | ||
type = 'executable', | ||
command = vim.fn.exepath('netcoredbg'), | ||
args = { '--interpreter=vscode' }, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
local M = { | ||
id = 'cppdbg', | ||
type = 'executable', | ||
command = vim.fn.exepath('OpenDebugAD7'), | ||
} | ||
if vim.fn.has('win32') == 1 then | ||
M.cppdbg.options = { | ||
detached = false, | ||
} | ||
end | ||
|
||
return M |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
return { | ||
type = 'executable', | ||
command = vim.fn.exepath('dart-debug-adapter'), | ||
args = { 'flutter' }, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
-- https://github.com/mfussenegger/nvim-dap/wiki/Debug-Adapter-installation#go-using-delve-directly | ||
return { | ||
type = 'server', | ||
port = '${port}', | ||
executable = { | ||
command = vim.fn.exepath('dlv'), | ||
args = { 'dap', '-l', '127.0.0.1:${port}' }, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
return { | ||
type = 'executable', | ||
command = vim.fn.exepath('firefox-debug-adapter'), | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- Lazily map debug adapters | ||
|
||
local M = {} | ||
|
||
local META = {} | ||
function META.__index(table, key) | ||
local adapter = require('mason-nvim-dap.mappings.adapters.' .. key) | ||
table[key] = adapter | ||
return adapter | ||
end | ||
|
||
setmetatable(M, META) | ||
|
||
return M |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
return { | ||
type = 'executable', | ||
command = vim.fn.exepath('kotlin-debug-adapter'), | ||
args = { '--interpreter=vscode' }, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
return { | ||
type = 'executable', | ||
command = vim.fn.exepath('elixir-ls-debugger'), -- https://github.com/williamboman/mason.nvim/blob/d97579ccd5689f9c6c365e841ea99c27954112ec/lua/mason-registry/elixir-ls/init.lua#L26 | ||
args = {}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
return { | ||
type = 'executable', | ||
command = vim.fn.exepath('node-debug2-adapter'), | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
return { | ||
type = 'executable', | ||
command = vim.fn.exepath('php-debug-adapter'), | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
return { | ||
type = 'executable', | ||
command = vim.fn.exepath('debugpy-adapter'), | ||
} |
9816e2a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in init.lua, this will cause this:
Due to direct require, there is no js adapter by default, but it will still be imported
9816e2a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested passing a
to setup, it will trigger this problem stably