zed/typos.toml
Jordan Pittman cac98b7bbf
Show color swatches for LSP completions (#18665)
Closes #11991

Release Notes:

- Added support for color swatches for language server completions.

<img width="502" alt="Screenshot 2024-10-02 at 19 02 22"
src="https://github.com/user-attachments/assets/57e85492-3760-461a-9b17-a846dc40576b">

<img width="534" alt="Screenshot 2024-10-02 at 19 02 48"
src="https://github.com/user-attachments/assets/713ac41c-16f0-4ad3-9103-d2c9b3fa8b2e">

This implementation is mostly a port of the VSCode version of the
ColorExtractor. It seems reasonable the we should support _at least_
what VSCode does for detecting color swatches from LSP completions.

This implementation could definitely be better perf-wise by writing a
dedicated color parser. I also think it would be neat if, in the future,
Zed handled _more_ color formats — especially wide-gamut colors.

There are a few differences to the regexes in the VSCode implementation
but mainly so simplify the implementation :
- The hex vs rgb/hsl regexes were split into two parts
- The rgb/hsl regexes allow 3 or 4 color components whether hsla/rgba or
not and the parsing implementation accepts/rejects colors as needed

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-10-03 14:38:17 -04:00

66 lines
2.2 KiB
TOML

[files]
ignore-files = true
ignore-hidden = false
extend-exclude = [
".git/",
# Contributor names aren't typos.
".mailmap",
# File suffixes aren't typos
"assets/icons/file_icons/file_types.json",
"crates/extensions_ui/src/extension_suggest.rs",
# Some countries codes are flagged as typos.
"crates/anthropic/src/supported_countries.rs",
"crates/google_ai/src/supported_countries.rs",
"crates/open_ai/src/supported_countries.rs",
# Some crate names are flagged as typos.
"crates/indexed_docs/src/providers/rustdoc/popular_crates.txt",
# Stripe IDs are flagged as typos.
"crates/collab/src/db/tests/processed_stripe_event_tests.rs",
# Not our typos
"crates/live_kit_server/",
# Vim makes heavy use of partial typing tables
"crates/vim/",
# Editor and file finder rely on partial typing and custom in-string syntax
"crates/file_finder/src/file_finder_tests.rs",
"crates/editor/src/editor_tests.rs",
# Clojure uses .edn filename extension, which is not a misspelling of "end"
"extensions/clojure/languages/clojure/config.toml",
# There are some names in the test data that are incorrectly flagged as typos.
"crates/git/test_data/blame_incremental_complex",
"crates/git/test_data/golden/blame_incremental_complex.json",
# We have some base64-encoded data that is incorrectly being flagged.
"crates/rpc/src/auth.rs",
# glsl isn't recognized by this tool
"extensions/glsl/languages/glsl/",
# Windows likes its abbreviations
"crates/gpui/src/platform/windows/",
# Some typos in the base mdBook CSS.
"docs/theme/css/"
]
[default]
extend-ignore-re = [
'cl\[ist]',
'\[lan\]guage',
'"ba"',
":ba\\|z",
# :/ crates/collab/migrations/20231009181554_add_release_channel_to_rooms.sql
"COLUMN enviroment",
# Typo in ClickHouse column name.
# crates/collab/src/api/events.rs
"rename = \"sesssion_id\"",
"doas",
# ProtoLS crate with tree-sitter Protobuf grammar.
"protols",
# x11rb SelectionNotifyEvent struct field
"requestor",
# Not an actual typo but an intentionally invalid color, in `color_extractor`
"#fof"
]
check-filename = true