Skip to content
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

Diagnostic and Quickfix for \usepackage duplicates and ordering #1280

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

nolanking90
Copy link
Contributor

Making this draft PR to gauge interest and get feedback from upstream.

This PR does the following:

  • Creates diagnostics to check for duplicate \usepackage statements.
  • Creates code actions to remove some or all of the duplicate packages.

This is just a test run of writing code actions. If there is interest, I plan to write a check for conflicting package ordering (e.g. hyperref), and possibly a code action to correct the package order.

Some comments:

  • I called these \usepackage statements Imports (i.e. Diagnostic::ImportError) in the diagnostic error enums before I remembered there is an \import command. I will probably rename these enum variants to avoid confusion.
  • This probably duplicates some functionality from elsewhere, e.g.to_proto. If you see something obvious, please leave me a comment and I will refactor as needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant