No description
Find a file
Rob Stevenson 07826ce7b0 Require showLineNumber = off and correctly unload CM5 version
The CM6 extension already required showLineNumber to be off (otherwise
it would display both normal and relative line number gutters side by
side.

Before this commit the legacy extension required this setting to be on,
since it updates the formatter on the existing gutter. This also meant
we had to listen to config changes to disable and enable this plugin
internally when that setting was changed.

To keep things simpler, this commit makes it so both legacy and non-
legacy modes require the showLineNumer setting to be off. That way the
readme can state this requirement once and be done with it. The legacy
mode will actually still work if the setting is on or off, but if it is
off it will now internally enable the line number gutter via
`cm.setOption("lineNumbers", true)` (and restore this setting when
unloading).
2022-02-05 20:22:55 +00:00
.editorconfig Initial commit 2022-02-03 16:38:24 +00:00
.eslintignore Initial commit 2022-02-03 16:38:24 +00:00
.eslintrc Initial commit 2022-02-03 16:38:24 +00:00
.gitignore Initial commit 2022-02-03 16:38:24 +00:00
.npmrc Initial commit 2022-02-03 16:38:24 +00:00
esbuild.config.mjs Initial commit 2022-02-03 16:38:24 +00:00
LICENSE Create LICENSE 2022-02-04 15:43:20 +00:00
main.ts Require showLineNumber = off and correctly unload CM5 version 2022-02-05 20:22:55 +00:00
manifest.json Add readme, prepare for first release 2022-02-04 15:33:20 +00:00
package-lock.json Require showLineNumber = off and correctly unload CM5 version 2022-02-05 20:22:55 +00:00
package.json Add readme, prepare for first release 2022-02-04 15:33:20 +00:00
README.md Require showLineNumber = off and correctly unload CM5 version 2022-02-05 20:22:55 +00:00
styles.css Add plugin 2022-02-04 14:58:20 +00:00
tsconfig.json Initial commit 2022-02-03 16:38:24 +00:00
version-bump.mjs Initial commit 2022-02-03 16:38:24 +00:00
versions.json Add readme, prepare for first release 2022-02-04 15:33:20 +00:00

Obsidian relativenumber Plugin

An Obsidian plugin to enable relative line numbers (à la Vim's relativenumber).

Works in both Live Preview and legacy editor mode.

Please turn off the "Show line numbers" option in the main settings first.

Legacy mode borrows some code from the original Relative Line Numbers plugin.