Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions lib/Perl/LanguageServer/Workspace.pm
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use File::Basename ;
use Coro ;
use Coro::AIO ;
use Data::Dump qw{dump} ;
use Fcntl qw(:DEFAULT :mode);

with 'Perl::LanguageServer::SyntaxChecker' ;
with 'Perl::LanguageServer::Parser' ;
Expand Down Expand Up @@ -153,6 +154,14 @@ sub _build_state_dir
$rootpath .= '/.vscode/perl-lang' ;
print STDERR "state_dir = $rootpath\n" ;
$self -> mkpath ($rootpath) ;
my $ignore = $rootpath . '/.gitignore' ;
aio_stat($ignore);
if (! -f _)
{
my $fh = aio_open($ignore, O_WRONLY | O_CREAT | O_EXCL, 0644);
aio_write($fh, undef, undef, "*\n", 0);
aio_close($fh);
}

return $rootpath ;
}
Expand Down