Skip to content

Commit 6081be4

Browse files
author
Marc Jakobi
committed
fix(lsp): don't try to delete user command if it doesn't exist
1 parent 71a59ea commit 6081be4

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ 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+
## [Unreleased]
10+
11+
### Fixed
12+
13+
- LSP: Don't try to delete `RustLsp` command on client exit
14+
if it doesn't exist.
15+
916
## [4.10.2] - 2024-03-01
1017

1118
### Fixed

lua/rustaceanvim/commands/init.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,9 @@ end
320320

321321
--- Delete the `:RustLsp` command
322322
function M.delete_rust_lsp_command()
323-
vim.api.nvim_del_user_command(rust_lsp_cmd_name)
323+
if vim.cmd[rust_lsp_cmd_name] then
324+
vim.api.nvim_del_user_command(rust_lsp_cmd_name)
325+
end
324326
end
325327

326328
---Create the `:Rustc` command

0 commit comments

Comments
 (0)