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

Tab automatically inserted on newline (Svelte) #24434

Open
lolxnn opened this issue Feb 7, 2025 · 3 comments
Open

Tab automatically inserted on newline (Svelte) #24434

lolxnn opened this issue Feb 7, 2025 · 3 comments
Labels
language An umbrella label for all programming languages syntax behaviors svelte Svelte framework support tree-sitter Syntax highlighting and tree-sitter

Comments

@lolxnn
Copy link

lolxnn commented Feb 7, 2025

Summary

When typing a new line, zed automatically inserts a tab when it shouldn't. This happens only in Svelte.

Steps to trigger the problem:
Image

Expected Behavior:
No tab should be inserted.

Zed Config:

{
  "languages": {
    "Svelte": {
      "show_inline_completions": true
    }
  },
  "ui_font_size": 16,
  "buffer_font_size": 16,
  "theme": {
    "mode": "system",
    "light": "One Light",
    "dark": "Ayu Dark"
  },
  "buffer_font_family": "Comic Code Ligatures",
  "autosave": {
    "after_delay": {
      "milliseconds": 200
    }
  },
  "hard_tabs": true,
  "tab_size": 4
}

Zed Version and System Specs

Zed: v0.172.8 (Zed)
OS: Linux Wayland arch unknown
Memory: 15.5 GiB
Architecture: x86_64
GPU: NVIDIA GeForce RTX 3060 Ti || NVIDIA || 570.86.16

@velipso
Copy link

velipso commented Feb 7, 2025

possibly related to #11780 - lots of funny auto-tab behvaior in zed it seems

@JosephTLyons JosephTLyons added language An umbrella label for all programming languages syntax behaviors svelte Svelte framework support tree-sitter Syntax highlighting and tree-sitter labels Feb 11, 2025
@JosephTLyons
Copy link
Collaborator

JosephTLyons commented Feb 11, 2025

This looks a bit annoying, thanks for reporting @lolxnn!

@probably-neb
Copy link
Contributor

If this is happening only in svelte and not html, React, Astro, etc files. Would you please close this issue and reopen it here. As if that is the case this is an issue with how the indenting logic is declared in the svelte extension not how Zed handles it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
language An umbrella label for all programming languages syntax behaviors svelte Svelte framework support tree-sitter Syntax highlighting and tree-sitter
Projects
None yet
Development

No branches or pull requests

4 participants