LineNumberDecoLineNumberDeco is a Visual Studio Code extension that adds relative line numbers as editor decorations. It is useful if you use one of the Emacs or Vim like plugins. VS Code can already show relative line numbers on its own, but it shows them instead of the absolute ones. During pair programming over Live Share or face to face, an absolute line number is the one you can say out loud. This extension displays both at once. The decorations do not get in the way of a test runner or a debugger, because they do not cover the gutter icons for breakpoints, test starts or test results. FeaturesRelative line numbers appear beside the absolute ones, following the cursor as it moves.
Five optional decorations color the numbers further. The rainbow colors each number by its distance from the cursor. Repeating digits gives numbers whose digits all repeat (11, 22, 333) their own color. Sequential digits does the same for runs of consecutive digits (123, 543, 10). Multiples of five colors every fifth number from the cursor (5, 10, 15), so jump counts read at a glance. Diagnostics paints the numbers of lines carrying an error or a warning. Settings panel
The LineNumberDeco icon in the activity bar opens a panel for every setting of this extension, and for SettingsRelative line numbers are on by default and use your theme's colors. Each decoration from the Features section has an enable key ( Every key, with types and defaults: docs/settings.md. The color settings show a color picker when edited in CommandsEverything the panel does is also a palette command, named on one pattern:
The ids matter only for keybindings and Calling commands from init.luaWith VSCode Neovim, any command from docs/commands.md can be called from Lua:
For example, bound to a key:
Using VS Code's own relative numbersSetting
Setting it to Recommended companionsUse with these recommended plugins. InspiredThank you for pioneering DevelopmentBuilding, testing, packaging and cutting a release are in docs/development.md; the decisions behind the toolchain and the pipeline are in docs/adr/. LicenseMIT License |

