Skip to content

Commit

Permalink
Merge pull request #282 from tgodzik/named-bounds
Browse files Browse the repository at this point in the history
improvement: Show named bounds properly
  • Loading branch information
tgodzik authored Jan 15, 2025
2 parents 4e8c40f + 1d4029f commit ac5fe2d
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 1 deletion.
18 changes: 18 additions & 0 deletions src/typescript/Scala.tmLanguage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,9 @@ export const scalaTmLanguage: TmLanguage = {
{
include: '#xml-literal'
},
{
include: '#namedBounds'
},
{
include: '#keywords'
},
Expand Down Expand Up @@ -1018,6 +1021,21 @@ export const scalaTmLanguage: TmLanguage = {
],
comment: 'For themes: Brackets look nice when colored.'
},
namedBounds: {
patterns: [
{
match: `\\s+(as)\\s+(${idLower})\\b`,
captures: {
'1': {
name: 'keyword.other.import.as.scala'
},
'2': {
name: 'variable.stable.declaration.scala'
}
}
}
]
},
qualifiedClassName: {
match: `(\\b([A-Z][\\w]*)(?:(?<=_)${opchar}+)?)`,
captures: {
Expand Down
Loading

0 comments on commit ac5fe2d

Please sign in to comment.