-
Notifications
You must be signed in to change notification settings - Fork 39
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
More Sublime Text experience from anyone? #74
Comments
Hi @nugged, sorry for the painful experience here. I agree it's certainly easier to get running in vscode, as vscode provides the node.js runtime, but the Navigator works in Sublime Text as well. I just tested using Sublime Text 4 with the latest binary release (tested on Windows) and it worked for me, including Perl::Critic. Binary from here: https://github.com/bscan/PerlNavigator/releases/tag/v0.5.5 I downloaded a fresh copy of ST4, installed the LSP client, and used these settings.
What platform are you using? Are you seeing any errors? Or any perl compilation results? |
MacOS (M1) I did:
I build it (
then code: #!/bin/env perl
use warnings; use strict; use 5.30.0; use utf8;
binmode STDOUT, ":encoding(UTF-8)"; $| = 1;
our $ThisOus = "It Is!";
my $abc = "It Is also never used!";
BEGIN {
warn "Warning iside BEGIN!";
warn "I am Perl $^V ($]) and located " . ($^X =~ s|.+/perl5|~/perl5|r);
}
syntax_error it doesn't give anything from Perl::Critic (vscode does). What I tried manually inside the guts:
but I lost how to debug full chain why it drowns somewhere in ST4 guts |
Yeah, I tried logging, but in Sublime, it's not THAT trivial :). That's why calling for ideas on how I can inject my code somewhere to debug deeper into why in ST4 it's acting up. Saying this: it DOES NOT log into the console in ST4. |
Woohooo!!!! :) LSP-config: // Settings in here override those in "LSP/LSP.sublime-settings"
{
"log_debug": false,
"clients": {
"LSP-perl": {
"enabled": true,
"selector": "source.perl",
"command": ["node", "~/git/PerlNavigator/server/out/server.js","--stdio"],
"settings": {
"perlnavigator.enableWarnings": true,
"perlnavigator.perlcriticEnabled": true,
},
},
}
} On the dozen-one iteration, it started to work, but I am still unsure in which place something changed "to be right instead of to be wrong". Ok, good. UPDATE: it even works with simplified config, all the rest by default: // Settings in here override those in "LSP/LSP.sublime-settings"
{
"clients": {
"LSP-perl": {
"enabled": true,
"selector": "source.perl",
"command": ["node", "~/git/PerlNavigator/server/out/server.js","--stdio"],
},
}
}
And works well with .bash-profiled Perl (perlbrew), catching up the proper Perl and modules. |
Now next step is to find out how to make PerlTidy work from it. It works in VSCode, not yet in Sublime :P. UPDATE: ... still have not succeeded yet. |
Sounds like progress is happening. Thanks for continuing to work on this. Pertidy works for me in both "Format Selection" and "Format File" modes on Sublime Text. Regarding logging, I just fixed the logging capabilities for ST4 last night, so you'll need to grab the latest version of Perl Navigator (and enable logging in the settings). Then it will show up in the "LSP: Toggle Log Panel". |
Whoa! Logging capabilities will help. Let's see, I'll check now why it fails on Tidy now for me. |
Tried to install it manually, and lost a whole day to make Perl::Critic work but nope. It works in vscode out of the box, but not in ST4. Sigh.
The text was updated successfully, but these errors were encountered: