atom-fold-functions
atom-fold-functions copied to clipboard
Fold "type NAME struct {...}" on Golang
Is there a way to fold Golang-struct
type user struct {
Name string
}
🔻
type user struct {...}
❓
Hi, I believe you can in a couple steps:
- Figure out the scopes on those lines. I do have a scopes command in the extension, but I have forgotten how to trigger it :D There are also some baked-in commands for it too but I think they only show the scope at the cursor.
- And add them to your config for the extension... Here is a bit more on that: https://github.com/robballou/atom-fold-functions#configurable-scopes-new
Basically this extension works off the scopes defined in a language. The configurable scope thing lets you configure in case languages have different features or different ways of marking things. I hope this makes sense and helps. I'll leave this open in case there are any issues with setting this up.