zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
46.78k stars 2.67k forks source link

`!` snippet not working in zed #15680

Open sparrowsl opened 1 month ago

sparrowsl commented 1 month ago

Check for existing issues

Describe the bug / provide steps to reproduce it

just type ! inside an empty html file, it should give an emmet suggestion to have a basic skeleton shell like this instead it does nothing:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

</body>
</html>

the other snippets works except this (afaict), VSCode image example below: vscode-emmet

Environment

Linux Mint Zed 0.146.4

If applicable, add mockups / screenshots to help explain present your vision of the feature

vscode-emmet

If applicable, attach your Zed.log file to this issue.

Zed.log


JosephTLyons commented 1 month ago

Hey @sparrowsl, do you get any emmet completions at all in an html file, or is it just ! that seems to be broken?

sparrowsl commented 1 month ago

it's just the ! that is broken, (the others I mostly used seems to work fine)

axoking commented 1 month ago

I have the same issue

(Mac OS Sequioa, Apple M1)

JosephTLyons commented 1 month ago

Huh, very strange - this seems to work for me on macOS.

SCR-20240802-mice

Not quite sure what might be causing an issue.

Can you include the contents from your keymap.json and from your settings.json? Maybe something is interfering with it.

sparrowsl commented 1 month ago

keymap.json

// Zed keymap
//
// For information on binding keys, see the Zed
// documentation: https://zed.dev/docs/key-bindings
//
// To see the default key bindings run `zed: Open Default Keymap`
// from the command palette.
[
  {
    "context": "Workspace",
    "bindings": {
      // "shift shift": "file_finder::Toggle"
    }
  },
  {
    "context": "Editor",
    "bindings": {
      // "j k": ["workspace::SendKeystrokes", "escape"]
    }
  }
]
sparrowsl commented 1 month ago

settings.json

// Zed settings
//
// For information on how to configure Zed, see the Zed
// documentation: https://zed.dev/docs/configuring-zed
//
// To see all of Zed's default settings without changing your
// custom settings, run the `open default settings` command
// from the command palette or from `Zed` application menu.
{
  "auto_install_extensions": {
    "ruff": true
  },
  "auto_update_extensions": {
    "ruff": false
  },
  "ui_font_size": 15,
  "buffer_font_size": 14,
  // "ui_font_size": 13.5,
  // "buffer_font_size": 13.5,
  "theme": "Catppuccin Macchiato",
  // "format_on_save": "on",
  "restore_on_startup": "last_workspace",
  // "auto_signature_help": true,
  "chat_panel": {
    "button": false
  },
  "collaboration_panel": {
    "button": false
  },
  "assistant": {
    "version": "2",
    "button": false,
    "enabled": false
  },
  "notification_panel": {
    "button": false
  },
  "outline_panel": {
    "button": false
  },
  "terminal": {
    "button": false
  },
  "tabs": {
    "git_status": true,
    "file_icons": true
  },
  "file_types": {
    "JSONC": ["tsconfig.json", "jsconfig.json", "*.json"]
  },
  // "redact_private_values": true,
  "scroll_beyond_last_line": "vertical_scroll_margin",
  "show_call_status_icon": false,
  "soft_wrap": "editor_width",
  "autosave": "on_focus_change",
  "scrollbar": {
    "show": "auto",
    "cursors": false,
    "git_diff": true,
    "search_results": true,
    "selected_symbol": true,
    "diagnostics": true
  },
  // "formatter": "auto",
  "show_whitespaces": "boundary",
  "tab_size": 2,
  "languages": {
    "JavaScript": {
      "language_servers": [
        "!typescript-language-server",
        "!eslint",
        "!prettier",
        "..."
      ],
      "code_actions_on_format": {
        "source.organizeImports.biome": true
      }
    },
    "C": {
      "format_on_save": "on"
    },
    "Python": {
      "tab_size": 4,
      "format_on_save": { "language_server": { "name": "ruff" } },
      "language_servers": ["pyright", "ruff"],
      "formatter": [
        {
          "code_actions": {
            // Fix all auto-fixable lint violations
            // "source.fixAll.ruff": true,
            // Organize imports
            "source.organizeImports.ruff": true
          }
        },
        { "language_server": { "name": "ruff" } }
      ]
    },
    "Go": {
      "tab_size": 4
    }
  }
}
bbb651 commented 1 month ago

I was very confused because I managed to reproduce this yesterday but I knew it worked before, then today I tried it and it worked again - turns out it only works for files named index.html!