Skip to content

Type to search extensions

Emoji completions

v1.5.1

Adds emoji completions when typing ':', '::' or '(' followed by an emoji name.

Updated 1 week ago
39k downloads 3 stars Repository ↗

Emoji Completions for Zed

A Zed editor extension that provides emoji autocompletion similar to Slack. Type : followed by an emoji name to get suggestions.

A query can be up to two words, so :thumbs up finds 👍.

Example:

Emoji completions demo

Styles

Three ways of writing emojis are supported, and any of them can be turned on at the same time:

Style Typed Inserts
slack (on by default) :smi 😄
emojisense ::smi :smile:
teams (lau 😄

Teams style matches the classic Teams codes, such as (y) and (laugh), as well as emoji names.

Choose the styles in your Zed settings.json:

"lsp": {
  "emoji-language-server": {
    "settings": { "styles": ["emojisense", "slack", "teams"] }
  }
}

An empty list turns completions off. Turning on emojisense makes :: at the start of a word trigger completions, and turning on teams does the same for (. This can be really annoying in many cases, because they will trigger completions in places you might not want, as in C++'s ::std::vector, or if (x.

Skin tone

Emojis that come in skin tones are inserted with the tone set in your Zed settings.json:

"lsp": {
  "emoji-language-server": {
    "settings": { "skin_tone": "medium-dark" }
  }
}

The values are default (yellow, used when the setting is missing), light, medium-light, medium, medium-dark and dark.

Turning it off for a language

Add this to your Zed settings.json, using the language name Zed shows in the status bar:

"languages": {
  "Rust": {
    "language_servers": ["!emoji-language-server", "..."]
  }
}

Zed only starts the server for languages listed in extension.toml, so it cannot be turned on for other languages this way.

Developing locally

  1. Clone the repository.
  2. Build using cargo build --release -p emoji-language-server.
  3. Point Zed at the built server in your Zed settings.json:
    "lsp": {
      "emoji-language-server": {
        "binary": { "path": "/path/to/emoji-completions-zed/target/release/emoji-language-server" }
      }
    }
  4. Use the zed: install dev extension command in Zed to install the extension from the repository directory.
  5. After rebuilding, run editor: restart language server in Zed to pick up the new binary.

Making a release

This project uses immutable releases: once a release is published, its tag can't be moved and no binaries can be added to it. The release workflow therefore uploads the binaries to a draft release, which you publish afterwards. Never create a release by hand (in the GitHub UI or with gh release create) before the workflow has run, or it is published without binaries and the version can't be fixed.

  1. Bump the version in Cargo.toml and extension.toml, name the new version something like 1.0.0-beta0, run cargo update -w to update Cargo.lock, and commit.
  2. Tag a pre-release in git:
    git tag 1.0.0-beta0
    git push origin 1.0.0-beta0
  3. The release workflow builds the binaries and uploads them to a draft release. Once it has finished, check that the draft has all five binaries, then publish it as a pre-release in the GitHub UI.
  4. Build locally with cargo build --release -p emoji-language-server.
  5. Remove any downloaded emoji-language-server binaries from the Zed extensions directory, and remove the lsp setting from "Developing locally" if you added it:
    # Linux
    rm -f ~/.local/share/zed/extensions/work/emoji-completions/emoji-language-server-*
    # macOS
    rm -f ~/Library/Application\ Support/Zed/extensions/work/emoji-completions/emoji-language-server-*
  6. Use the zed: install dev extension command in Zed to install the extension from the local path.
  7. Restart all language servers in Zed, this should trigger the new version to be used.
  8. Test that everything works as expected.
  9. Once verified, bump the version in Cargo.toml and extension.toml to the stable version, e.g., 1.0.0, run cargo update -w, commit, push, and tag it. The release workflow fails if the tag does not match both files.
    git tag 1.0.0
    git push origin 1.0.0
  10. Wait for the release workflow to finish, check that the draft release has all five binaries, add release notes, and publish it as the latest release.
  11. Update the zed-extensions repo to point to the new version, in accordance with their instructions: https://zed.dev/docs/extensions/developing-extensions#updating-an-extension

Possible improvements (PRs welcome!)

Credits

Inspired by the Emojisense extension for Visual Studio Code: https://github.com/mattbierner/vscode-emojisense