bcampolo / nvim-starter-kit

Neovim Starter Kit
MIT License
242 stars 37 forks source link

indentation looks a bit off in java #22

Open milind-shakya-sp opened 3 weeks ago

milind-shakya-sp commented 3 weeks ago
 | | |   private final String m_result;
 | |

For eg in the above snippet, if I hit enter after semicolon, I end up 4 spaces before private in the next new line.

Sorry to the short description. Will try to add more info if you need.

bcampolo commented 3 weeks ago

The indentation uses treesitter, so it doesn't necessarily indent based on the indentation of the line you are hitting enter on, but instead it will indent based on how deep you are in the condition/loop blocks and on the formatter which defaults to two spaces per level of indentation. If you provide a sample file as an example I can provide more help.