-
Notifications
You must be signed in to change notification settings - Fork 149
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
feat: add NewObject
completion
#7605
base: master
Are you sure you want to change the base?
Conversation
Was testing out the completers and got an error from the program below (which is not a valid program but I was midway through typing it). pub def main(): Unit \ IO =
println("The sum from 0..42 is")
pub def f(x: Option[a]): Option[a] = match
|
Thanks-- can you open a ticket for the bug? |
For the completer, it should fill in all methods you have to implement. |
For example, if you write |
Thanks! Working on it 😄 🏃 🔨 |
Goal is like Intellij IDEA when you get it to fill out everything you have to implement. So a bit like |
Hmm it's kind of awkward to do completions as the new parser fails when writing |
Ok this is close to done. The only thing I'm not sure how to approach is that |
A few screenshots of different completions? |
I think our best option is probably to make a new formatter for generated code. We might be able to use the SimpleType interface. |
Roger that. I was afraid you were going to say that hehe :D |
Before writing a lot of code, just reuse FormatType. Perfect is the enemy of good here. We don't want yet another formatter to maintain. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
General comments:
- We should also add support to Parser2. Maybe @herluf-ba can help?
- Add some doc comments for the helper functions.
- I don't think you need System.lineSeparator. I think \n is sufficient because it is interpreted by VSCode.
Closes #6326