Commit graph

18 commits

Author SHA1 Message Date
Kasper Kondzielski
ee64345a37 fix: Correct scope definition for scala
`@scope` included `function_declaration` while is should have included `function_definition` instead. The former one is used to declare abstract functions while the latter one is used to define functions together with their bodies.
2023-04-28 00:34:23 +02:00
ghostbuster91
06075ecd04 fix(scala): Add missing locals definitions for scala 2023-04-01 14:29:43 -04:00
Chris Kipp
25dd24ed0e feat(scala): add in local variables queries
This syncs the queries that were updated in https://github.com/tree-sitter/tree-sitter-scala/pull/196.

Co-authored-by: ghostbuster91 <ghostbuster91@users.noreply.github.com>
2023-03-27 06:48:21 -04:00
Amaan Qureshi
5a87bc98da feat: add @comment.documentation where applicable 2023-03-05 17:15:32 -05:00
Chris Kipp
a943661be8 refactor(scala): update scala highlights for uppercase identifiers
This is a small change that comes from the discussion we had in
https://github.com/tree-sitter/tree-sitter-scala/discussions/168#discussioncomment-4718624.
The idea here is that we're sort of making an assumption on what an
uppercase identifier is in Scala and more times than not, it's actually
a `@type`. So this changes the `@constant` capture to a `@type` one. You
can find the full context in the linked discussion.
2023-01-21 17:59:30 +01:00
Chris Kipp
28aa6ba554
scala: add interpolator query (#4175) 2023-01-18 12:06:32 +01:00
Chris Kipp
1c89f9b5bc sync with latest Scala and add binding 2023-01-15 09:46:06 -08:00
Chris Kipp
add6f9abe2 refactor(scala): update the Scala highlight queries
There has been a lot of changes recently to the Scala grammar and we've
been merging in a handful of things before syncing the actual generated
parser. We are currently at a stage where we're going to sync
everything, but there are some breaking changes that are included in
https://github.com/tree-sitter/tree-sitter-scala/pull/135, so when that
commit gets synced here stuff will break. We've taken the queries that
existed here and have been building off of them in the actual upstream
repo. This will hopefully make the transition smooth and updates the
queries to ensure that there is no breakage. It's recommended to wait
until that pr is merged, synced here, and then merge this in around the
same time.

Co-authored-by: eugene yokota <eed3si9n@gmail.com>
Co-authored-by: Anton Sviridov <keynmol@gmail.com>
2023-01-14 12:56:56 -08:00
ObserverOfTime
abd7f85040 highlights(scala): use more specific groups 2022-11-26 13:17:51 +02:00
Lewis Russell
37398c7d68 feat(spell): support more languages 2022-09-26 13:47:12 +01:00
lfenzo
c784720917 Split func/method definition from calls in several programming language queries 2022-08-03 12:05:30 -07:00
Lewis Russell
011ac894ec Prefer lua-match over match
as string.find is much quicker than vim.regex:match*
2021-11-23 10:02:06 +01:00
Dundar Göc
6a4fdb317d chore: fix typos 2021-11-02 23:47:48 +01:00
Stevan Milic
ea0f6614b7 Add scala maintainer
Add fold for scala val definition to support type class entries
2021-10-07 23:24:45 +02:00
Stevan Milic
8c105dedec Add scala folds 2021-09-04 04:36:30 +02:00
Stevan Milic
59f881fff8 Update scala highlights
* add highlights for imports

* add highlights for type constructors

* add highlights for constants

* add highlights for interpolation string

* add highlights for comments through injection
2021-09-04 04:36:30 +02:00
Stevan Milic
a90e5f4c5f
update scala highlights (#1760)
* add type highlights

* add call expression highlights

* add function definition highlights

* add expression highlights

* add literals highlights

* add operator highlights

* add punctuation highlights

* add comment highlights

Co-authored-by: Stevan Milic <stevan.milic@tradecore.com>
2021-08-28 14:07:44 -05:00
Stuart Mashaal
4f2265632b
add keywords to scala highlights (#1662)
* add keywords to scala highlights

* special capture for special keywords

* add while to 'repeat' capture

* pr cleanup, exmaples in CONTRIBUTING.md

* add backquotes for consistency in docs

* group @repeat keywords, fix null

* comment-out 'macro' and 'forSome'

* fix 'this' and 'super' keyword

* remove accidental files 🤦

* update revision

* fix "super" and "this"

* godammit these .metals files are killing me

* why did I commit this???

Co-authored-by: Stuart Mashaal <smashaal@hopper.com>
2021-08-25 18:38:45 -05:00