[英]Coqide 8.5: No syntax highlighting on Linux
我安裝Coqide8.5瓦特/ nix
。 不幸的是,所有面板中的文字都是空白。 沒有任何語法高亮顯示(否則,8.5似乎比我已經安裝的8.4有了很大的改進)。 我也得到以下信息:
(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
:
<?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"
但是
我已經安裝了libgtksourceview3.0-common
但是CoqIDE依賴於libgtksourceview2.0-common
。 安裝后者修復它
我只是通過nix
(在coq-8.6
軟件包中)安裝了coqide
遇到了同樣的問題。
這是一個腳本,該腳本將符號鏈接安裝到homedir中的某些文件,以解決多個警告消息:
## 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
:
## 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
如何導出其搜索路徑以供其他程序使用
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.