Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Clean up whitespace (#10755)

Joseph T. Lyonsf6eaa8b00fa4
diff --git a/.zed/settings.json b/.zed/settings.json
index dbafa2115ab..eedf2f37534 100644
--- a/.zed/settings.json
+++ b/.zed/settings.json
@@ -21,5 +21,7 @@
"formatter": "prettier"
}
},
- "formatter": "auto"
+ "formatter": "auto",
+ "remove_trailing_whitespace_on_save": true,
+ "ensure_final_newline_on_save": true
}
diff --git a/assets/icons/file_icons/file_types.json b/assets/icons/file_icons/file_types.json
index 5a587b02cf6..0ee203c3c79 100644
--- a/assets/icons/file_icons/file_types.json
+++ b/assets/icons/file_icons/file_types.json
@@ -329,7 +329,7 @@
},
"tcl": {
"icon": "icons/file_icons/tcl.svg"
- },
+ },
"vcs": {
"icon": "icons/file_icons/git.svg"
},
diff --git a/assets/icons/mail_open.svg b/assets/icons/mail_open.svg
index b63915bd73c..b857037b86f 100644
--- a/assets/icons/mail_open.svg
+++ b/assets/icons/mail_open.svg
@@ -1 +1 @@
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-mail-open"><path d="M21.2 8.4c.5.38.8.97.8 1.6v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V10a2 2 0 0 1 .8-1.6l8-6a2 2 0 0 1 2.4 0l8 6Z"/><path d="m22 10-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 10"/></svg>
\ No newline at end of file
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-mail-open"><path d="M21.2 8.4c.5.38.8.97.8 1.6v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V10a2 2 0 0 1 .8-1.6l8-6a2 2 0 0 1 2.4 0l8 6Z"/><path d="m22 10-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 10"/></svg>
diff --git a/assets/icons/trash.svg b/assets/icons/trash.svg
index 94d7971f9b1..b71035b99cc 100644
--- a/assets/icons/trash.svg
+++ b/assets/icons/trash.svg
@@ -1 +1 @@
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-trash-2"><path d="M3 6h18"/><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"/><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"/><line x1="10" x2="10" y1="11" y2="17"/><line x1="14" x2="14" y1="11" y2="17"/></svg>
\ No newline at end of file
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-trash-2"><path d="M3 6h18"/><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"/><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"/><line x1="10" x2="10" y1="11" y2="17"/><line x1="14" x2="14" y1="11" y2="17"/></svg>
diff --git a/assets/icons/word_search.svg b/assets/icons/word_search.svg
index adb4976bcc4..beca4cbe82b 100644
--- a/assets/icons/word_search.svg
+++ b/assets/icons/word_search.svg
@@ -3,4 +3,3 @@
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.64907 9.32382C8.313 9.13287 8.08213 8.81954 7.94725 8.4078C7.8147 8.00318 7.75317 7.44207 7.75317 6.73677C7.75317 6.03845 7.81141 5.48454 7.9369 5.08716L7.93755 5.08512C8.07231 4.67373 8.3034 4.36258 8.64088 4.17794C8.96806 3.99257 9.41119 3.9104 9.9496 3.9104C10.3406 3.9104 10.6632 3.95585 10.8967 4.06485C11.0079 4.11675 11.1099 4.18844 11.2033 4.27745V2.03027H12.4077V9.4856H11.2033V9.18983C11.0945 9.29074 10.98 9.37096 10.8591 9.42752C10.6327 9.53648 10.3335 9.58252 9.97867 9.58252C9.4339 9.58252 8.98592 9.50355 8.65375 9.3264L8.64907 9.32382ZM11.1139 7.85508C11.1841 7.60311 11.2227 7.23354 11.2227 6.73677C11.2227 6.24602 11.1841 5.88331 11.1141 5.63844C11.0457 5.39902 10.9401 5.25863 10.8149 5.18266L10.8077 5.17826C10.6804 5.09342 10.4713 5.03726 10.1531 5.03726C9.80785 5.03726 9.5719 5.09359 9.42256 5.1832L9.41829 5.18576C9.28002 5.26412 9.16722 5.40602 9.09399 5.64263C9.01876 5.88566 8.97694 6.24668 8.97694 6.73677C8.97694 7.23363 9.01882 7.59774 9.09399 7.8406C9.1673 8.07745 9.28097 8.22477 9.42256 8.30972C9.5719 8.39933 9.80785 8.45566 10.1531 8.45566C10.4721 8.45566 10.683 8.40265 10.8114 8.32216C10.9396 8.23944 11.0456 8.09373 11.1139 7.85508Z" fill="#787D87"/>
<rect x="1.14087" y="10.7188" width="11.7183" height="1.26565" rx="0.632824" fill="#787D87"/>
</svg>
-
diff --git a/crates/db/README.md b/crates/db/README.md
index d4ea2fee399..b734a2e3a33 100644
--- a/crates/db/README.md
+++ b/crates/db/README.md
@@ -2,4 +2,4 @@
First, craft your test data. The examples folder shows a template for building a test-db, and can be ran with `cargo run --example [your-example]`.
-To actually use and test your queries, import the generated DB file into https://sqliteonline.com/
\ No newline at end of file
+To actually use and test your queries, import the generated DB file into https://sqliteonline.com/
diff --git a/crates/languages/src/bash/redactions.scm b/crates/languages/src/bash/redactions.scm
index 88b38f42fc0..000cb042a57 100644
--- a/crates/languages/src/bash/redactions.scm
+++ b/crates/languages/src/bash/redactions.scm
@@ -1,2 +1,2 @@
(variable_assignment
- value: (_) @redact)
\ No newline at end of file
+ value: (_) @redact)
diff --git a/crates/languages/src/c/highlights.scm b/crates/languages/src/c/highlights.scm
index 064ec61a378..0a8c12f06ff 100644
--- a/crates/languages/src/c/highlights.scm
+++ b/crates/languages/src/c/highlights.scm
@@ -106,4 +106,3 @@
(primitive_type)
(sized_type_specifier)
] @type
-
diff --git a/crates/languages/src/c/injections.scm b/crates/languages/src/c/injections.scm
index 845a63bd1bd..2696594af21 100644
--- a/crates/languages/src/c/injections.scm
+++ b/crates/languages/src/c/injections.scm
@@ -4,4 +4,4 @@
(preproc_function_def
value: (preproc_arg) @content
- (#set! "language" "c"))
\ No newline at end of file
+ (#set! "language" "c"))
diff --git a/crates/languages/src/cpp/injections.scm b/crates/languages/src/cpp/injections.scm
index eca372d577b..076703c8091 100644
--- a/crates/languages/src/cpp/injections.scm
+++ b/crates/languages/src/cpp/injections.scm
@@ -4,4 +4,4 @@
(preproc_function_def
value: (preproc_arg) @content
- (#set! "language" "c++"))
\ No newline at end of file
+ (#set! "language" "c++"))
diff --git a/crates/languages/src/javascript/injections.scm b/crates/languages/src/javascript/injections.scm
index 20036752458..0df1691e7e4 100644
--- a/crates/languages/src/javascript/injections.scm
+++ b/crates/languages/src/javascript/injections.scm
@@ -1,5 +1,5 @@
((comment) @content
(#set! "language" "jsdoc"))
-
+
((regex) @content
- (#set! "language" "regex"))
\ No newline at end of file
+ (#set! "language" "regex"))
diff --git a/crates/languages/src/jsdoc/brackets.scm b/crates/languages/src/jsdoc/brackets.scm
index 24453c9da93..0e1bf5ca191 100644
--- a/crates/languages/src/jsdoc/brackets.scm
+++ b/crates/languages/src/jsdoc/brackets.scm
@@ -1,2 +1,2 @@
("[" @open "]" @close)
-("{" @open "}" @close)
\ No newline at end of file
+("{" @open "}" @close)
diff --git a/crates/languages/src/json/highlights.scm b/crates/languages/src/json/highlights.scm
index 12bde13e518..71168051094 100644
--- a/crates/languages/src/json/highlights.scm
+++ b/crates/languages/src/json/highlights.scm
@@ -18,4 +18,4 @@
"}"
"["
"]"
-] @punctuation.bracket
\ No newline at end of file
+] @punctuation.bracket
diff --git a/crates/languages/src/json/overrides.scm b/crates/languages/src/json/overrides.scm
index 746dbc5cd95..cc966ad4c13 100644
--- a/crates/languages/src/json/overrides.scm
+++ b/crates/languages/src/json/overrides.scm
@@ -1 +1 @@
-(string) @string
\ No newline at end of file
+(string) @string
diff --git a/crates/languages/src/json/redactions.scm b/crates/languages/src/json/redactions.scm
index be985f018cd..7359637244a 100644
--- a/crates/languages/src/json/redactions.scm
+++ b/crates/languages/src/json/redactions.scm
@@ -1,4 +1,4 @@
(pair value: (number) @redact)
(pair value: (string) @redact)
(array (number) @redact)
-(array (string) @redact)
\ No newline at end of file
+(array (string) @redact)
diff --git a/crates/languages/src/ruby/brackets.scm b/crates/languages/src/ruby/brackets.scm
index 957b20ecdb4..f5129f8f310 100644
--- a/crates/languages/src/ruby/brackets.scm
+++ b/crates/languages/src/ruby/brackets.scm
@@ -11,4 +11,4 @@
(begin "begin" @open "end" @close)
(module "module" @open "end" @close)
(_ . "def" @open "end" @close)
-(_ . "class" @open "end" @close)
\ No newline at end of file
+(_ . "class" @open "end" @close)
diff --git a/crates/languages/src/rust/brackets.scm b/crates/languages/src/rust/brackets.scm
index 0be534c48cc..eeee5f0e26a 100644
--- a/crates/languages/src/rust/brackets.scm
+++ b/crates/languages/src/rust/brackets.scm
@@ -3,4 +3,4 @@
("{" @open "}" @close)
("<" @open ">" @close)
("\"" @open "\"" @close)
-(closure_parameters "|" @open "|" @close)
\ No newline at end of file
+(closure_parameters "|" @open "|" @close)
diff --git a/crates/languages/src/rust/injections.scm b/crates/languages/src/rust/injections.scm
index 57ebea85393..0ce91f22877 100644
--- a/crates/languages/src/rust/injections.scm
+++ b/crates/languages/src/rust/injections.scm
@@ -4,4 +4,4 @@
(macro_rule
(token_tree) @content
- (#set! "language" "rust"))
\ No newline at end of file
+ (#set! "language" "rust"))
diff --git a/crates/languages/src/tsx/injections.scm b/crates/languages/src/tsx/injections.scm
index 8aca54dbd27..0df1691e7e4 100644
--- a/crates/languages/src/tsx/injections.scm
+++ b/crates/languages/src/tsx/injections.scm
@@ -2,4 +2,4 @@
(#set! "language" "jsdoc"))
((regex) @content
- (#set! "language" "regex"))
\ No newline at end of file
+ (#set! "language" "regex"))
diff --git a/crates/languages/src/typescript/injections.scm b/crates/languages/src/typescript/injections.scm
index 8aca54dbd27..0df1691e7e4 100644
--- a/crates/languages/src/typescript/injections.scm
+++ b/crates/languages/src/typescript/injections.scm
@@ -2,4 +2,4 @@
(#set! "language" "jsdoc"))
((regex) @content
- (#set! "language" "regex"))
\ No newline at end of file
+ (#set! "language" "regex"))
diff --git a/crates/languages/src/yaml/highlights.scm b/crates/languages/src/yaml/highlights.scm
index 06081f63cb4..0e66aca66de 100644
--- a/crates/languages/src/yaml/highlights.scm
+++ b/crates/languages/src/yaml/highlights.scm
@@ -20,10 +20,10 @@
[
(anchor_name)
(alias_name)
- (tag)
+ (tag)
] @type
-key: (flow_node (plain_scalar (string_scalar) @property))
+key: (flow_node (plain_scalar (string_scalar) @property))
[
","
@@ -46,4 +46,4 @@ key: (flow_node (plain_scalar (string_scalar) @property))
"&"
"---"
"..."
-] @punctuation.special
\ No newline at end of file
+] @punctuation.special
diff --git a/crates/languages/src/yaml/outline.scm b/crates/languages/src/yaml/outline.scm
index e85eb1bf8ad..7ab007835f3 100644
--- a/crates/languages/src/yaml/outline.scm
+++ b/crates/languages/src/yaml/outline.scm
@@ -1 +1 @@
-(block_mapping_pair key: (flow_node (plain_scalar (string_scalar) @name))) @item
\ No newline at end of file
+(block_mapping_pair key: (flow_node (plain_scalar (string_scalar) @name))) @item
diff --git a/crates/terminal_view/scripts/truecolor.sh b/crates/terminal_view/scripts/truecolor.sh
index 14e5d813085..c11037b1003 100755
--- a/crates/terminal_view/scripts/truecolor.sh
+++ b/crates/terminal_view/scripts/truecolor.sh
@@ -16,4 +16,4 @@ awk -v term_cols="${width:-$(tput cols || echo 80)}" -v term_lines="${height:-1}
if (colnum%term_cols==term_cols) printf "\n";
}
printf "\n";
-}'
\ No newline at end of file
+}'
diff --git a/crates/vim/test_data/test_replace_mode_undo.json b/crates/vim/test_data/test_replace_mode_undo.json
index 7628a27fb45..3488030ee79 100644
--- a/crates/vim/test_data/test_replace_mode_undo.json
+++ b/crates/vim/test_data/test_replace_mode_undo.json
@@ -121,4 +121,4 @@
{"Key":"backspace"}
{"Key":"backspace"}
{"Key":"backspace"}
-{"Get":{"state":"The quick browˇn\nfox jumps over\nthe lazy ˇdog.","mode":"Replace"}}
\ No newline at end of file
+{"Get":{"state":"The quick browˇn\nfox jumps over\nthe lazy ˇdog.","mode":"Replace"}}
diff --git a/crates/zed/resources/windows/manifest.xml b/crates/zed/resources/windows/manifest.xml
index 5490c54d071..5a69b434865 100644
--- a/crates/zed/resources/windows/manifest.xml
+++ b/crates/zed/resources/windows/manifest.xml
@@ -7,9 +7,9 @@
</asmv3:application>
<dependency>
<dependentAssembly>
- <assemblyIdentity type='win32'
- name='Microsoft.Windows.Common-Controls'
- version='6.0.0.0' processorArchitecture='*'
+ <assemblyIdentity type='win32'
+ name='Microsoft.Windows.Common-Controls'
+ version='6.0.0.0' processorArchitecture='*'
publicKeyToken='6595b64144ccf1df' />
</dependentAssembly>
</dependency>
diff --git a/extensions/clojure/languages/clojure/outline.scm b/extensions/clojure/languages/clojure/outline.scm
index 8b137891791..e69de29bb2d 100644
--- a/extensions/clojure/languages/clojure/outline.scm
+++ b/extensions/clojure/languages/clojure/outline.scm
@@ -1 +0,0 @@
-
diff --git a/extensions/html/languages/html/overrides.scm b/extensions/html/languages/html/overrides.scm
index 97accffd672..7108d48fbdc 100644
--- a/extensions/html/languages/html/overrides.scm
+++ b/extensions/html/languages/html/overrides.scm
@@ -1,2 +1,2 @@
(comment) @comment
-(quoted_attribute_value) @string
\ No newline at end of file
+(quoted_attribute_value) @string
diff --git a/extensions/lua/languages/lua/brackets.scm b/extensions/lua/languages/lua/brackets.scm
index 5f5bd60b93f..62e137ef262 100644
--- a/extensions/lua/languages/lua/brackets.scm
+++ b/extensions/lua/languages/lua/brackets.scm
@@ -1,3 +1,3 @@
("[" @open "]" @close)
("{" @open "}" @close)
-("(" @open ")" @close)
\ No newline at end of file
+("(" @open ")" @close)
diff --git a/extensions/lua/languages/lua/indents.scm b/extensions/lua/languages/lua/indents.scm
index 71e15a0c339..ed26c5a8f0b 100644
--- a/extensions/lua/languages/lua/indents.scm
+++ b/extensions/lua/languages/lua/indents.scm
@@ -7,4 +7,4 @@
(_ "[" "]" @end) @indent
(_ "{" "}" @end) @indent
-(_ "(" ")" @end) @indent
\ No newline at end of file
+(_ "(" ")" @end) @indent
diff --git a/extensions/lua/languages/lua/outline.scm b/extensions/lua/languages/lua/outline.scm
index 8bd8d880700..aa59d17247c 100644
--- a/extensions/lua/languages/lua/outline.scm
+++ b/extensions/lua/languages/lua/outline.scm
@@ -1,3 +1,3 @@
(function_declaration
"function" @context
- name: (_) @name) @item
\ No newline at end of file
+ name: (_) @name) @item
diff --git a/extensions/ocaml/languages/ocaml/brackets.scm b/extensions/ocaml/languages/ocaml/brackets.scm
index 6afe4638fd4..269d87778d7 100644
--- a/extensions/ocaml/languages/ocaml/brackets.scm
+++ b/extensions/ocaml/languages/ocaml/brackets.scm
@@ -4,4 +4,3 @@
("{" @open "}" @close)
("<" @open ">" @close)
("\"" @open "\"" @close)
-
diff --git a/extensions/ocaml/languages/ocaml/highlights.scm b/extensions/ocaml/languages/ocaml/highlights.scm
index 41db5a403e6..6623e1e5435 100644
--- a/extensions/ocaml/languages/ocaml/highlights.scm
+++ b/extensions/ocaml/languages/ocaml/highlights.scm
@@ -131,7 +131,7 @@
(extension)
(item_extension)
(quoted_extension)
- (quoted_item_extension)
+ (quoted_item_extension)
"%"
] @attribute
diff --git a/extensions/ocaml/languages/ocaml/indents.scm b/extensions/ocaml/languages/ocaml/indents.scm
index 10995d15abd..319d2fd971d 100644
--- a/extensions/ocaml/languages/ocaml/indents.scm
+++ b/extensions/ocaml/languages/ocaml/indents.scm
@@ -3,7 +3,7 @@
(type_binding)
(method_definition)
-
+
(external)
(value_specification)
(method_specification)
diff --git a/extensions/ocaml/languages/ocaml/outline.scm b/extensions/ocaml/languages/ocaml/outline.scm
index 16f449664ae..c7f39c219b5 100644
--- a/extensions/ocaml/languages/ocaml/outline.scm
+++ b/extensions/ocaml/languages/ocaml/outline.scm
@@ -17,7 +17,7 @@
"module" @context
"type" @context
name: (_) @name) @item
-
+
(type_definition
"type" @context
(type_binding name: (_) @name)) @item
@@ -25,7 +25,7 @@
(value_specification
"val" @context
(value_name) @name) @item
-
+
(class_definition
"class" @context
(class_binding
diff --git a/extensions/racket/languages/racket/outline.scm b/extensions/racket/languages/racket/outline.scm
index 604e052a63f..60015483030 100644
--- a/extensions/racket/languages/racket/outline.scm
+++ b/extensions/racket/languages/racket/outline.scm
@@ -7,4 +7,4 @@
(list . (symbol) @name)
]
(#match? @start-symbol "^define")
-) @item
\ No newline at end of file
+) @item
diff --git a/extensions/scheme/languages/scheme/outline.scm b/extensions/scheme/languages/scheme/outline.scm
index 604e052a63f..60015483030 100644
--- a/extensions/scheme/languages/scheme/outline.scm
+++ b/extensions/scheme/languages/scheme/outline.scm
@@ -7,4 +7,4 @@
(list . (symbol) @name)
]
(#match? @start-symbol "^define")
-) @item
\ No newline at end of file
+) @item
diff --git a/extensions/toml/languages/toml/outline.scm b/extensions/toml/languages/toml/outline.scm
index d232d489b62..0b379496283 100644
--- a/extensions/toml/languages/toml/outline.scm
+++ b/extensions/toml/languages/toml/outline.scm
@@ -12,4 +12,4 @@
(pair
.
- (_) @name) @item
\ No newline at end of file
+ (_) @name) @item
diff --git a/extensions/toml/languages/toml/redactions.scm b/extensions/toml/languages/toml/redactions.scm
index fd11a029278..a906e9ac7b3 100644
--- a/extensions/toml/languages/toml/redactions.scm
+++ b/extensions/toml/languages/toml/redactions.scm
@@ -1 +1 @@
-(pair (bare_key) "=" (_) @redact)
\ No newline at end of file
+(pair (bare_key) "=" (_) @redact)
diff --git a/script/licenses/template.hbs.md b/script/licenses/template.hbs.md
index a41aee8a4c4..cc986588fb4 100644
--- a/script/licenses/template.hbs.md
+++ b/script/licenses/template.hbs.md
@@ -8,14 +8,14 @@
{{#each licenses}}
#### {{name}}
-
+
##### Used by:
{{#each used_by}}
* [{{crate.name}} {{crate.version}}]({{#if crate.repository}} {{crate.repository}} {{else}} https://crates.io/crates/{{crate.name}} {{/if}})
{{/each}}
-
+
{{text}}
--------------------------------------------------------------------------------
-{{/each}}
\ No newline at end of file
+{{/each}}