jack-karamanian / perl-syntax Goto Github PK
View Code? Open in Web Editor NEWA very basic Perl syntax highlighter for Visual Studio Code.
License: MIT License
A very basic Perl syntax highlighter for Visual Studio Code.
License: MIT License
Hi,
I forked this repo to https://github.com/DanFreed/perl-syntax, which I'm sure wasn't the right way to propose a change...
Anyway, I added a couple of new configuration options that I think would be generally useful for this extension.
perlSyntax.realtivePaths : this is similar to includePaths, but all of the paths are treated as relative to the current projects root directory.
perlSyntax.cwd : this is a a directory, again relative to the project root, that the syntax check will switch to prior to running. This is handy when there is a particular directory in a project that is critical for the execution/syntax checking.
Any chance these can be merged into the main branch?
events.js:163
throw er; // Unhandled 'error' event
^Error: write EPIPE
at exports._errnoException (util.js:1050:11)
at Socket._writeGeneric (net.js:724:26)
at Socket._write (net.js:743:8)
at doWrite (_stream_writable.js:329:12)
at writeOrBuffer (_stream_writable.js:315:5)
at Socket.Writable.write (_stream_writable.js:241:11)
at Socket.write (net.js:670:40)
at PerlLinter.lint (C:\Users\andre.vscode\extensions\jackkaramanian.perl-syntax-0.0.4\server\PerlLinter.js:22:23)
at validateTextDocument (C:\Users\andre.vscode\extensions\jackkaramanian.perl-syntax-0.0.4\server\server.js:55:12)
at documents.onDidChangeContent.lodash_1.debounce (C:\Users\andre.vscode\extensions\jackkaramanian.perl-syntax-0.0.4\server\server.js:35:5)
[Info - 10:17:35] Connection to server got closed. Server will restart.
events.js:163
throw er; // Unhandled 'error' event
^Error: write EPIPE
at exports._errnoException (util.js:1050:11)
at Socket._writeGeneric (net.js:724:26)
at Socket._write (net.js:743:8)
at doWrite (_stream_writable.js:329:12)
at writeOrBuffer (_stream_writable.js:315:5)
at Socket.Writable.write (_stream_writable.js:241:11)
at Socket.write (net.js:670:40)
at PerlLinter.lint (C:\Users\andre.vscode\extensions\jackkaramanian.perl-syntax-0.0.4\server\PerlLinter.js:22:23)
at validateTextDocument (C:\Users\andre.vscode\extensions\jackkaramanian.perl-syntax-0.0.4\server\server.js:55:12)
at documents.onDidChangeContent.lodash_1.debounce (C:\Users\andre.vscode\extensions\jackkaramanian.perl-syntax-0.0.4\server\server.js:35:5)
[Info - 10:17:37] Connection to server got closed. Server will restart.
events.js:163
throw er; // Unhandled 'error' event
^Error: write EPIPE
at exports._errnoException (util.js:1050:11)
at Socket._writeGeneric (net.js:724:26)
at Socket._write (net.js:743:8)
at doWrite (_stream_writable.js:329:12)
at writeOrBuffer (_stream_writable.js:315:5)
at Socket.Writable.write (_stream_writable.js:241:11)
at Socket.write (net.js:670:40)
at PerlLinter.lint (C:\Users\andre.vscode\extensions\jackkaramanian.perl-syntax-0.0.4\server\PerlLinter.js:22:23)
at validateTextDocument (C:\Users\andre.vscode\extensions\jackkaramanian.perl-syntax-0.0.4\server\server.js:55:12)
at documents.onDidChangeContent.lodash_1.debounce (C:\Users\andre.vscode\extensions\jackkaramanian.perl-syntax-0.0.4\server\server.js:35:5)
[Info - 10:17:39] Connection to server got closed. Server will restart.
events.js:163
throw er; // Unhandled 'error' event
^Error: write EPIPE
at exports._errnoException (util.js:1050:11)
at Socket._writeGeneric (net.js:724:26)
at Socket._write (net.js:743:8)
at doWrite (_stream_writable.js:329:12)
at writeOrBuffer (_stream_writable.js:315:5)
at Socket.Writable.write (_stream_writable.js:241:11)
at Socket.write (net.js:670:40)
at PerlLinter.lint (C:\Users\andre.vscode\extensions\jackkaramanian.perl-syntax-0.0.4\server\PerlLinter.js:22:23)
at validateTextDocument (C:\Users\andre.vscode\extensions\jackkaramanian.perl-syntax-0.0.4\server\server.js:55:12)
at documents.onDidChangeContent.lodash_1.debounce (C:\Users\andre.vscode\extensions\jackkaramanian.perl-syntax-0.0.4\server\server.js:35:5)
[Info - 10:17:40] Connection to server got closed. Server will restart.
events.js:163
throw er; // Unhandled 'error' event
^Error: write EPIPE
at exports._errnoException (util.js:1050:11)
at Socket._writeGeneric (net.js:724:26)
at Socket._write (net.js:743:8)
at doWrite (_stream_writable.js:329:12)
at writeOrBuffer (_stream_writable.js:315:5)
at Socket.Writable.write (_stream_writable.js:241:11)
at Socket.write (net.js:670:40)
at PerlLinter.lint (C:\Users\andre.vscode\extensions\jackkaramanian.perl-syntax-0.0.4\server\PerlLinter.js:22:23)
at validateTextDocument (C:\Users\andre.vscode\extensions\jackkaramanian.perl-syntax-0.0.4\server\server.js:55:12)
at documents.onDidChangeContent.lodash_1.debounce (C:\Users\andre.vscode\extensions\jackkaramanian.perl-syntax-0.0.4\server\server.js:35:5)
[Error - 10:17:44] Connection to server got closed. Server will not be restarted.
I have observed a compilation issues raised for a SYNOPSIS / POD (documentation) section.
"use" not allowed in expression at - line 7, at end of line
A good example: PPIx::Regexp::Dumper, check the SYNOPSIS section line 7 (see also below, the use statement in the synopsis.
=head1 NAME
PPIx::Regexp::Dumper - Dump the results of parsing regular expressions
=head1 SYNOPSIS
use PPIx::Regexp::Dumper;
PPIx::Regexp::Dumper->new( 'qr{foo}smx' )
->print();
I use Windows Subsystem for Linux for my Perl install because Strawberry and Activeperl won't compile my code without much drama. Unfortunately there is no supportable way to do this with any of the syntax highlighter extensions for VSCode.
Yours, through a quirk of having -c
as the first argument passed to the spawn()
, lets me do this in the settings:
"perlSyntax.perlExecutable": "bash",
"perlSyntax.additionalOptions": ["/usr/bin/perl -I local/lib/perl5 -c"]
Obviously not ideal, and the other settings like perlSyntax.includePaths
do not work. A way to support this better would be super handy. Maybe think of Carton support as well.
Thanks!
Hi,
While opening this file with VSCode, Im getting this:
Error: No diagnostics were produced on perl exit: write EPIPE
at Socket.process.stdin.on (/Users/gibi/.vscode/extensions/jackkaramanian.perl-syntax-0.0.6/server/PerlLinter.js:24:23)
at emitOne (events.js:96:13)
at Socket.emit (events.js:191:7)
at onwriteError (_stream_writable.js:341:10)
at onwrite (_stream_writable.js:359:5)
at fireErrorCallbacks (net.js:480:13)
at Socket._destroy (net.js:521:3)
at WriteWrap.afterWrite [as oncomplete] (net.js:815:10)
[Error - 22:16:08] Connection to server got closed. Server will not be restarted.
Is it just me? ;)
Hi Today I found that the syntax checker was not working, I found this errors in the perl-syntax output do you have any idea about it?
(node:58566) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
[Info - 9:44:00 PM] Connection to server got closed. Server will restart.
(node:58662) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
[Info - 9:44:02 PM] Connection to server got closed. Server will restart.
(node:58727) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
[Info - 9:44:03 PM] Connection to server got closed. Server will restart.
(node:58730) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
[Info - 9:44:05 PM] Connection to server got closed. Server will restart.
(node:58734) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
[Error - 9:44:07 PM] Connection to server got closed. Server will not be restarted.
((enjoy))
cr
How can I debug it for you?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.