Skip to content

Instantly share code, notes, and snippets.

@suissa
Created June 27, 2026 15:25
Show Gist options
  • Select an option

  • Save suissa/b9d43dc109d882bbc964556cb9d9c04c to your computer and use it in GitHub Desktop.

Select an option

Save suissa/b9d43dc109d882bbc964556cb9d9c04c to your computer and use it in GitHub Desktop.
meu editorconfig
# https://editorconfig.org
root = true
# Regra base para quase tudo
[*]
indent_style = space
indent_size = 2
tab_width = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
# Linha máxima: útil para IDEs e alguns formatadores, mas não é universal
max_line_length = 100
# Go: deixe o gofmt mandar, mas sinalize tabs no editor
[*.go]
indent_style = tab
indent_size = tab
tab_width = 4
# Make precisa de tabs
[{Makefile,makefile,*.mk}]
indent_style = tab
indent_size = tab
tab_width = 4
# Python
[*.py]
indent_style = space
indent_size = 4
max_line_length = 88
# JavaScript / TypeScript / Frontend
[*.{js,jsx,ts,tsx,mjs,cjs,vue,svelte}]
indent_style = space
indent_size = 2
max_line_length = 100
# JSON e derivados
[*.{json,jsonc,json5,webmanifest}]
indent_style = space
indent_size = 2
# YAML
[*.{yml,yaml}]
indent_style = space
indent_size = 2
# TOML / INI / config simples
[*.{toml,ini,cfg,conf}]
indent_style = space
indent_size = 2
# Markdown: preservar espaços finais, porque podem ser quebra de linha intencional
[*.{md,mdx}]
trim_trailing_whitespace = false
max_line_length = off
# HTML / CSS
[*.{html,htm,css,scss,sass,less}]
indent_style = space
indent_size = 2
# XML / SVG
[*.{xml,svg}]
indent_style = space
indent_size = 2
# Protocol Buffers
[*.proto]
indent_style = space
indent_size = 2
# Docker / Compose
[{Dockerfile,Dockerfile.*,*.dockerfile}]
indent_style = space
indent_size = 2
# Shell scripts
[*.{sh,bash,zsh}]
indent_style = space
indent_size = 2
# Rust
[*.rs]
indent_style = space
indent_size = 4
max_line_length = 100
# Zig
[*.zig]
indent_style = space
indent_size = 4
# C / C++ / Headers
[*.{c,h,cpp,cxx,cc,hpp,hxx}]
indent_style = space
indent_size = 4
# Haskell
[*.{hs,lhs}]
indent_style = space
indent_size = 2
# Prolog
[*.{pl,pro}]
indent_style = space
indent_size = 2
# Gleam
[*.gleam]
indent_style = space
indent_size = 2
# Koka
[*.kk]
indent_style = space
indent_size = 2
# SQL
[*.sql]
indent_style = space
indent_size = 2
max_line_length = 120
# GraphQL
[*.{graphql,gql}]
indent_style = space
indent_size = 2
# Templates
[*.{hbs,mustache,twig,liquid}]
indent_style = space
indent_size = 2
# Seus formatos/DSLs
[*.{2flow,graflow,qbec,um,y2fl,sbta,lieb,vieta}]
indent_style = space
indent_size = 2
max_line_length = 120
# Arquivos de ambiente: manter espaços finais só se você realmente precisar.
# Eu prefiro limpar.
[.env*]
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
insert_final_newline = true
# Lockfiles e arquivos gerados: não tentar mexer demais
[*.lock]
indent_size = unset
max_line_length = unset
[{package-lock.json,pnpm-lock.yaml,yarn.lock,composer.lock,Cargo.lock,go.sum}]
indent_size = unset
max_line_length = unset
# Certificados, chaves, snapshots e dumps: cuidado com alteração automática
[*.{pem,key,crt,cer,p12,pfx,der,dump,snapshot}]
trim_trailing_whitespace = false
insert_final_newline = false
indent_size = unset
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment