-
Notifications
You must be signed in to change notification settings - Fork 1
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
Opening paren on next line #3
Comments
I thought about that too. Certain filetypes have the same issue quite frequently. One challenge around that is when the line above doesn't have any useful information or information you don't want in it. {
"key1": "val1",
},
{
"key1": "val2",
}, This for example would fall into the same category, but wouldn't be solved by grabbing the line above. One possible solution would be to check the line above for length > 1 if the length of the match is 1 and then return the line above if it is. if len(matchingLine) == 1 {
if len(lineAbove) > 1 {
return lineAbove
}
return matchingLine
} Something like that as the test. Do you have a better idea how to logically and correctly pick the correct line to display? |
Why are you not using treesitter? It should show you the correct line without worrying about formatting. |
The latest version does not use treesitter, but I was using it to check for the correct filetype so that the plugin doesn't activate on non-code buffers. The latest version just checks for the filetype directly. |
Hello,
great plugin. I love it.
Some of my projects force the opening paren in cpp files on the next line.
The result looks like this:
Is it possible to show the if line (69) instead of the opening paren (70)?
The text was updated successfully, but these errors were encountered: