Use first line comment prefix when toggling comments (#10335)

This fixed an issue introduced in
https://github.com/zed-industries/zed/pull/10126, where, when toggling
comments in a language with multiple line comment prefixes (e.g. Gleam,
Erlang) Zed would insert the *last* prefix instead of the first.

Release Notes:

- Fixed an issue where the `toggle comments` command inserted the wrong
line comment prefix in some languages (preview only).

Co-authored-by: Marshall <marshall@zed.dev>
This commit is contained in:
Max Brunsfeld 2024-04-09 14:22:47 -07:00 committed by GitHub
parent 0331fdebd3
commit a0ee29a806
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 44 additions and 37 deletions

View file

@ -1,7 +1,7 @@
name = "Rust"
grammar = "rust"
path_suffixes = ["rs"]
line_comments = [ "/// ", "//! ", "// "]
line_comments = ["// ", "/// ", "//! "]
autoclose_before = ";:.,=}])>"
brackets = [
{ start = "{", end = "}", close = true, newline = true },