ZIm/crates/language/src
Smit Barmase 7c76cee16d
language: Fix indent suggestions for significant indented languages like Python (#29625)
Closes #26157

This fixes multiple cases where Python indentation breaks:
- [x] Adding a new line after `if`, `try`, etc. correctly indents in
that scope
- [x] Multi-cursor tabs correctly preserve relative indents
- [x] Adding a new line after `else`, `finally`, etc. correctly outdents
them
- [x] Existing Tests

Future Todo: I need to add new tests for all the above cases.

Before/After:

1. Multi-cursor tabs correctly preserve relative indents


https://github.com/user-attachments/assets/08a46ddf-5371-4e26-ae7d-f8aa0b31c4a2

2. Adding a new line after `if`, `try`, etc. correctly indents in that
scope


https://github.com/user-attachments/assets/9affae97-1a50-43c9-9e9f-c1ea3a747813

Release Notes:

- Fixes indentation-related issues involving tab, newline, etc for
Python.
2025-05-07 23:05:42 +05:30
..
syntax_map chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
buffer.rs language: Fix indent suggestions for significant indented languages like Python (#29625) 2025-05-07 23:05:42 +05:30
buffer_tests.rs language: Fix language_scope_at for markdown code comments (#29230) 2025-04-23 01:20:25 +05:30
diagnostic_set.rs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
highlight_map.rs Docs for indent_size_for_line and co 2024-01-09 20:50:34 +01:00
language.rs language: Fix indent suggestions for significant indented languages like Python (#29625) 2025-05-07 23:05:42 +05:30
language_registry.rs debugger: Rework language association with the debuggers (#29945) 2025-05-06 20:16:41 +02:00
language_settings.rs debugger: Rework language association with the debuggers (#29945) 2025-05-06 20:16:41 +02:00
manifest.rs project: Track manifest locations per unique manifest locator (#27194) 2025-03-21 15:22:36 +01:00
outline.rs Fix panic when outline items have no name (#24574) 2025-02-10 18:50:26 +00:00
proto.rs Tidy up diagnostics more (#29629) 2025-04-29 19:53:05 -06:00
syntax_map.rs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
task_context.rs debugger: Rework language association with the debuggers (#29945) 2025-05-06 20:16:41 +02:00
text_diff.rs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
toolchain.rs toolchains: Add support for relative paths (#27777) 2025-03-31 19:48:09 +02:00