Skip to content

Commit cf0ba61

Browse files
committed
fix(health): warn if no debug adapters have been detected
1 parent 5c721b3 commit cf0ba61

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ All notable changes to this project will be documented in this file.
66
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
77
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
88

9+
## [5.1.5] - 2024-08-05
10+
11+
### Fixed
12+
13+
- Health: Warn if no debug adapters have been detected.
14+
915
## [5.1.4] - 2024-08-02
1016

1117
### Fixed

lua/rustaceanvim/health.lua

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,15 @@ local function check_config(config)
126126
end
127127
end
128128

129+
local function is_dap_enabled()
130+
if not pcall(require, 'dap') then
131+
return false
132+
end
133+
local rustaceanvim = vim.g.rustaceanvim or {}
134+
local opts = type(rustaceanvim) == 'function' and rustaceanvim() or rustaceanvim
135+
return vim.tbl_get(opts, 'dap', 'adapter') ~= false
136+
end
137+
129138
local function check_for_conflicts()
130139
start('Checking for conflicting plugins')
131140
require('rustaceanvim.config.check').check_for_lspconfig_conflict(error)
@@ -271,6 +280,9 @@ function health.check()
271280
]],
272281
})
273282
end
283+
if adapter == false and is_dap_enabled() then
284+
warn('No debug adapter detected. Make sure either lldb or codelldb is available on the path.')
285+
end
274286
for _, dep in ipairs(external_dependencies) do
275287
check_external_dependency(dep)
276288
end

0 commit comments

Comments
 (0)