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

Some improvements to plugin initialization #322

Merged
merged 4 commits into from
Sep 17, 2024
Merged

Conversation

bdm-k
Copy link
Contributor

@bdm-k bdm-k commented Aug 17, 2024

Changes

  • Fixed vulnerability in dependencies by running npm audit fix.
  • Removed redundant sortSnippets calls in "main.ts". Snippets returned by the function parseSnippets are already sorted.
  • Refactored the function refreshCMExtensions and renamed it to setEditorExtensions.
    • Moved the line calling this.app.workspace.updateOptions outside of the function so that its side effect is limited to modifying this.editorExtensions.
    • Eliminated the use of latexSuiteExtensions and optionalExtensions. The previous code feels hacky because it required @ts-ignore. In addition, I found the name latexSuiteExtensions unclear.
  • Removed the call to reconfigureLatexSuiteConfig in processSettings. The extensions reconfigured by reconfigureLatexSuiteConfig will be removed in the call to refreshCMExtensions (setEditorExtensions in new code), so reconfigureLatexSuiteConfig is unnecessary.

src/main.ts Show resolved Hide resolved
src/main.ts Outdated Show resolved Hide resolved
@bdm-k bdm-k marked this pull request as draft August 17, 2024 22:06
@bdm-k bdm-k marked this pull request as ready for review August 20, 2024 10:31
@artisticat1
Copy link
Owner

Hi, thanks for the PR! Will try to review it soon.

@bdm-k
Copy link
Contributor Author

bdm-k commented Sep 5, 2024

The commit history has become a bit messy. Should I clean it up and force push?

@artisticat1
Copy link
Owner

Sure, go ahead.

@bdm-k
Copy link
Contributor Author

bdm-k commented Sep 16, 2024

I'm done!

@artisticat1
Copy link
Owner

Thanks!

@artisticat1 artisticat1 merged commit a040675 into artisticat1:main Sep 17, 2024
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.

2 participants