Adding Language Support for Go#391
Adding Language Support for Go#391pokey merged 15 commits intocursorless-dev:mainfrom trace-andreason:main
Conversation
pokey
left a comment
There was a problem hiding this comment.
Looks really good! Left a few comments. Let me know if you have any trouble with the test case recorder 😊
There was a problem hiding this comment.
Wow 👏! Fantastic first PR 😄
There are a few more tests I'd love to see:
- "chuck arg" when there are two args in the arg list, to ensure that comma is properly cleaned up on removed arg
- "chuck arg" when there is one arg in the arg list, just to make sure delimiter code doesn't get tripped up
- "take every key" to ensure that sibling expansion works properly for keys
- "take every item" to ensure that sibling expansion works properly for items
- "take key" where the cursor is in the key itself
- "take value" where the cursor is in the value itself
- "take round" with a document like so:
"(hello)", and cursor in the middle ofhello. Will only work if you're ondevelopbranch of cursorless-talon - "clear if state"
- "clear condition"
Also, in other languages, we're able to say "take value" to select the value of a return statement. Would that be useful in Go in your opinion?
| @@ -0,0 +1,23 @@ | |||
| languageId: go | |||
There was a problem hiding this comment.
Another minor one for the future; not worth rewriting your tests, but we generally try to use "clear" for modifier tests so that the test case is easier to read; don't have to count character indices 😅. Not a big deal because in the future we'll have a better format for modifier tests that doesn't depend on which action you run
|
Also, would be great if you could file a PR against https://github.com/pokey/vscode-parse-tree for the parse tree support |
|
@pokey isn't go already in there? |
Ohhh ok. That's how you did it 😂. Forgot go was already supported by that extension |
|
@pokey ok, added almost all those tests. I didn't add these two: "take round" with a document like so: "(hello)", and cursor in the middle of hello. Will only work if you're on develop branch of cursorless-talon Do I have to add the first? I based my branch on main. For the second, I can't get the |
| > = { | ||
| c: cpp, | ||
| cpp, | ||
| csharp: csharp, |
There was a problem hiding this comment.
Looks like issue with resolving merge conflict
| csharp: csharp, |
no worries; I just added them myself. Thanks for all the great work! This should be released in the next couple days |
|
Thanks @pokey and @AndreasArvidsson! I'm planning to do rust next! |
|
Good work! :) |
I haven't recorded any test cases yet, but everything seems to be working. The only thing that is missing is
classandclass nameas go does not have classes.