✨ Language-Aware Automatic Indentation
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Facilidade para iniciantes
- 25/100
Direção de pesquisa
Revise o comportamento atual de indentação do editor descrito na issue e, em seguida, compare o tratamento de gramáticas de linguagem do TextMate com o comportamento citado do VSCode. Considera-se concluído quando a indentação e a desindentação automáticas seguem a gramática da linguagem ativa, podem ser configuradas por linguagem, podem ser desativadas e mantêm os controles manuais de indentação.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Description
It would be great if CodeEdit, given instructions from the language grammar in use for the open file, were able to automatically indent and outdent lines as you type based on accepted style standards. For example, an "if" statement, "for" loop, etc. in most languages would cause the following lines to be indented once, then the closing bracket or statement would be outdented to line up with the original "if" or "for" statement. This functionality should be adjustable by editing settings for the language and able to be disabled entirely for those that prefer manual indentation.
TextMate is a good example to look at for reasonable behavior. The language grammars it uses to handle this functionality are also plist files and very easy to read to see how it's being done. Some plugins also enable this behavior in VSCode, though it's implemented inconsistently there.
Alternatives Considered
Most editors use manual indentation, which I assume CodeEdit will eventually support. Right now it only supports tabbing in (and does at least maintain that indent), but you cannot shift+tab out or use command+[ or command+] to outdent/indent (respectively) lines or selected blocks. Manual indentation works, and should be an option for those who wish to indent in ways inconsistent with language standards, but is far slower than automatic indentation.
Additional Context
No response
Screenshots
Here's an example of TextMate auto-indenting and outdenting a for loop in a shell script (bash). The second line is automatically indented to my configured tab stop, then once I finish typing "done" it outdents it to match for. This also works correctly if "do" is placed on its own line.
https://github.com/user-attachments/assets/76d5a013-7428-4764-8357-e5bdb6b179c8
- Linguagem predominante
- Swift
- Estrelas
- 23.1k
- Forks
- 1.2k
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de CodeEditApp/CodeEdit
-
Product icons are missing from the Xcode projectTalvez já em andamento Um pull request vinculado a esta issue está aberto ou já foi mesclado. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
CodeEditApp/CodeEdit#2190 ·
-
Is this project dead?Aberta
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 15/100
CodeEditApp/CodeEdit#2195 · 13 reações ·
-
enhancement
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 35/100
CodeEditApp/CodeEdit#2185 ·
-
Native GitHub Copilot inline completionsTalvez já em andamento Um pull request vinculado a esta issue está aberto ou já foi mesclado. Aberta
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 25/100
CodeEditApp/CodeEdit#2181 ·
-
creashes on startingAbertabug
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 35/100
CodeEditApp/CodeEdit#2180 ·
Todas as issues de CodeEditApp/CodeEdit
Issues semelhantes
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 64/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
xiufengsun/TokenTracker#750 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
product / databases product / functions product / self-hosted product / storage sdk / cli
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
Mantenedores costumam responder em até 1 dia
-
area:ai-suggestions bug P0 security
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
uttrflow/uttrflow-swift#5182 ·
Mantenedores costumam responder em até 1 dia
-
bug bug:behavior clawsweeper:needs-maintainer-review clawsweeper:needs-product-decision clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster P3
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
openclaw/openclaw#164903 · 1 comentário · 1 reação ·
Mantenedores costumam responder em até 1 dia