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
Ruby indents braces ({
) incorrectly inside a method
#6114
Comments
For what it's worth, I have my desired indenting sort-of working through a variety of trickery. First, I use RRethy/nvim-treesitter-endwise to open and close my parens, braces, brackets and Next, I disable indenting on Ruby files, but enable vim regex highlighting for Ruby: require'nvim-treesitter.configs'.setup {
ensure_installed = { "ruby" },
highlight = {
enable = true,
additional_vim_regex_highlighting = { "ruby" },
},
indent = {
enable = true,
disable = { "ruby" },
},
endwise = {
enable = true,
}
} |
This sounds like a parser precedence stuff. Of course we can somewhat contain this with (ERROR) node handling. But that will be dangerous |
Describe the bug
When writing Ruby code with Treesitter's indent functionality enabled, typing an open brace
{
indents it all the way to the beginning of the line. Other characters, such as an open paren or an open bracket do not have this problem.Screen.Recording.2024-02-16.at.5.58.31.PM.mov
To Reproduce
:TSUpdate
sample.rb
){
}
Expected behavior
The left brace should not indent to the left, and instead should be indented to the right.
Output of
:checkhealth nvim-treesitter
Output of
nvim --version
Additional context
No response
The text was updated successfully, but these errors were encountered: