Skip to content

Commit

Permalink
fix: wrap didSaveFile method with try-finally block (#495)
Browse files Browse the repository at this point in the history
  • Loading branch information
maximyurevich authored Sep 22, 2024
1 parent ee7182a commit f9b776b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion autoload/lsp/lsp.vim
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,14 @@ def LspSavedFile(bnr: number)
endif

for lspserver in lspservers
lspserver.didSaveFile(bnr)
# TODO: implement `catch` block
# Wrap method with `try-finally` block to solve error:
# `E716: Key not present in Dictionary: "supportsDidSave"`
try
lspserver.didSaveFile(bnr)
finally
return
endtry
endfor
enddef

Expand Down

0 comments on commit f9b776b

Please sign in to comment.