You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Josh Bleecher Snyder edited this page Aug 17, 2023
·
5 revisions
This page is about Go-related Cursorless tips and quirks. It will eventually be subsumed by a Go docs page.
For the most part, Go is like any other Cursorless-supported language, and the first port of call is the main Cursorless documentation.
Scopes
Maps and lists
Cursorless considers any composite literal that contains any indexed element to be a map. That includes maps (map[string]int{"a": 2}), structs using field names (T{a: 2}), and arrays and structs with numeric indices ([256]bool{58: true}). It also includes {}.
Similarly, Cursorless considers any composite literal that contains any non-indexed element to be a list. That includes slices and arrays ([]int{2} and structs not using field names (T{2}). It also includes {}.
Funk refers to any func or method, generic or not, including both declared (func f() {}) and anonymous ones (f := func(){} or go func(){}). Lambda only refers to anonymous functions.