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 explicit way to create new file (a.k.a. wizard for new class/worksheet) #179

Closed
alekseiAlefirov opened this issue Jan 16, 2020 · 7 comments
Assignees

Comments

@alekseiAlefirov
Copy link
Collaborator

The option to create new scala file or worksheet (or, potentially, notebook) should be added to

  • most expected, explorer directory context menu,
    and, additionally can be added to
  • file menu (not sure if there's such an option in VS Code)
  • command palette

Should there be actual wizard?
Where wizard is a separate window with controls. It suppose something like IDEa's wizard to choose among Scala class/object/trait.

  • Should there be such choice at all?
  • Additionally, such choice assume auto creating blank class/object/trait with user-suggested name, which can conflict with package provider, triggered by didOpen, editor-independent.
  • Not sure, there's a way to create wizards in VS Code (quick googling does not give positive answer on that).

As a first iteration my suggestion is to create a simple explorer context menu addition under New File:

|- New File
|- New Scala >
|- |- File (or Class, not sure which is more accurate here)
|- |- Worksheet
|-...
@gabro
Copy link
Member

gabro commented Jan 16, 2020

Thanks for suggesting this. I think it's a good idea.

I'm moving this to the feature-requests repo, so that we can better prioritize our work.

@gabro gabro transferred this issue from scalameta/metals-vscode Jan 16, 2020
@alekseiAlefirov
Copy link
Collaborator Author

Ah, I think, there's no need for that, since I'm working on it, I just could not assign it to myself.

@tgodzik
Copy link
Contributor

tgodzik commented Jan 16, 2020

@gabro I asked Aleksei to work on that, since the discoverability of worksheets is pretty poor at the moment. I think we can transfer it back to the repo.

@tgodzik tgodzik transferred this issue from scalameta/metals-feature-requests Jan 16, 2020
@tgodzik
Copy link
Contributor

tgodzik commented Jan 16, 2020

@gabro Sorry for not warning you about it!

@olafurpg
Copy link
Member

I think this is a good idea. I would avoid making this functionality limited to VS Code. It’s vest to implement most of the logic in the Metals server. We already have metals/inputBox that I believe is also supported in Vim.

@olafurpg
Copy link
Member

One VS Code api we don’t have an extension for right now is “quick open” (I think it’s called that). I’m not sure we need it for this feature however. We could add a server command “New Scala worksheet”. We might be able to expose this command in the context menu in VS Code but it should also be possible to invoke the command from other editors.

@ckipp01
Copy link
Member

ckipp01 commented Mar 22, 2020

Closed via #183

@ckipp01 ckipp01 closed this as completed Mar 22, 2020
kasiaMarek pushed a commit to kasiaMarek/metals-vscode that referenced this issue Mar 29, 2023
…rn/types/node-14.10.2

Bump @types/node from 14.10.1 to 14.10.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants