Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

! snippet not working in zed #15680

Closed
1 task done
sparrowsl opened this issue Aug 2, 2024 · 10 comments
Closed
1 task done

! snippet not working in zed #15680

sparrowsl opened this issue Aug 2, 2024 · 10 comments
Labels
defect [core label] html HTML markup support language An umbrella label for all programming languages syntax behaviors tooling An umbrella label for language tools, linters, formatters, etc

Comments

@sparrowsl
Copy link

Check for existing issues

  • Completed

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
@sparrowsl sparrowsl added admin read Pending admin review defect [core label] triage Maintainer needs to classify the issue labels Aug 2, 2024
@JosephTLyons JosephTLyons added snippets html HTML markup support language An umbrella label for all programming languages syntax behaviors tooling An umbrella label for language tools, linters, formatters, etc and removed triage Maintainer needs to classify the issue admin read Pending admin review snippets labels Aug 2, 2024
@JosephTLyons
Copy link
Collaborator

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

@JosephTLyons JosephTLyons added the needs info / awaiting response Issue that needs more information from the user label Aug 2, 2024
@sparrowsl
Copy link
Author

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

@axoking
Copy link

axoking commented Aug 2, 2024

I have the same issue

(Mac OS Sequioa, Apple M1)

@JosephTLyons
Copy link
Collaborator

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
Copy link
Author

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
Copy link
Author

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
Copy link
Contributor

bbb651 commented Aug 3, 2024

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!

@htor
Copy link

htor commented Oct 12, 2024

I can't reproduce the error here. Typing ! and hitting Enter correctly inserts the HTML snippet. It also works regardless of filename.

Zed: v0.157.2 (Zed Preview)
OS: macOS 12.7.4
Memory: 16 GiB
Architecture: aarch64

@htor
Copy link

htor commented Oct 12, 2024

Also, this issue is probably a duplicate of: #12791

@JosephTLyons
Copy link
Collaborator

Closing in favor of #12791 - feel free to upvote that issue with a 👍!

@JosephTLyons JosephTLyons removed the needs info / awaiting response Issue that needs more information from the user label Oct 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect [core label] html HTML markup support language An umbrella label for all programming languages syntax behaviors tooling An umbrella label for language tools, linters, formatters, etc
Projects
None yet
Development

No branches or pull requests

5 participants