Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Styling breaks at deeply nested scope #18

Open
dsl101 opened this issue Mar 18, 2020 · 2 comments
Open

Styling breaks at deeply nested scope #18

dsl101 opened this issue Mar 18, 2020 · 2 comments

Comments

@dsl101
Copy link
Contributor

dsl101 commented Mar 18, 2020

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:

image

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?

@dsl101
Copy link
Contributor Author

dsl101 commented Mar 18, 2020

I suspect it is the depth of nested scopes. This example demonstrates. But still, is this the theme or syntax file?

image

// 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') })
}
}
}
}
}
}
}
}
}

@Pixel48
Copy link

Pixel48 commented Jul 20, 2021

Idk, if it's a good pleace but imported types:
On build-in monokai
obraz

On Monokai++:
obraz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants