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

Add peggy.code-workspace #432

Merged
merged 3 commits into from
Dec 10, 2023
Merged

Add peggy.code-workspace #432

merged 3 commits into from
Dec 10, 2023

Conversation

markw65
Copy link

@markw65 markw65 commented Aug 31, 2023

See discussion on #42

It turns out that you can include recommended extensions directly in the .code-workspace file, so I didn't need to add a .vscode/extensions.json file.

To test this:

  • I downloaded the insiders build of vscode. This has its own global settings, and list of installed extensions, so I was effectively starting from a fresh vscode install
  • I cloned a fresh copy of @markw65/peggy, and checked out origin/peggy-code-workspace.
  • I ran npm install, then opened the peggy folder from vscode-insiders.
  • It popped up a non-blocking notice that the folder contains a code-workspace file, and offered to open it, which I did.
  • It popped up a non-blocking notice asking if I wanted to install the recommended extensions, which I did (there was also an option to just show the recommended extensions).
  • I opened generate-js.js, and made some changes that eslint didn't like, and hit Shift-Option-F to format, and it fixed them for me, without modifying the rest of the file.
  • To confirm that the code-workspace settings can be overridden, I went to settings, and set defaulltFormatter to Typescript and Javascript Language Features in the peggy folder. This created a .vscode/settings.json file (which was hidden from git by the new .gitignore). I formatted generate-js.js again, and it changed lots of things in ways that lint didn't like (so that formatter isn't actually useful, but demonstrates that people can still choose to use something other than the default).

Given that settings can be overridden via .vscode/settings.json, I'm inclined to turn on Format on Save in peggy.code-workspace too.

],
"settings": {
"eslint.format.enable": true,
"editor.formatOnSave": true,
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't mean to leave this in...

@hildjj
Copy link
Contributor

hildjj commented Dec 9, 2023

peggy.code-workspace probably needs to be added to .npmignore. Check with npm pack --dry-run

@hildjj
Copy link
Contributor

hildjj commented Dec 9, 2023

Note: I'll likely close #42 after this lands, after playing with it a little.

@markw65
Copy link
Author

markw65 commented Dec 9, 2023

I did need to add peggy.code-workspace to .npmignore, and while there I realized that I added tsconfig*.json, to cover the tsconfig-base.json that I added in #435.

@hildjj
Copy link
Contributor

hildjj commented Dec 9, 2023

needs a changelog entry still, please.

@hildjj hildjj merged commit a0d7a3b into peggyjs:main Dec 10, 2023
9 checks passed
@markw65 markw65 deleted the peggy-code-workspace branch December 10, 2023 20:48
@hildjj hildjj mentioned this pull request Jan 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants