bscan / PerlNavigator

Perl Language Server that includes syntax checking, perl critic, and code navigation
MIT License
198 stars 39 forks source link

VSCode - Seem unable to get perltidy to trigger #104

Closed PaulGWebster closed 10 months ago

PaulGWebster commented 10 months ago

Good day,

I managed to configure everything as I would like with critic and perlimports, the only issue I face is with perltidy, even though I can use it from command line with no issue and I have a fairly standard ~/.perltidyrc ( I even tried removing it just incase ).

But no matter what I do, be it saving the file or looking for perltidy in the 'power menu'(sp? - ctrl shift p) I cannot get perltidy to trigger, I checked for any extensions that could possible be interfering and can find nothing.

My config has the following:

    "perlnavigator.enableWarnings": true,
    "perlnavigator.perlcriticEnabled": true,
    "perlnavigator.perlcriticProfile": "~/.perlcriticrc",
    "perlnavigator.perltidyEnabled": true,
    "perlnavigator.perltidyProfile": "~/.perltidyrc",
    "perlnavigator.perlimportsLintEnabled": true,
    "perlnavigator.perlimportsTidyEnabled": true,
    "perlnavigator.perlimportsProfile": "~/.perlimports.toml"

Is anyone able to offer any insight?

bscan commented 10 months ago

Hi @PaulGWebster. To get perltidy to run, you'll need to either "Format Selection" or "Format Document" from the right click context menu or the ctrl+shift+P menu.

Perlimports tidy should also run at the same time since you have it on (perlimports provide diagnostics and formatting).

If you want it to run on save, you can set:

"editor.formatOnSave": true

However, I personally don't use formatOnSave since I often work on existing code that I don't want to re-format unless I explicitly request.

Let me know if you have any other issues or questions getting the Navigator up and running.

perlTidy

bscan commented 10 months ago

Closing for now, but feel free to re-open if I misunderstood.