-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Feat: Add definition links for Markdown Files #14032
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Related work on finding the start of the citation key: org.jabref.logic.texparser.DefaultLatexParser#CITE_PATTERN. However, that one is easy, because it just looks for |
…en the article in the bibfile
|
|
||
| public abstract class DefinitionProvider { | ||
|
|
||
| private static final Pattern CITATION_KEY_PATTERN = Pattern.compile("@[a-z0-9_\\-.+:]+", Pattern.CASE_INSENSITIVE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a note: PanDoc seems "also" be straight-forward: https://github.com/jgm/pandoc/blob/eb9bfb6b962efda02d33f548adc09939c5c005df/src/Text/Pandoc/Readers/Markdown.hs#L1534
|
Your pull request needs to link an issue correctly. To ease organizational workflows, please link this pull request to the issue by including a supported keyword in the pull request's description as per syntax described in GitHub's documentation. Examples
|
* Add definition links for Markdown * add ability to jumpToEntry from LSP and when running in standalone open the article in the bibfile * fix jbang * fix jbang again * fix jbang again... * reformat * reformat again * rename Logging Class * fix modernizer * switch to jspecify annotation * remove workspace capabilities * remove unused messagehandler * remove unused import * refactor * refactor: enhance citation key pattern matching and validation * sort alphabetically * docs: add clarification comment regarding LSP position handling --------- Co-authored-by: Christoph <[email protected]>
This reverts commit a985422.
* Add definition links for Markdown * add ability to jumpToEntry from LSP and when running in standalone open the article in the bibfile * fix jbang * fix jbang again * fix jbang again... * reformat * reformat again * rename Logging Class * fix modernizer * switch to jspecify annotation * remove workspace capabilities * remove unused messagehandler * remove unused import * refactor * refactor: enhance citation key pattern matching and validation * sort alphabetically * docs: add clarification comment regarding LSP position handling --------- Co-authored-by: Christoph <[email protected]>
Closes palukku#57 partially
Added the ability to ctrl + click on an
[@citationKey]in markdown files and it jumps to the entry in the GUI (if running in gui mode) else it jumps to the content of the entry in the bib file also ctrl + hover shows a preview of the entry then.Also works if the same citationkey is defined in multiple bib files in the workspace.
Steps to test
Start the Language Server and an VSCode instance with the extension enabled.
Have a .bib file with entries in it.
Cite one entry in an markdown file and ctrl + click on it.
Mandatory checks
CHANGELOG.mdin a way that is understandable for the average user (if change is visible to the user)