Skip to content

Commit

Permalink
fix(lsp): fix resetting client state on stop if one client attached
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcjkb committed Jan 27, 2024
1 parent 0d87893 commit ce119c0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- Only setup `vim.lsp.commands` for rust-analyzer on the first
- LSP: Only setup `vim.lsp.commands` for rust-analyzer on the first
initialization.
- LSP: Fix resetting client state on `:RustAnalyzer stop`
if only one client is attached.

## [4.0.0] - 2024-01-25

Expand Down
3 changes: 3 additions & 0 deletions lua/rustaceanvim/lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,9 @@ M.stop = function(bufnr)
for _, client in ipairs(clients) do
server_status.reset_client_state(client.id)
end
else
---@cast clients lsp.Client
server_status.reset_client_state(clients.id)
end
return clients
end
Expand Down

0 comments on commit ce119c0

Please sign in to comment.