-
-
Notifications
You must be signed in to change notification settings - Fork 96
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
v3: Context different between v2 and v3 #632
Comments
Yeah, it's by design, and there isn't a way to get the old behavior. The way this worked by default in v2 wasn't great. And it only worked for some languages. I could add a hook for the scope, but there is quite a bit of complex logic for getting it right. I'm a bit afraid people will use it wrong. 🤔 |
You could monkey patch Maybe I can add an include for scope for that. |
I have this from a very old version of indent blankline :)
|
I'm fine with that. Adding include doesn't hurt. 👍 |
pushed now |
Works like a charm! {
node_type = {
lua = {
'chunk',
'do_statement',
'while_statement',
'repeat_statement',
'if_statement',
'for_statement',
'function_declaration',
'function_definition',
'table_constructor',
'assignment_statement',
},
typescript = {
'statement_block',
'function',
'arrow_function',
'function_declaration',
'method_definition',
'for_statement',
'for_in_statement',
'catch_clause',
'object_pattern',
'arguments',
'switch_case',
'switch_statement',
'switch_default',
'object',
'object_type',
'ternary_expression',
},
},
} |
Hey!
I'm giving v3 a test, and I noticed that context is working differently between the old (v2) and new (v3) versions.
![old-version](https://camo.githubusercontent.com/96395657109abf926bca2c3106b49241cc1a57feb9ebbb3a24360d54566f2dad/68747470733a2f2f692e696d6775722e636f6d2f7a7a75325045362e706e67)
Old version:
New version:
![new-version](https://camo.githubusercontent.com/97ef84e2efc396d2efe686369efaa35522b4acf38a9d2be97aecc576e81612b3/68747470733a2f2f692e696d6775722e636f6d2f61576b4f6c75462e706e67)
I saw this in the help:
And I'm assuming this is by design.
Is there a way to get the old behavior with the new version? I couldn't find anything in the config besides
exclude
that does the opposite.The text was updated successfully, but these errors were encountered: