PerlNavigator icon indicating copy to clipboard operation
PerlNavigator copied to clipboard

Tidy formatting does not work "out of the box" (MacOS)

Open ohir opened this issue 9 months ago • 0 comments

MacOS 12.7.4, VSCode Version: 1.85.2

Just installed PerlNavigator in a vanila perl environment (only system perl). Perltidy works from terminal (brewed).

Extension works: it hints, displays help - ie. PLS part is working ok - but it does not format on save (enabled globally).

It needed me to have Perl::Tidy installed separately:

export PERL5LIB=/Users/user/perl5/lib/perl5
brew install cpanm && cpanm install local::lib && \
cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
cpanm install Perl::Tidy

then add to settings.json appropriate items:

"perlnavigator.includePaths": [        "/Users/user/perl5/lib/perl5"   ]

"perlnavigator.perltidyProfile": "/Users/user/.ptrc"

Restart VSCode... wooha, now it formats on save.

It would be good to either bundle Tidy with extension or update docs accordingly.

TC, excelent work :)

ohir avatar May 07 '24 21:05 ohir