geany 自定义文件类型 .sass 用于语法高亮 [英] geany custom filetype .sass for syntax highlighting

查看:65
本文介绍了geany 自定义文件类型 .sass 用于语法高亮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道有一些答案,但都不完整.
无法获得有效的 .sass 语法突出显示.
我遵循了官方指南中描述的所有步骤,但没有运气.

I know there are some answers around, but all incomplete.
Can't get a working .sass syntax highlighting.
I followed all the steps described in the official guide, but no luck.

所采取的步骤:
从 css 文件复制:

Steps made:
copied from css file:

# cp /usr/share/geany/filetypes.css ~/.config/geany/filedefs/filetypes.sass.conf

带有所需的 .sass.conf 扩展名.我已经设置了

with the needed .sass.conf extension. I've set the

extension=.sass

(此时在 geany 文档菜单中我已经可以找到新的文件类型sass 文件")

(at this point in geany Document menu I can already find the new file type "sass file")

我在我的 ~/.config/geany 中复制并编辑了 filetype_extensions.conf 添加:

I copied and edited filetype_extensions.conf in my ~/.config/geany adding:

SASS=*.sass;

现在,我想只缺少一件事,lexer_filetype 和/或 tag_parser 声明在以前的 filetypes.sass.conf 中,但我找不到很多关于此的信息.什么是可用的词法分析器?我尝试了一个简单的 lexer_filetype=csstag_parser=css 但什么都没有.

Now, I guess only one thing's missing, the lexer_filetype and/or tag_parser declaration in the former filetypes.sass.conf, but I can't find many informations about this. What are available lexer? I tried with a simple lexer_filetype=css and tag_parser=css but nothing.

之前设法运行此程序的任何人有任何线索吗?

Any clue from anyone who managed to run this before?

推荐答案

大多数名称区分大小写.如果您使用 lexer_filetype=CSS,它应该可以工作.另外,我不是很肯定,但您可能希望将文件命名为 filetypes.SASS.conf 即使它不是必需的(不确定),这在某种程度上是自定义文件类型的约定.

Most names are case-sensitive. It should work if you use lexer_filetype=CSS. Also, I'm not positive, but you might want to name the file as filetypes.SASS.conf even it's not required (not sure), it's somewhat of a convention for custom filetypes.

遗憾的是,如果您想找到可用的词法分析器文件类型,您必须阅读源码.

Sadly, if you want to find the available lexer filetypes, you'll have to read the source.

这篇关于geany 自定义文件类型 .sass 用于语法高亮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆