简体   繁体   English

无法在Leiningen Ultra插件设置中更改颜色方案

[英]Cannot change colorscheme in leiningen ultra plugin settings

I discovered leiningen ultra plugin, which provides a colorized REPL amongst other things: https://github.com/venantius/ultra 我发现了leiningen ultra插件,该插件除了其他功能外还提供了彩色的REPL: https : //github.com/venantius/ultra

However, the colors, especially the "blue" for function symbols are not very readable in my terminal with the black background. 然而,颜色,尤其是“蓝色”为函数符号是不是在我与黑色背景终端可读性很强。 I'd like to change the colors but wasn't able to do this following the documentation. 我想更改颜色,但是无法按照文档进行操作。

I added following configuration to my profiles.clj right under the :user key, but nothing has changed 我在:user键下将以下配置添加到我的profiles.clj ,但是没有任何改变

:ultra {:repl {:color-scheme {:function-symbol [:red]
                              :class-delimiter [:red]}}}

Any ideas what I'm doing wrong? 有什么想法我做错了吗? Has anyone been successful in setting custom color scheme? 有没有人成功设置自定义配色方案?

Following configuration in ~/lein/profiles.clj works for me: ~/lein/profiles.clj以下配置对我~/lein/profiles.clj

{:user {:plugins [[venantius/ultra "0.5.1"]]
        :ultra {:repl {:color-scheme {:delimiter [:blue]
                                      :symbol [:green]
                                      :keyword [:bold :yellow]}}}}}

在此处输入图片说明

To answer my own question: 要回答我自己的问题:

It seems that it's not possible to provide custom colorscheme to modify output of source . 似乎不可能提供自定义的colorcheme来修改source输出。 https://github.com/venantius/glow is used to colorize the output of source and the terminal-default colorscheme is hardcoded in ultra plugin: https://github.com/venantius/ultra/blob/7ccac0749220028cda4c3c1ab4d4d45503cce0cc/src/ultra/repl.clj#L21 https://github.com/venantius/glow用于对源输出进行着色,并且terminal-default颜色方案在超级插件中进行了硬编码: https : //github.com/venantius/ultra/blob/7ccac0749220028cda4c3c1ab4d4d45503cce0cc/src/ultra /repl.clj#L21

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM