Skip to content

Commit

Permalink
feat(lsp): notify if rust-analyzer status is not healthy (#508)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcjkb committed Sep 18, 2024
1 parent bb7ca76 commit 5c0c441
Show file tree
Hide file tree
Showing 2 changed files with 9 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.6.0] - 2024-09-18

### Added

- LSP: Notify if rust-analyzer is not healthy.

## [5.5.0] - 2024-09-16

### Changed
Expand Down
3 changes: 3 additions & 0 deletions lua/rustaceanvim/server_status.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ local _ran_once = {}

---@param result rustaceanvim.internal.RAInitializedStatus
function M.handler(_, result, ctx, _)
if result and result.health and result.health ~= 'ok' then
vim.notify_once("rust-analyzer health is not OK. Run 'RustLsp logFile' for details", vim.log.levels.WARN)
end
-- quiescent means the full set of results is ready.
if not result.quiescent or _ran_once[ctx.client_id] then
return
Expand Down

0 comments on commit 5c0c441

Please sign in to comment.