Skip to content

Instantly share code, notes, and snippets.

@maximtrp
Last active November 5, 2024 16:17
Show Gist options
  • Save maximtrp/8f78ae83f43f3a79d099581e47655d21 to your computer and use it in GitHub Desktop.
Save maximtrp/8f78ae83f43f3a79d099581e47655d21 to your computer and use it in GitHub Desktop.
Helix Editor + Svelte + Prettier configuration
[[language]]
name = "svelte"
# Format when saving
auto-format = true
# Replace path to prettier-plugin-svelte if needed (this one is for those using macOS and brew)
# You do NOT need --stdin arg as suggested by some
# Then look at helix logs to make sure you have correctly configured it
formatter = { command = 'prettier', args = ["--plugin=/opt/homebrew/lib/node_modules/prettier-plugin-svelte/plugin.js", "--parser=svelte"] }
# Optional (only if you are using and configured eslint before)
# language-servers = [ "svelteserver", "eslint" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment