cursorless
cursorless copied to clipboard
Add `"declaration"` scope type
Add a scope type for top-level declarations, e.g., functions, classes, types, interfaces, etc.
Here's all the top-level declarations for Haskell, together with the scope types that (might) fit them:
- adt declaration (
"type") - class declaration (
"class") - data family declaration (
"type"?"funk"?) - data instance declaration (
"type"?"funk"?) - default declaration (-)
- deriving declaration (-)
- fixity declaration (-)
- foreign export declaration (
"funk"?) - foreign import declaration (
"funk"?) - function declaration (
"funk") - import declaration (-)
- instance declaration (
"class"?) - newtype declaration (
"type") - pattern synonym declaration (-)
- role annotation declaration (-)
- type alias declaration (
"type") - type family declaration (
"type"?"funk"?) - type instance declaration (
"type"?"funk"?)
It'd be great to capture all these as "declaration" rather than not targeting them or adding separate scope types for each.
I'm guessing this is a swear word in the Haskell world, but we would call those "state" in other languages. Considering talon commands and scm patterns are also called "state", I don't think this is more of an abuse than those