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

Allow to specify language id in command to create a new untitled file #153872

Merged
merged 4 commits into from
Jul 1, 2022

Conversation

karrtikr
Copy link
Contributor

This PR fixes #152920

@bpasero @lramos15 Unfortunately this does not seem to be working even if I hardcode the language id as "python", would be needing some help here.

@bpasero
Copy link
Member

bpasero commented Jul 1, 2022

Looks good to me from editor service, i.e. when I run this code it opens a Python file:

editorService.openEditor({
	resource: undefined,
	options: {
		override: undefined,
		pinned: true
	},
	languageId: 'python',
});

@karrtikr
Copy link
Contributor Author

karrtikr commented Jul 1, 2022

Ah, actually for some reason the builder was not compiling my changes incrementally, which is why I got the impression it's not working. Does it not watch for changes by default?

I can confirm it works as well. I'll test out if walkthrough works as expected.

@lramos15
Copy link
Member

lramos15 commented Jul 1, 2022

Does it not watch for changes by default?

It should but depends how you build. I just use yarn watch in my terminal and then using the "Launch VS Code" debug entry

@karrtikr karrtikr marked this pull request as ready for review July 1, 2022 17:25
@karrtikr
Copy link
Contributor Author

karrtikr commented Jul 1, 2022

Can confirm it works from welcome view 👍

It should but depends how you build. I just use yarn watch in my terminal and then using the "Launch VS Code" debug entry

I see, I used the default build command Ctrl+Shift+B. The daemon watch process launched seems to exit automatically after a while.

Copy link
Member

@lramos15 lramos15 left a comment

Choose a reason for hiding this comment

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

Just a small nit

@@ -629,28 +629,31 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
{
isOptional: true,
name: 'viewType',
Copy link
Member

Choose a reason for hiding this comment

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

Can we set this name to be something meaningful now that it's not just view type

@karrtikr karrtikr merged commit 4623460 into main Jul 1, 2022
@karrtikr karrtikr deleted the issue152920 branch July 1, 2022 18:04
@github-actions github-actions bot locked and limited conversation to collaborators Aug 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide a command to create a new untitled file with a specific language set
3 participants