Open
Description
The new scala implementation is basic and is missing some implementations for certain Cursorless keywords that I punted off to a later time:
-
list
. This is weird for Scala because there isn't completely language-native syntax for lists. For lists generally you are just instantiating an object, e.g.val list = List(1,2,3)
, though there is a "fancy" list style:val foo = 1 :: (2 :: (3 :: Nil)) // List(1,2,3)
. Note that we can't just look fornode.name === "List"
, because there are other ways to construct a list, andList
could be qualified. See Scala support #399 (comment) for a bit more info -
map
. Similar to above, maps are just object instantiations, e.g.val map = Map("#000" -> "Black", "#F00" -> "Red")
. The->
syntax is also just sugar for an infix expression that creates a tuple, e.g. "#000" -> "Black" is the same as"#000".->("Black")
whic both generates("#000", "Black")
. -
collectionItem
,collectionKey
, andvalue
(as used for RHS of a map item). See above, infix_expression, key on left, item on right, operator = "->". See Scala support #399 (comment) for a bit more info -
regularExpression
."foo".r
, value of type field_expression, value of type string, field of type identifier = "r" -
attribute, xmlElement, xmlStartTag, xmlEndTag, xmlBothTags
. All XMLey stuff which is in Scala 2x, but deprecated in 3.x, and isn't supported well by the current tree sitter anyway. There may be certain implementations / libraries that everyone uses, not sure yet.
Also, note that an advanced scala feature that cursorless doesn't support is pattern matching, see: #434