Code Monkey home page Code Monkey logo

perltidy's People

Contributors

dependabot[bot] avatar dylanwh avatar forrcaho avatar sfodje avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

perltidy's Issues

Doesn't seem to be called

I have the latest revision (AFAIK) installed in VS Code 1.22.2 on Debian Stretch. If I select some code (in a file with ".pl" extension) and hit KF I get a diagnostic that states

"There is no formatter for 'perl'-files installed."

When I save, no reformatting is performed.

Settings are:

  // Additional arguments for Perl::Tidy e.g. ['-st', '--indent-columns=3]
  "perltidy.additionalArguments": [],

  // Path to 'linter' executable
  "perltidy.executable": "perltidy",

  // Path to .perltidyrc file
  "perltidy.profile": ""

Debian package perltidy is installed and perltidy is in the default path.

hbarta@olive:~$ which perltidy
/usr/bin/perltidy
hbarta@olive:~$ 

I can reformat files by executing perldity on the command line.

I don't see anything in the documentation that indicates I need to do anything to beyond installing the extension to get it to work. Have I overlooked something?

FormatOnSave Seems to be Broken

I have "editor.formatOnSave": true set and this works for other languages and up until the latest version of Code was working for Perl with this extension. If I right click the file and select "Format Document" it formats the document no problem.

I tried launching code as follows but no issues were reported

code --inspect-brk-extensions <path-to-perl-file>

I am using Code 1.26.1 on Centos 7

Additional arguments with strange side effects

Not sure what's going on, but when i set "perltidy.additionalArguments": ["-pro=.../.perltidyrc"] this extension creates perl processes that run forever and keep a CPU core busy (processes had to be killed manually). Tested with macOS 10.12.5, VS Code 1.14.1 Perl 5.26.0 and Perl::Tidy 20170521. For the Atom perltidy package i've used that as the default for a long time without problem. https://github.com/kraih/atom-perltidy/blob/master/index.js#L14

Please publish to open-vsx?

Open-vsx.org is for VSCodium and other VSCode forks.

Would you be so kind as to publish this plugin there too?

perltidy failures written to "perltidy.ERR"

If perltidy fails, a popup appears which says:
## Please see file perltidy.ERR
this is not so great in an extension, because where is that file? The errors do not appear in any of the output logs within vscode that I could find.
I discovered the --standard-error-output option to perltidy, and when I add it to my .perltidyrc file, the popup shows the real error message, so maybe that should be the default when perltidy is called by the extension. Alternatively, the problem could be flagged such that it shows up in the "Problems" tab at the bottom of vscode.

Installing changes the capitalization of Perl in Language Identifiers list

When I install this module, the Language Identifier shown in the right of the status bar when I have a Perl file open now says "PERL" instead of "Perl".

This capitalization is wrong (as it says at https://perldoc.perl.org/perlfaq1.html#What's-the-difference-between-%22perl%22-and-%22Perl%22%3f).

This is on VSCode version 1.47. I checked both running under Linux directly and under Windows using Remote-SSH to edit on Linux.

Adds a newline on paste

When I paste anything within a perl file, a newline is added after the text I pasted. Disabling PerlTidy fixes this (NB, "format on paste" is enabled, and I want it enabled; it doesn't cause a line break to appear in C++, for example).

Using vscode 1.30.2 on Linux, .perltidyrc below:

-bl # Braces on new lines
-i=2 # Indents are 2 spaces
-l=100000 # Lines can be infinitely long
-ci=2 # Continuation lines get indented by 2
-pt=1 # These next 3 padd braces where they contain an expression not just a value
-sbt=1
-bt=1
-nsts # Don't put spaces before trailing semicolons
-nasc # Don't add semicolons when you think I've missed them
-ndws # Let me control whitespace don't go deleting what you think I don't need
-nanl

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.