monokai-plusplus
monokai-plusplus copied to clipboard
Styling breaks at deeply nested scope
Again, I'm unsure if this is a syntax issue or a theme issue, but here's the block of code showing the problem. Highlighting from the permission variable inside the second promise handler starts to go wrong, and never really recovers:

The scope data for the first (correct) permission is:
Scope: text.html.vue
source.js.embedded.html
source.js
meta.export.js
meta.object-literal.js
meta.object-literal.js
meta.function.js
meta.block.js
meta.conditional.js
meta.block.js
meta.for.js
meta.block.js
meta.switch.js
meta.block.js
meta.block.js
meta.conditional.js
meta.block.js
meta.function-call.method.js
meta.group.js
meta.function.declaration.js
variable.parameter.function.js
Fg Name: Member variables
Fg Scope: variable.language, variable.other.member, variable.parameter, variable.other.readwrite.member, entity.other.attribute-name
Bg Name: background
Bg Scope: background
Syntax File: Packages/Vue Syntax Highlight/Vue Component.sublime-syntax
tmTheme File: Packages/User/Monokai++.tmTheme
and for the second (incorrect) one it's:
Scope: text.html.vue
source.js.embedded.html
source.js
meta.export.js
meta.object-literal.js
meta.object-literal.js
meta.function.js
meta.block.js
meta.conditional.js
meta.block.js
meta.for.js
meta.block.js
meta.switch.js
meta.block.js
meta.block.js
meta.conditional.js
meta.block.js
meta.conditional.js
meta.block.js
meta.function-call.method.js
meta.group.js
meta.function.declaration.js
variable.parameter.function.js
Fg Name: Normal
Fg Scope: keyword.operator.dereference.java, meta.preprocessor.haskell, punctuation.separator.java, variable.parameter.java, variable.parameter.js, meta.group.js, meta.group.go, punctuation.section.class.begin.python, support.variable.dom.js, constant.character.brace, constant.character.end, constant.character.paren, constant.character.quote, support.class.js, punctuation.section.group.begin.js, punctuation.section.group.end.js, meta.template.expression, meta.group.braces, source.groovy.embedded.source, punctuation.section.class.end.groovy
Bg Name: background
Bg Scope: background
Syntax File: Packages/Vue Syntax Highlight/Vue Component.sublime-syntax
tmTheme File: Packages/User/Monokai++.tmTheme
Can you tell what's going wrong here?
I suspect it is the depth of nested scopes. This example demonstrates. But still, is this the theme or syntax file?

// 8 levels OK
if (true) { // 1
if (true) { // 2
if (true) { // 3
if (true) { // 4
if (true) { // 5
if (true) { // 6
if (true) { // 7
if (true) { // 8
p.then(result => { console.log('meh') })
}
}
}
}
}
}
}
}
// 9 levels not OK
if (true) { // 1
if (true) { // 2
if (true) { // 3
if (true) { // 4
if (true) { // 5
if (true) { // 6
if (true) { // 7
if (true) { // 8
if (true) { // 9 Syntax colouring breaks from here
p.then(result => { console.log('meh') })
}
}
}
}
}
}
}
}
}
Idk, if it's a good pleace but imported types:
On build-in monokai

On Monokai++:
