Adding (configurable) Line Numbers to the Editor - every 10 lines #3482
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
cross-platform issues (e./g. Cmd/Ctrl/Super key bindings)
yarn lint
andyarn test
commands successfullyfiles for examples)
git pull
a last time to prevent any mergeissues
Description
I added line numbers to the editor, they appear every 10 lines.
Changes
I added CodeMirror.lineNumbers to the cm options file, added some configurations to the gutter settings in Editor.less, and added a checkbox that toggles the numbers on/off
Additional information
One of the things I couldn't make nicer was the size of the gutter... so the lineNumbers gutter is 7em wide, to account for larger files. The line numbers also match the size of the line it is on, so header line numbers are larger. This is my first pull request, I'd love more guidance on how to improve the changes!
Tested on: <!-- Mac OS ->