Set the terminal's background colour to match the current colourscheme
维护者通常 3 天内回复
还没有人认领这个 Issue。
评估
调研方向
首先阅读 GetColor 附近当前的配色方案处理,以及使用 tcell 的终端渲染路径。研究 Micro 如何设置 truecolor 终端背景、检测或处理不受支持的终端,并在退出 Micro 时恢复颜色。完成的标准是终端边框与当前活动的普通背景一致,并在退出时恢复原始终端颜色。
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- Go
- 星标
- 29.9k
- 派生
- 1.4k
- 平均合并
- 1 天 9 小时
- 30 天内合并 PR
- 3
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
micro-editor/micro 的其他 Issue
-
feature syntax
难度 2/5 1-3 小时 新手友好度 72/100
micro-editor/micro#4289 ·
维护者通常 3 天内回复
-
Also bind alt-click for multi-cursors可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭feature
难度 2/5 1-3 小时 新手友好度 68/100
micro-editor/micro#4260 ·
维护者通常 3 天内回复
-
XML syntax highlighting breaks if empty tag contains whitespace before close可能已有人在做 @justadityaraj 于 62 天前认领。 未关闭bug syntax
难度 2/5 1-3 小时 新手友好度 68/100
micro-editor/micro#4213 · 1 条评论 ·
维护者通常 3 天内回复
-
难度 1/5 1 小时以内 新手友好度 78/100
micro-editor/micro#3553 · 5 条评论 ·
维护者通常 3 天内回复
-
syntax
难度 2/5 1-3 小时 新手友好度 64/100
micro-editor/micro#2969 · 3 条评论 · 1 个 reaction ·
维护者通常 3 天内回复
查看 micro-editor/micro 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
GitHub webhook is not subscribed to release events, so `event: release` never triggers可能已有人在做 @qsun 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
woodpecker-ci/woodpecker#7542 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
zilliztech/milvus-backup#1386 ·
维护者通常 1 天内回复
-
Pipelined flush no longer observes kill signals after #2042: flush backoffer is built with nil vars未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复