Skip to content

Commit

Permalink
fix(health): warn if no debug adapters have been detected
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcjkb committed Aug 5, 2024
1 parent 5c721b3 commit cf0ba61
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [5.1.5] - 2024-08-05

### Fixed

- Health: Warn if no debug adapters have been detected.

## [5.1.4] - 2024-08-02

### Fixed
Expand Down
12 changes: 12 additions & 0 deletions lua/rustaceanvim/health.lua
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,15 @@ local function check_config(config)
end
end

local function is_dap_enabled()
if not pcall(require, 'dap') then
return false
end
local rustaceanvim = vim.g.rustaceanvim or {}
local opts = type(rustaceanvim) == 'function' and rustaceanvim() or rustaceanvim
return vim.tbl_get(opts, 'dap', 'adapter') ~= false
end

local function check_for_conflicts()
start('Checking for conflicting plugins')
require('rustaceanvim.config.check').check_for_lspconfig_conflict(error)
Expand Down Expand Up @@ -271,6 +280,9 @@ function health.check()
]],
})
end
if adapter == false and is_dap_enabled() then
warn('No debug adapter detected. Make sure either lldb or codelldb is available on the path.')
end
for _, dep in ipairs(external_dependencies) do
check_external_dependency(dep)
end
Expand Down

0 comments on commit cf0ba61

Please sign in to comment.