Skip to content

Commit 6bd858c

Browse files
authored
Merge pull request #68 from glennsarti/gh-53-add-didclose
(GH-53) Respond to 'textDocument/didClose' notification
2 parents 04d6ccc + 3848f10 commit 6bd858c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

server/lib/puppet-languageserver/message_router.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,11 @@ def receive_notification(method, params)
131131
documents.set_document(file_uri, content)
132132
reply_diagnostics(file_uri, PuppetLanguageServer::DocumentValidator.validate(content))
133133

134+
when 'textDocument/didClose'
135+
PuppetLanguageServer.log_message(:info, 'Received textDocument/didClose notification.')
136+
file_uri = params['textDocument']['uri']
137+
documents.remove_document(file_uri)
138+
134139
when 'textDocument/didChange'
135140
PuppetLanguageServer.log_message(:info, 'Received textDocument/didChange notification.')
136141
file_uri = params['textDocument']['uri']

0 commit comments

Comments
 (0)