gpt4 book ai didi

python - 如何设置 Atom 的 'styles.less' 文件以突出显示 Python 中的函数和方法调用?

转载 作者:太空狗 更新时间:2023-10-29 12:31:19 25 4
gpt4 key购买 nike

我想在 Sublime Text 中像这里一样突出显示它:

enter image description here

我按照建议尝试了 here :

atom-text-editor, atom-text-editor::shadow {
.meta.function-call.python {
color: '#abcde';
}
}

但是,Atom 的弃用是这样说的:

Starting from Atom v1.13.0, the contents of atom-text-editor elements are no longer encapsulated within a shadow DOM boundary. This means you should stop using :host and ::shadow pseudo-selectors, and prepend all your syntax selectors with syntax--. To prevent breakage with existing style sheets, Atom will automatically upgrade the following selectors:

  • atom-text-editor .meta.function-call.generic.python,
  • atom-text-editor::shadow .meta.function-call.generic.python => atom-text-editor .meta.function-call.generic.python,
  • atom-text-editor.editor
    .syntax--meta.syntax--function-call.syntax--generic.syntax--python

Automatic translation of selectors will be removed in a few release cycles to minimize startup time. Please, make sure to upgrade the above selectors as soon as possible.

应该是这样的吧? (我试过了,但是不行)

atom-text-editor {
.meta.function-call.python {
color: '#66D9EF';
}
}

atom-text-editor.editor {
.syntax--meta.syntax--function-call.syntax--python {
color: '#66D9EF';
}
}

谁能帮我在 Atom 的 Monokai 语法颜色主题中突出显示函数和方法调用?

最佳答案

您需要从颜色规则中删除 ''。那些不去那里。我测试过,这有效:

atom-text-editor.editor {
.syntax--meta.syntax--function-call.syntax--python {
color: #66D9EF;
}
}

关于python - 如何设置 Atom 的 'styles.less' 文件以突出显示 Python 中的函数和方法调用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44721230/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com