首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Coqide8.5: Linux上没有语法突出显示

Coqide8.5: Linux上没有语法突出显示
EN

Stack Overflow用户
提问于 2016-06-18 21:33:23
回答 2查看 372关注 0票数 2

我安装了Coqide8.5w/ nix。不幸的是,所有面板的文本都是blakc;没有任何类型的语法突出显示(否则,8.5似乎比我安装的8.4有很大的改进)。我还得到以下信息:

代码语言:javascript
复制
(coqide:17272): GtkSourceView-WARNING **: Unknown parent scheme 'classic' in scheme 'coq_style'

(coqide:17272): GtkSourceView-WARNING **: Failed to load '/nix/store/2sxcqfc4q3ls4g2q13n1zwfhnydvgq-coq-8.5pl1/share/coq/coq.lang': could not find the RelaxNG schema file

cat ~/.nix-profile/share/coq/coq_style.xml输出

代码语言:javascript
复制
<?xml version="1.0" encoding="UTF-8"?>
<style-scheme id="coq_style" _name="Coq highlighting based on Ssr manual"
          parent-scheme="classic" version="1.0">
<author>The Coq Dev Team</author>
<_description>Coq/Ssreflect color scheme for the vernacular language</_description>

<style name="coq:comment" foreground="#brown"/>
<style name="coq:coqdoc" foreground="#brown" italic="true"/>
<style name="coq:vernac-keyword" bold="true" foreground="#dark violet"/>
<style name="coq:gallina-keyword" bold="true" foreground="#orange red"/>
<style name="coq:identifier" foreground="#navy"/>
<style name="coq:constr-keyword" foreground="#dark green"/>
<style name="coq:constr-sort" foreground="#008080"/>

<style name="coq-ssreflect:comment" foreground="#b22222"/>
<style name="coq-ssreflect:coqdoc" foreground="#b22222" italic="true"/>
<style name="coq-ssreflect:vernac-keyword" bold="true" foreground="#a021f0"/>
<style name="coq-ssreflect:gallina-keyword" bold="true" foreground="#a021f0"/>
<style name="coq-ssreflect:identifier" bold="true" foreground="#0000ff"/>
<style name="coq-ssreflect:constr-keyword" foreground="#228b22"/>
<style name="coq-ssreflect:constr-sort" foreground="#228b22"/>
<style name="coq-ssreflect:tactic" foreground="#101092"/>
<style name="coq-ssreflect:endtactic" foreground="#ff3f3f"/>
<style name="coq-ssreflect:iterator" foreground="#be6ad4"/>
<style name="coq-ssreflect:string" foreground="#8b2252"/>
</style-scheme>

给出第一个警告,我想应该有其他的东西,而不是"classic",但是

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2016-07-10 05:00:48

我安装了libgtksourceview3.0-common,但是CoqIDE依赖于libgtksourceview2.0-common。安装后一个修复了它

票数 3
EN

Stack Overflow用户

发布于 2017-06-07 22:03:56

我刚刚遇到了同样的问题,coqide是通过nix安装的(在coq-8.6包中)。

下面是一个脚本,它安装到您的homedir中的一些文件的符号链接来处理几条警告消息:

代码语言:javascript
复制
## Find the nix-installed version of the GTK SourceView 2.0 library
sourceview="$(nix-env -q coq --no-name --out-path |
    xargs nix-store -q --references |
    grep -- -gtksourceview-)"

## Link files into the correct hierarchical folders in your home dir:
share=share/gtksourceview-2.0
for file in language-specs/language2.rng \
    language-specs/def.lang \
    styles/classic.xml
do
    target="$HOME/.local/$share/$file"
    mkdir -vp "$(dirname "$target")"
    ln -vfns "$sourceview/$share/$file" "$target"
done

这修复了以下GtkSourceView-WARNING

代码语言:javascript
复制
## fixed by language-specs/language2.rng
Failed to load '.../share/coq/coq.lang': could not find the RelaxNG schema file

## fixed by language-specs/def.lang
in file .../share/coq/coq.lang: style 'def:comment' not defined
Failed to load '.../share/coq/coq.lang': unable to resolve language 'def'

## fixed by styles/classic.xml
Unknown parent scheme 'classic' in scheme 'coq_style'

我可能会尝试在某个时候修复coq派生,以避免需要这种解决办法。我怀疑下列任何一项或两项措施都需要进行:

  • 修正coq如何设置GTK SourceView搜索路径(因为它包含语言定义)
  • 修正gnome2.gtksourceview如何导出其搜索路径以供其他程序使用
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/37901837

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档