From acb5a0a8c1809cf832481feccabb3a9902c4b56a Mon Sep 17 00:00:00 2001 From: deathaxe Date: Mon, 13 Jan 2025 17:53:01 +0100 Subject: [PATCH] [LaTeX] Add citation to symbol/reference index This commit enables Goto Definition and Goto Reference for citation. --- LaTeX/Reference List - Citation.tmPreferences | 12 ++++++++++++ LaTeX/Symbol List - Citation.tmPreferences | 14 ++++++++++++++ LaTeX/tests/syntax_test_latex.tex | 14 ++++++++------ 3 files changed, 34 insertions(+), 6 deletions(-) create mode 100644 LaTeX/Reference List - Citation.tmPreferences create mode 100644 LaTeX/Symbol List - Citation.tmPreferences diff --git a/LaTeX/Reference List - Citation.tmPreferences b/LaTeX/Reference List - Citation.tmPreferences new file mode 100644 index 0000000000..2ef0dabc94 --- /dev/null +++ b/LaTeX/Reference List - Citation.tmPreferences @@ -0,0 +1,12 @@ + + + + scope + constant.other.citation.latex + settings + + showInIndexedReferenceList + 1 + + + diff --git a/LaTeX/Symbol List - Citation.tmPreferences b/LaTeX/Symbol List - Citation.tmPreferences new file mode 100644 index 0000000000..70ed5a33b0 --- /dev/null +++ b/LaTeX/Symbol List - Citation.tmPreferences @@ -0,0 +1,14 @@ + + + + scope + entity.name.type.entry-key.bibtex + settings + + showInSymbolList + 1 + showInIndexedSymbolList + 1 + + + diff --git a/LaTeX/tests/syntax_test_latex.tex b/LaTeX/tests/syntax_test_latex.tex index 5b73b57713..8df9fb095c 100644 --- a/LaTeX/tests/syntax_test_latex.tex +++ b/LaTeX/tests/syntax_test_latex.tex @@ -348,12 +348,14 @@ \subsubsection{name} % ^ meta.group.bracket.latex % ^ constant.other.citation.latex -\Citeauthor*[]{ref} -% ^ meta.function.citation.latex -% ^ support.function.cite.latex -% ^ support.function.cite.latex -% ^ meta.group.bracket.latex -% ^ constant.other.citation.latex +\Citeauthor*[]{knuth97} % Hit F12 to go to definition in syntax_test_bibtex.bib +%^^^^^^^^^^^^^^^^^^^^^^ meta.function.citation.latex +%^^^^^^^^^^^ support.function.cite.latex keyword.other.cite.latex +% ^^ meta.group.bracket.latex +% ^^^^^^^^^ meta.group.brace.tex +% ^ punctuation.definition.group.brace.begin.tex +% ^^^^^^^ constant.other.citation.latex +% ^ punctuation.definition.group.brace.end.tex % URL COMMAND