Skip to content

Commit

Permalink
[LaTeX] Add citation to symbol/reference index
Browse files Browse the repository at this point in the history
This commit enables Goto Definition and Goto Reference for citation.
  • Loading branch information
deathaxe committed Jan 13, 2025
1 parent 83da0ee commit acb5a0a
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 6 deletions.
12 changes: 12 additions & 0 deletions LaTeX/Reference List - Citation.tmPreferences
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
<dict>
<key>scope</key>
<string>constant.other.citation.latex</string>
<key>settings</key>
<dict>
<key>showInIndexedReferenceList</key>
<integer>1</integer>
</dict>
</dict>
</plist>
14 changes: 14 additions & 0 deletions LaTeX/Symbol List - Citation.tmPreferences
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
<dict>
<key>scope</key>
<string>entity.name.type.entry-key.bibtex</string>
<key>settings</key>
<dict>
<key>showInSymbolList</key>
<integer>1</integer>
<key>showInIndexedSymbolList</key>
<integer>1</integer>
</dict>
</dict>
</plist>
14 changes: 8 additions & 6 deletions LaTeX/tests/syntax_test_latex.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit acb5a0a

Please sign in to comment.