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

feat: toggle on/off #23

Merged
merged 1 commit into from Dec 27, 2023
Merged

feat: toggle on/off #23

merged 1 commit into from Dec 27, 2023

Conversation

zxt-tzx
Copy link
Contributor

@zxt-tzx zxt-tzx commented Dec 24, 2023

Closes #2

}
}

disable() {
this.enabled = false;
if (this.isLegacy) {
if (this.isLegacy()) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug from original code — this is always truthy

"@types/node": "^16.11.6",
"@typescript-eslint/eslint-plugin": "^5.2.0",
"@typescript-eslint/parser": "^5.2.0",
"builtin-modules": "^3.2.0",
"esbuild": "0.13.12",
"obsidian": "^0.12.17",
"obsidian": "1.4.11",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updating this removes some type errors

"@codemirror/state": "^6.2.0",
"@codemirror/view": "^6.2.0",
"@codemirror/language": "^6.6.0"
"typescript": "^5.3.3"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could not build using TS 4.4.4

@@ -28,15 +44,19 @@ export default class RelativeLineNumbers extends Plugin {
if (this.isLegacy()) {
this.legacyEnable();
} else {
// @ts-ignore
this.registerEditorExtension(lineNumbersRelative());
this.editorExtension.length = 0;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nadavspi
Copy link
Owner

Nice, thanks for this

@nadavspi nadavspi merged commit 5ec11e2 into nadavspi:main Dec 27, 2023
@zxt-tzx zxt-tzx deleted the feat/toggle branch December 27, 2023 09:26
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.

Allow toggling on/off
2 participants