editor: Fix "Toggle comments" not respecting multiple line_comments in language config (#10126)

This does not try to heuristically pick a comment style based on
surroundings anyhow. It does improve our story around uncommenting
though.

Fixes #10113.

Release Notes:

- Fixed "Toggle comment" action not working in presence of non-default
line comments such as doc comments in Rust
([#10113](https://github.com/zed-industries/zed/issues/10113)).
This commit is contained in:
Piotr Osiewicz 2024-04-03 17:34:59 +02:00 committed by GitHub
parent 57a1b9b2cd
commit b118b76272
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 41 additions and 16 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 },