diff --git a/lib/Perl/LanguageServer/Methods/workspace.pm b/lib/Perl/LanguageServer/Methods/workspace.pm index 1ac8e4a..b548462 100644 --- a/lib/Perl/LanguageServer/Methods/workspace.pm +++ b/lib/Perl/LanguageServer/Methods/workspace.pm @@ -164,6 +164,34 @@ sub _rpcnot_didChangeWorkspaceFolders # --------------------------------------------------------------------------- +sub _rpcnot_didChangeWatchedFiles + { + my ($self, $workspace, $req) = @_ ; + + my $changes = $req -> params -> {changes} ; + return if (!$changes) ; + + foreach my $change (@$changes) + { + my $uri = $change -> {uri} ; + my $type = $change -> {type} ; + + if ($type == 3) + { + delete $workspace -> files -> {$uri} ; + delete $workspace -> symbols -> {$uri} ; + } + else + { + $workspace -> parser_channel -> put (['save', $uri]) ; + } + } + + return ; + } + +# --------------------------------------------------------------------------- + sub _rpcreq_symbol { my ($self, $workspace, $req) = @_ ;