richterger / Perl-LanguageServer

Language Server for Perl
Other
220 stars 53 forks source link

Is possible pass an ignore-next-line on code ? #150

Closed togro closed 1 year ago

togro commented 1 year ago

Hi

I have a module with red : "Can't locate Company/Database.pm" , I know that is ok because I don't have put that module on root path .

Exists any way for put on comment one instruction for this line ignored by LanguageServer ? Some like :

perl-pls-ignore-next-line

se strict;
use feature ':5.16';
use Data::Dumper;
use JSON::XS;
use DBI  qw(:sql_types);
use Digest::MD5 qw(md5_hex);
use Mojo::UserAgent;
# perl-pls-ignore-next-line
use Company Database ;

Best regards

richterger commented 1 year ago

You need to set the correct include path via perl.perlInc . The path must be absolute. . will not work, because there is no current working directory.

With a correct include path set, you don't need to ignore anything.