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
48.7k stars 2.92k forks source link

HTML autocomplete not working inside .html.erb files #19572

Open MatUrbanski opened 15 hours ago

MatUrbanski commented 15 hours ago

Check for existing issues

Describe the bug / provide steps to reproduce it

Hello,

I’m using Zed for Ruby on Rails development and have installed the html extension. However, autocomplete for HTML tags like <p> inside .html.erb files isn’t working. Is there a way to enable this through the settings?

Thanks in advance!

kjvdven commented 3 hours ago

It works for me, maybe my settings help.

// 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.
{
  // APPLICATION
  "hour_format": "hour24",
  "theme": "Rosé Pine Moon",

  // Interface
  "tab_bar": {
    "show": false
  },
  "project_panel": {
    "dock": "right"
  },
  "toolbar": {
    "quick_actions": false
  },
  "scrollbar": {
    "show": "never"
  },

  // Telemetry
  "telemetry": {
    "diagnostics": false,
    "metrics": false
  },

  // BUFFER
  // font settings
  "buffer_font_family": "MonoLisa",
  "buffer_font_fallbacks": ["MonoLisa Nerd Font"],
  "buffer_font_size": 13,
  "buffer_font_features": {
    "ss01": true,
    "ss03": true,
    "ss06": true,
    "ss11": true,
    "ss13": true
  },

  // code presentation
  "buffer_line_height": {
    "custom": 2.25
  },
  "preferred_line_length": 100,
  "relative_line_numbers": true,
  "soft_wrap": "preferred_line_length",
  "tab_size": 2,

  // Vim
  "vim_mode": true,

  // AI Assistant
  "assistant": {
    "default_model": {
      "provider": "copilot_chat",
      "model": "gpt-4o"
    },
    "version": "2"
  },
  "features": {
    "copilot": true
  },

  // Terminal
  "terminal": {
    "font_family": "MonoLisa",
    "font_features": {
      "ss01": true,
      "ss03": true,
      "ss06": true,
      "ss11": true,
      "ss13": true
    },
    "font_fallbacks": ["MonoLisa Nerd Font"],
    "font_size": 12.6,
    "line_height": {
      "custom": 1.875
    }
  },

  // LANGUAGE
  // File types
  "file_types": {
    "Blade": ["*.blade.php"],
    "ERB": ["*.html.erb"]
  },

  // Language specific settings
  "languages": {
    "Blade": {
      "prettier": {
        "allowed": true
      }
    },
    "ERB": {
      "prettier": {
        "allowed": true
      },
      "formatter": [
        {
          "external": {
            "command": "htmlbeautifier",
            "arguments": []
          }
        }
      ]
    },
    "HTML": {
      "preferred_line_length": 100
    },
    "PHP": {},
    "Ruby": {
      "language_servers": ["ruby-lsp", "rubocop", "!solargraph", "..."]
    }
  },

  // Language server protocols
  "lsp": {
    "biome": {
      "settings": {
        "require_config_file": true
      }
    },
    "tailwindcss-language-server": {
      "settings": {
        "includeLanguages": {
          "blade": "html",
          "erb": "html",
          "ruby": "html"
        },
        "experimental": {
          "classRegex": ["\\bclass:\\s*['\"]([^'\"]*)['\"]"]
        }
      }
    },
    "rubocop": {
      "initialization_options": {
        "safeAutocorrect": false
      }
    },
    "ruby-lsp": {
      "initialization_options": {
        "enabledFeatures": {
          // This disables diagnostics
          "diagnostics": false
        }
      }
    }
  }
}