Set the terminal's background colour to match the current colourscheme
I maintainer di solito rispondono entro 3 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
Direzione di ricerca
Inizia leggendo la gestione attuale degli schemi di colori intorno a GetColor e il percorso di rendering del terminale che usa tcell. Analizza come Micro può impostare lo sfondo di un terminale truecolor, rilevare o gestire i terminali non supportati e ripristinare il colore all’uscita da Micro. Il lavoro è completato quando i bordi del terminale corrispondono allo sfondo normale attivo e il colore originale del terminale viene ripristinato all’uscita.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Description
At present, Micro does not attempt to set the terminal background to match the current colorscheme's normal background colour. If the background colour that Micro uses is very different from the terminal's normal background colour, it can result in large and inconsistent gaps where the terminal's background is shown, and not the editor's. It would be prettier and more consistent if we could get those gaps to match Micro's own background.
This screenshot is exaggerated for effect, and the right hand side is a mock-up of what I'm hoping we can have. The size and placement of the gaps depends on how your terminal emulator distributes extra whitespace, how much default border you configure in it, and also how well your window manager or compositor respects incremental sizing requests.
So the feature request is can we have a way to make those borders the same colour as the background colour used by Micro, when using a truecolor theme? There's more than one way to do it, I guess.
-
I was considering writing a plugin for it, after successfully making one for myself to set the xterm-style window title. Back when I was still using NeoVim, I used bg.nvim on a daily basis, and it mostly did a fair job. A plugin could do this job if it has access to the truecolor style info from the current colorscheme, the ability to add callbacks that fire after changing styles, and maybe a tty access layer (although, I just used
io.write()to spray xterm codes back at the terminal for my title-setting thing!) Sadly, GetColor does not seem to be wrapped for Lua; something like it has been suggested in #3465 though. -
I noticed that Helix editor does this by default, with its standard settings. Perhaps it is done as part of its low-level character cell styling routines? Micro's
tcellmight be the best place for this, then, and if it's implemented there, perhaps it should be made the default behaviour in Micro as a whole if it can be made reliable enough (the terminal needs to support it, but I'm not not sure how you'd determine that capability)?
The colour will need to be reset upon leaving Micro, however it's done.
- Lingua principale
- Go
- Stelle
- 29.8k
- Fork
- 1.4k
- Merge medio
- 1g 12h
- PR unite (30g)
- 2
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di micro-editor/micro
-
feature syntax
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
micro-editor/micro#4289 ·
I maintainer di solito rispondono entro 3 giorni
-
Also bind alt-click for multi-cursorsForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertafeature
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
micro-editor/micro#4260 ·
I maintainer di solito rispondono entro 3 giorni
-
XML syntax highlighting breaks if empty tag contains whitespace before closeForse già presa @justadityaraj l’ha presa 57 giorni fa. Apertabug syntax
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
micro-editor/micro#4213 · 1 commento ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
micro-editor/micro#3553 · 5 commenti ·
I maintainer di solito rispondono entro 3 giorni
-
syntax
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
micro-editor/micro#2969 · 3 commenti · 1 reazione ·
I maintainer di solito rispondono entro 3 giorni
Tutte le issue di micro-editor/micro
Issue simili
-
Cluster details: the Control Plane version field has a different border color than its icon boxApertakind/design sig/ui
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
kubermatic/dashboard#8449 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
filecoin-project/curio#1632 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
-
compose: derived node options overwrite each other's targetsForse già presa @yangjj-iso l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno