Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(lsp): notify if rust-analyzer status is not healthy #508

Merged
merged 1 commit into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading