Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support configuration with .vscode/settings.json #94

Open
clarkadamp opened this issue Oct 10, 2023 · 1 comment
Open

Support configuration with .vscode/settings.json #94

clarkadamp opened this issue Oct 10, 2023 · 1 comment

Comments

@clarkadamp
Copy link

The ability to provide persistent configuration outside of the editor is super helpful

Aligning the format with Perl::LanguageServer would also make changing out from PLS more trivial.

@gseddon
Copy link

gseddon commented Jan 24, 2025

So I've tried using the .vscode/settings.json file, it seems to kinda work? I have a custom perl binary for each package baked-in because we have a complicated build setup with all the library paths. The binary sets its own PATH and PERL5LIB.

when I have this in the settings.json

{
    "perlnavigator.perlPath": "/local/home/gseddon/local-workplace/REDACTED/build-tools/bin/perl"
}

I see in the LSP logs that it does pick up the path correctly

Starting perl compilation check with the equivalent of: /local/home/gseddon/local-workplace/REDACTED/build-tools/bin/perl -c -Mwarnings -M-warnings=redefine -I /local/home/gseddon/local-workplace/REDACTED/lib -I /local/home/gseddon/.vscode-server/extensions/bscan.perlnavigator-0.8.15/server/src/perl -MInquisitor ...

However it doesn't use the INC path from that binary more generally. It looks like it's trying to use the system perl. Here's an example error message trying to load Readonly.pm:

Syntax: Can't locate Readonly.pm in @INC (@INC contains: /local/home/gseddon/local-workplace/REDACTED/lib /local/home/gseddon/.vscode-server/extensions/bscan.perlnavigator-0.8.15/server/src/perl /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) 

The exact same binary works 100% perfectly when specified in the global vscode settings.json. What's the gap to make this work in the local repository settings?

{
 ...
"perlnavigator.perlPath": "/local/home/gseddon/local-workplace/REDACTED/build-tools/bin/perl",
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants