Skip to content

Commit

Permalink
Add Option cacheDir to specify location of cache dir (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
richterger committed Sep 26, 2021
1 parent 73141f2 commit f4bd1f3
Show file tree
Hide file tree
Showing 5 changed files with 401 additions and 383 deletions.
1 change: 1 addition & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Revision history for Perl-LanguageServer
- $#foo is now correctly evaluated inside of debugger console
- Default debug configuration is now automatically provided without
the need to create a launch.json first (#103)
- Add Option cacheDir to specify location of cache dir (#113)

- Fix: Debugger outputted invalid thread reference causes "no such coroutine" message,
so watchs and code from the debug console is not expanded properly
Expand Down
5 changes: 5 additions & 0 deletions clients/vscode/perl/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@
"default": null,
"description": "directories to ignore, defaults to .vscode, .git, .svn"
},
"perl.cacheDir": {
"type": "string",
"default": null,
"description": "directory for caching of parsed symbols, if the directory does not exists, it will be created, defaults to ${workspace}/.vscode/perl-lang. This should be one unqiue directory per project and an absolute path."
},
"perl.showLocalVars": {
"type": "boolean",
"default": false,
Expand Down
4 changes: 2 additions & 2 deletions lib/Perl/LanguageServer.pm
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ Perl::LanguageServer - Language Server and Debug Protocol Adapter for Perl
=head1 VERSION
Version 2.2.0
Version 2.3.0
=cut

our $VERSION = '2.2.0';
our $VERSION = '2.3.0';


=head1 SYNOPSIS
Expand Down
11 changes: 11 additions & 0 deletions lib/Perl/LanguageServer/Methods/workspace.pm
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,17 @@ sub _rpcnot_didChangeConfiguration

$workspace -> show_local_vars ($workspace -> config -> {showLocalVars}) ;
$workspace -> disable_cache ($workspace -> config -> {disableCache}) ;

if ($req -> params -> {settings}{perl}{cacheDir})
{
$workspace -> state_dir ($req -> params -> {settings}{perl}{cacheDir}) ;
}
else
{
$workspace -> clear_state_dir
}

$workspace -> mkpath ($workspace -> state_dir) ; # force build state dir

async
{
Expand Down
Loading

0 comments on commit f4bd1f3

Please sign in to comment.