Skip to content
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

Command laravel-pint.format not found #36

Open
robsontenorio opened this issue Jan 31, 2023 · 6 comments
Open

Command laravel-pint.format not found #36

robsontenorio opened this issue Jan 31, 2023 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@robsontenorio
Copy link

robsontenorio commented Jan 31, 2023

Describe the bug
Command laravel-pint.format not found

To Reproduce
Steps to reproduce the behavior:

  1. Open a file
  2. CTRL+SHIFT+P
  3. Select Format Document using Laravel Pint

Expected behavior
File get formatted

Screenshots
image

Environment:

  • Operating system: Ubuntu 22.04
  • IDE / version: VSCODE 1.73.1
  • Extension version 1.1.4
  • Extension's config:
"settings": {		
   "[php]": {
	 "editor.defaultFormatter": "open-southeners.laravel-pint",
	 "editor.formatOnSave": true
	},
}
@robsontenorio robsontenorio added the bug Something isn't working label Jan 31, 2023
@robsontenorio
Copy link
Author

It is working when I add "laravel-pint.enable": true to settings.json

Before it was not mandatory.

Maybe add to the README?

@d8vjork d8vjork self-assigned this Feb 1, 2023
@d8vjork
Copy link
Member

d8vjork commented Feb 1, 2023

Hi! Thanks letting me know of this, I'll take a look at this for the v1 release as we do care about having a quick out-of-the-box experience with this (thought sometimes is difficult adding more config params)

@jansgescheit
Copy link

jansgescheit commented Apr 26, 2023

Same problem on my site, my settings:

    "laravel-pint.enable": true,
    "laravel-pint.executablePath": "src/vendor/bin/pint",
    "laravel-pint.configPath": "src/pint.json",
    "laravel-pint.enableDebugLogs": true,

Edit: I have to reload vscode manually, than it works. Maybe you add a reload mechanism after install

@nexxai
Copy link

nexxai commented May 15, 2023

@d8vjork I was just looking through the code and it seems like this line might be the problem?

I'm no VSCode extension developer so I could be reading this wrong, but it looks like it's only setting those two settings values if it's NOT the first install, rather than if it IS the first install.

If you remove the negation at the beginning of the conditional, would that solve the problem?

@Andreas-Halemba
Copy link

The reload after installing the plugin and pint composer package and enabling it in the settings (laravel-pint.enable) did it for me.

@d8vjork
Copy link
Member

d8vjork commented Nov 15, 2023

@nexxai That's supposed to be more of an out of the box experience installing the extension, but I'll check as it might be not working as originally expected

Exactly what @Andreas-Halemba just said. The extension installation should be straightforward so I'll change that after v1 release to be pre-enabled by default when installed then configurable by the user/workspace

For now I'm sorry as I have little to no time to dedicate on this, but I'll check once in a while

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants