Skip to content

Instantly share code, notes, and snippets.

@tooolbox
Last active September 14, 2020 17:31
Show Gist options
  • Save tooolbox/5cafd0d07de711b3d554d7b0087760e1 to your computer and use it in GitHub Desktop.
Save tooolbox/5cafd0d07de711b3d554d7b0087760e1 to your computer and use it in GitHub Desktop.
List of feature requests or bug reports for Chime

Moved into comments

...To support emoji and screenshots.

@tooolbox
Copy link
Author

version-1 1 1

Version 1.1.1 released! Updating the above based on this.

@tooolbox
Copy link
Author

tooolbox commented Apr 13, 2020

  • Enhancement: When you've just opened a new file/project, sometimes Show Definition (via Alt+Click) is not immediately available, probably because gopls is still loading & indexing. In this case, Alt+Click doesn't activate, but there is also no visual indicator. Possibly the loading spinner should be running while gopls is indexing, or it should give the loading spinner when you Alt+Click before gopls is ready, and persist it until the Show Definition finally goes through.
  • Enhancement: Show <search icon> 0 in the status bar if there are no find results. Currently you are given a find-count when you do a search, but if your search returns no results, the status bar shows - as if you weren't searching at all. Might be good visual feedback to have - while it's searching, and then show <search icon> 0 if there are no results. This tells you definitively that there are no results and also helps you know when searching is done.

With results:
with-results

Current with zero results: (looks like you're not searching at all)
zero-results

  • Feedback: The Find counter increments upward in realtime as Find In Project works its magic, which is great.
  • Enhancement: Show the Loading spinner while Search is running?

@tooolbox
Copy link
Author

tooolbox commented Apr 14, 2020

  • Bug: In certain conditions, Undo will incorrectly create duplicate characters such as for " or { (this is part of the open/close thing that Chime does). This can make it so that repeated Cmd+Z will not actually reproduce the original text content of your document. πŸͺ² πŸ”₯ πŸͺ² πŸ”₯ Here's the breakdown:
    • Type " -> "|"
    • Type Right -> ""|
    • Type Backspace -> "|
    • Type Cmd+Z -> ""|" (extra quote produced)
  • Bug: When auto-completing a string field, if you type " then it will put quotes around the placeholder, which is not necessarily incorrect, but the 2nd quote is a smaller font! Aside from the font size bug, it would ideally create "|" rather than "<placeholder>". πŸͺ² Sample:

Screen Shot 2020-04-13 at 7 37 31 PM

  • Feedback: Wow, when I have a function return value of *foo and a variable var apple foo and I auto-complete return ap its top suggestion is return &apple, i.e. it auto-completes to taking the address of the variable because it knows the return type is a pointer. Wow, that's great.
  • Bug: Sometimes when doing format-on-save, the focus jumps around in the file. It should keep the same viewport as much as possible. πŸͺ² πŸ”₯

@tooolbox
Copy link
Author

tooolbox commented Apr 14, 2020

  • Enhancement: Using Cmd+/ to comment a block of code should comment it at its current indentation. Otherwise when you format-on-save the whole code block shifts.
  • Feature: If your cursor is on the far left side of the screen and the line above you is indented some amount, then hitting Tab would indent to match the line above you, instead of just inserting one tab character. (Added in v1.1.8!)
  • Feature: If I do a go get -u xyz.com/user/module in the project where I have Chime open, this will change the version of a particular package, and possibly the API as well. I've noticed when I've done this that the autocomplete doesn't update, but I would expect it to. Possibly some gopls cache needs to be emptied.
  • Feature: Starting auto-complete manually via Ctrl+Space or other means would ideally focus on the cursor, even if it's off-screen.
  • Bug: If there is a word character immediately to the right of your cursor, and you hit a character that normally gets automatically closed (" or ' or ( or {) then don't auto-close. I.e. |The... + ( should not produce ()|The... as it currently does. πŸ”₯ πŸͺ²

@tooolbox
Copy link
Author

  • If Search is open, hitting Escape should re-focus the cursor on the text. As of v1.1.1 hitting Escape does properly close Search but I have to then click on the text window to get my cursor back. (This may be after hitting Cmd+G a couple of times, not sure.)

@tooolbox
Copy link
Author

Screen Shot 2020-04-25 at 8 00 31 PM

Version 1.1.2 released!

Fix: Certain autocomplete results could render incorrect placeholder label/content

This sounds perhaps like the issue of small " or } characters after a placeholder label/content but I seem to still have this issue after the upgrade.

Whitespace characters are cool though! And gopls 0.4.0 gives support for the -modfile flag that's been added to go 1.14, which should help things.

@tooolbox
Copy link
Author

tooolbox commented May 3, 2020

Screen Shot 2020-05-03 at 4 12 23 PM

Version 1.1.3 released!

Feature: control over line wrapping behavior

This is fantasticβ€”checking off that feature above, based on this!

Feature: tab completion acceptance, with optional partial matching

That seems like "hitting tab with the autocomplete menu open accepts (activates) that particular completion", just to state it verbosely. (Not sure what the "optional partial matching" part is.) I checked and it works great, you can hit Tab to pick a completion now! Checking off my note above.

@tooolbox
Copy link
Author

tooolbox commented May 16, 2020

Screen Shot 2020-05-16 at 2 55 55 PM

Version 1.1.4 released!

Looks like they are all great bugfixes, although not things I had personally encountered. (Admittedly my Go writings have ebbed the last few weeks.) I do think that text view incorrectly sized until the containing window itself was resized did happen to me once.

Altogether, awesome! πŸ‘

@tooolbox
Copy link
Author

tooolbox commented Jun 13, 2020

I missed v1.1.5!! 😱

Well, now we have v1.1.6!

Screen Shot 2020-06-13 at 2 34 00 PM

Well how about them apples? Release notes on the website and a link from within the app! Checking that point off my wishlist...

Not familiar with the other two bugs/points mentioned.

Okay, how about v1.1.5?

Screen Shot 2020-06-13 at 2 37 08 PM

Hold on, hold the phone, what the flip? Let me go try this...

EDIT: Works great!

@tooolbox
Copy link
Author

tooolbox commented Jun 13, 2020

  • Hotkey for Show Semantic Details so you don't have to go the mouse. πŸš€
  • Currently, autocomplete uses the package name as the placeholder text (with the rest of it in a little tag above it, before you accept the autocompletion) but I think the name of the thing should be primary, and the package name secondary. If everything's from the same package, the placeholders are all the same, which isn't super helpful. πŸ”¨
  • If you start a function call and then auto-complete it, would be good if you auto-complete generated placeholders for the assignment variables, as well. Like, you type ioutil.ReadFile and when you accept auto-complete you get <[]byte>, <error> := ioutil.ReadFile(<filename>). This could also be a specific mode, like you use Cmd+Enter to accept it. For bonus points, if there's already an assignment in place, detect if the user has typed the wrong number of arguments, and add/remove arguments as necessary. πŸš€
  • Syntax highlighting for .proto files.
  • Format-on-save nukes placeholders 😒 (I do understand that this would take some work to implement)
  • If I have fully typed an appropriate autocomplete result, autocomplete should hide. This would include keywords such as return or else. For example if I'm at the end of a function and I type return then autocomplete should hide. Also a close parentheses, I think?
  • I guess autocomplete should suggest keywords, too? Like, if I start typing ret then it should suggest return. Also builtin types like error.
  • Would be good if syntax highlighting could identify builtin types like error.
  • Sometimes, but not always, autocomplete will "restart". Let's say I type co and then ctrl+space, and select const. Sometimes it will produce const and sometimes it will "restart" and produce coconst. πŸͺ²
  • When I type something, and then click away/off, sometimes the auto-complete appears a split second later. In other words, clicking away currently closes autocomplete, but it should also deactivate the timer if autocomplete is about to pop up. πŸͺ²
  • Similarly, I type something and then cmd+arrow to the end of the line, auto-complete appears a split second later. πŸͺ²
  • Can you please bundle SF Mono and make it the default, like Xcode? πŸ˜„ (The answer is no, can't be used in commercial projects. They should make an exception heh.)
  • When opening a (locked?) file that doesn't fit in the window horizontally, when the file isn't fully loaded (scrolling down makes more of it appear) I can't scroll all the way to the left. When I do, it jumps a little to the right, approximately but not exactly a tab width. πŸͺ² (Fixed in v1.1.7)
  • Pasting shouldn't trigger autocomplete. (Fixed in v1.1.7)
  • Hitting Cmd+Left correctly goes to the start of the text on the current line, but Cmd+Shift+Left still highlights all the way to the beginning of the line, regardless of where the text starts.
  • When typing while the autocomplete is showing, typing a _ character (even if it appears in the autocomplete options) causes the autocomplete to dismiss.
  • Sometimes autocomplete placeholders disappear for no apparent reason.

@tooolbox
Copy link
Author

tooolbox commented Jun 16, 2020

  • Would like to have auto-complete on import paths, based on other imports in the project or just what's available in my on-disk module cache. For bonus points, ensure they're correctly versioned i.e. "github.com/org/repo/v2" as an auto-complete option, if that's an/the appropriate import path. For extra bonus points, if I paste the URL https://github.com/org/repo into my imports section: (1) start auto-complete wherein it suggests github.com/org/repo and (2) in that exact scenario, if there's an autocomplete result (from my module cache theoretically) that fuzzily matches such as golang.org/x/repo then suggest that as well, in case that's what I really want. πŸš€
  • Specifically on moving Alt+Left and Alt+Right, periods should be word boundaries. So if I have |one.two then Alt+Right produces one|.two and then another Alt+Right produces one.two|. There's probably a bunch of other characters that that applies to but I'm running into it a lot with periods. πŸ”₯ πŸ”₯
  • Note that the above point about Alt+Left and Alt=Right also applies when you're holding shift. So having |one.two and pressing Shift+Alt+Right produces [one].two (where [ ] are showing the selection). πŸ”₯ πŸ”₯
  • Typing a period in a comment shouldn't trigger autocomplete. πŸͺ²
  • In terms of autocompleting return, it should probably only auto-complete to a bare return if I'm in a function with named return values, or no return values? Alternatively, if you're in a function where bare return isn't valid, auto-complete to return (with a space) as a hint that you need to type some stuff you're going to return.
  • Auto-completing return could also auto-complete to likely candidates for return that are currently in-scope. It does something like this when you start to type what you're going to return, and even (I think) suggests dereferencing pointers and such, but it could start with you typing ret.
  • Shift+tab should undo Tab (delete a tab character)
  • Somehow I managed to get illegal character U+2028 while building.

@tooolbox
Copy link
Author

  • Using Cmd+/ on a section of commented-out lines that has a gap in it re-comments them instead of properly un-commenting them. Example:
// hello
// world

// foo

If you select all the above lines together and do Cmd+/ you would expect:

hello
world

foo

But it produces:

// // hello
// // world
//
// // foo

@tooolbox
Copy link
Author

tooolbox commented Jun 16, 2020

  • When auto-completing a series of comma-separated struct-field-accesses for the sake of assignment, struct fields don't auto-complete after the first one. For example, you have type Foo struct { b []byte; err error } and you want to do ioutil.ReadFile() and put the result into the struct. If you type myFoo.| then you get auto-complete results for b and err but when you keep going to myFoo.b, myFoo.| the auto-complete shows you other variables in scope instead of err. (You want to keep typing to produce the final result of myFoo.b, myFoo.err = ioutil.ReadFile("...") πŸͺ²
  • When auto-completing an argument (to a function or as a return value, for example) normally auto-complete is smart enough to take an address or dereference a pointer based on the type of what's being autocompleted, i.e. it can autocomplete return myS to return *myStr or func(ap to func(&apple). However, if the argument is a struct field, and you've already typed the struct, autocomplete won't automatically dereference or take the address. For example, in the case of func(fruit.ap, autocomplete will actually show &apple in the completion box, but when you accept the completion you get func(fruit.apple). It does work if you type func(fr and see &fruit.apple in the completion box, you accept it and get func(&fruit.apple). So it seems like it just needs some logic to put the & or * at the start of the expression if you're already one or more "levels into it". πŸͺ²
  • Something that is not done by Sublime but is probably (?) a good idea is "ghosting" through commas in a struct literal. (The term ghosting which I am randomly selecting/coining here means where the editor moves the cursor past/through a character instead of making another one.) So in the way where you have "hello world|" and type " and wind up with "hello world"| I think it makes sense to have Field: blah|, and type , and get Field: blah,|. This comes up when I'm writing out several fields of a struct, the autocomplete is killer both for locating what field I want to insert and then populating the value, particularly if it's a function of some kind. But then after populating the value I have to move my hand to the arrow keys and hit Right before Enter to go to the next line. Being able to just hit , I think would be an improvement--could also test it out to see. Note that the context for being able to do this would probably be restricted to when you're in a struct literal.

@tooolbox
Copy link
Author

tooolbox commented Jun 16, 2020

A completion placeholder is itself not all that useful for anything except typing. Some ideas:

  • You can't trigger auto-complete (Ctrl+Space) when you're highlighting a placeholder; you should be able to, and it should filter by what can fit in that location! Xcode allows you to start auto-completion with Ctrl+Space but don't seem to filter the list by what's applicable to that spot.
  • Hitting Enter while you're on a placeholder should insert some text, put your cursor at the end of the text, and...possibly start autocomplete. I'll cover some rules for that below.
  • Hitting Backspace while you're on a placeholder should delete the placeholder and automatically prompt autocomplete, obviously showing what options are applicable for that spot.

Placeholders

  • For a function, the placeholders are the variable names. i.e. t.Errorf(οΏΌ[format], [args]οΏΌ). Hitting Enter on them inserts the text of the variable name and puts your cursor after it. If there is already an appropriately-typed variable with the same name available in your scope, don't start autocomplete. Otherwise start autocomplete, prioritizing the in-scope options of the appropriate type, but the current text that was just inserted is the first item on the list and pre-selected. Hitting Tab right away just accepts the current value, dismissing auto-complete. Hitting it again jumps to the next placeholder if there is one.

This is important, for example if you auto-complete a function like func(err error, b []byte) so you get func([err], [b]) and you hit Enter you get func(err|, [b]) and if you have a variable called err in scope you can just hit Tab right away to jump to [b]. If you don't have one, then autocomplete pops up and you can select your other weirdly-named variable called e.

  • For a field in a struct literal, the placeholder should be the type of what goes there (since the name is already there to the left, you just typed it or whatever). Enter on the placeholder should make a best-effort to insert the proper constructor for that type, so either a struct literal, a slice literal, a "" with your cursor in between like "|", or an empty space with autocomplete started for things like error or int. If it's a struct or a slice literal, it would have & as appropriate if the field is a pointer type. If it's a *string you wouldn't get &"|" since that's invalid, you would just get &| with autocomplete started as a hint that you need to pick an existing string. (Hitting Tab on the placeholder should maybe start autocomplete, since you pretty much never mean to insert a tab character and there's only ever one placeholder in this scenario? Not totally sure if this is the best idea.)

This is important because it lets you populate things quickly. If you want to just pick an existing thing rather than get a whole struct literal, then do Ctrl+Space or Backspace, or better yet just start typing.

  • For a field in a struct literal, the placeholder should be the name of the type. If it's a type in another package, it should still be the name of the type, except the package name appears in the little tag above the placeholder. When you hit Enter then it inserts the package name as part of the constructor. (This was probably obvious.)
  • For a function argument, when you hit Enter and insert the text of the placeholder, and you don't have a matching variable in-scope and autocomplete is triggered, an option near the top should be the constructor for that type.
  • When you are completing a function you can see the signature including the types and stuff (in whatever space you can fit obviously). When you pick that function and it completes in there, along with placeholders, your placeholders now have the variable names but not the types, which you sometimes want to know. It would be great to have it so the little "type tag" above the placeholder appears for whatever placeholder you are currently highlighting, so you know what it wants before you start typing. It would only be for the one you currently have highlighted. This could be toggle-able in Preferences.

Auto-completing...
Screen Shot 2020-06-16 at 4 23 53 PM

Completed!
Screen Shot 2020-06-16 at 4 23 31 PM

Hm, what are the exact types again? What if: (excuse the poor photoshopping)
edited

@tooolbox
Copy link
Author

tooolbox commented Jun 16, 2020

  • Sometimes gofmt gets stuck and just won't format. I have to close the tab and re-open the file and then it works. πŸͺ²
  • Would be nice to have "developer mode" with debug output? Just to help with bug reports.
  • Would be nice to have some sort of more global indicator as to when gopls has "loaded" and is "ready" and so on. In VSCode generally you see certain things underline and files in the listing change color. I know those aren't meant to be indicators of gopls loading, they're indicators of things that gopls is doing (linting or whatever) but having an equivalent in Chime would be handy.
  • Maybe start gopls in the background on startup so Chime is ready to use faster when you do open it? πŸ˜„
  • Typing . in a string shouldn't trigger auto-complete. πŸͺ²
  • Let's say I have a struct with a field of type time.Time. When I'm filling out a struct literal, if I have a function that produces a time.Time, autocomplete will put the function into the field but not actually spell it out with arguments and return values and all that. πŸͺ²
  • Show hidden files & folders in the left pane (greyed out). πŸš€

@tooolbox
Copy link
Author

tooolbox commented Jun 17, 2020

  • When auto-completing a function that has an argument that is itself a function, the "inner" function doesn't need to have its params be placeholders.
  • Just relaunched Chime after a crash and seems like the loader is borked: πŸͺ²
    Screen Shot 2020-06-17 at 11 58 02 AM

@tooolbox
Copy link
Author

tooolbox commented Jul 2, 2020

Version 1.1.7!

Screen Shot 2020-06-29 at 11 58 47 AM

This one's great: pasting and undo/redo no longer trigger completions

@tooolbox
Copy link
Author

tooolbox commented Jul 24, 2020

Version 1.1.8!

Screen Shot 2020-07-23 at 8 15 52 PM

(Seems like I had already downloaded v1.1.8 earlier?)

  • Great on the type-through for " and '. Marked this as fixed!
  • I just reworked my homegrown Monokai theme to be dark instead of light, noticed that (like all operators) <- isn't a different color, which kinda makes it blend in with surrounding text. Will append this to my list up above.
  • Excellent on the indentation when I hit Tab and all that. Seems a lot more robust. Marked as fixed!
  • Page Up/Page Down should move the cursor, not just the viewport.
  • Hitting Save should close autocomplete.
  • I can't seem to close Find In Project! Hitting the X does nothing. πŸͺ²
  • Autocompletion feels more precise or crisp somehow.
  • Autocomplete options don't always sort in the most sensical fashion. Sometimes I'm typing the beginning of something, and it's in the list, but something that is not prefix-matching sorts to the top. πŸͺ²
  • When I'm typing fast and try to choose an autocomplete, sometimes hitting "Enter" inserts a literal enter character instead of selecting the autocomplete. πŸͺ²
  • Whenever the terminal command comes out, it should be chm because chime is hard to type. πŸš€
  • Quotes shouldn't double-up if you have an unmatched one earlier on the line. For example, if you have "the quick brown fox | and you hit " you should get "the quick brown fox "|. Currently Chime produces "the quick brown fox "|" πŸͺ²
  • May have mentioned this earlier, but delimiters if you type an opening delimiter to the left of existing text, it shouldn't double-up. Meaning if you have alpha |beta and you type " it should produce alpha "|beta. Right now chime produces alpha "|"beta. πŸͺ²
  • Sometimes when I hit Save and it goes to format, it lags--I can still move my cursor around with the arrow keys, but the Edited status up top doesn't go away for a few seconds, then it sort of "jumps" (pointer rainbow-balls for a split second, cursor slows and then fast-forwards briefly) and saves. πŸͺ²
  • Weird line number bug; closing & reopening the file fixed it: ( πŸͺ² )

Screen Shot 2020-07-25 at 4 12 48 PM

  • When you have a dark theme, Chime starts up with the light theme, and then changes to dark once you open a file. πŸͺ²
  • Autocomplete seems to trigger at the start of a line, and upon . and possibly other special characters, but often/always not when I'm in the middle of a line of text. πŸͺ²
  • Example of incorrect sorting from auto-complete: I typed fals and hit enter, and it auto-completed to require.False instead of just plain false.

@tooolbox
Copy link
Author

Screen Shot 2020-09-14 at 10 21 30 AM

I missed this release.

@tooolbox
Copy link
Author

Screen Shot 2020-09-14 at 10 16 23 AM

@tooolbox
Copy link
Author

Screen Shot 2020-09-14 at 10 30 46 AM

This is cool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment