Keep in mind that the line number gutter should have a constant width for all lines in a file. Therefore, the line count in the file should be inspected, and the width for all line number gutters should be set to fit the largest number. Also, there should probably be a minimum width. For example, even if a file only has dozens of lines, it should probably use gutters that could fit hundreds of lines, so that users don't see a lot of changes to the gutter width when changing files.
Add line numbers to source code.
Keep in mind that the line number gutter should have a constant width for all lines in a file. Therefore, the line count in the file should be inspected, and the width for all line number gutters should be set to fit the largest number. Also, there should probably be a minimum width. For example, even if a file only has dozens of lines, it should probably use gutters that could fit hundreds of lines, so that users don't see a lot of changes to the gutter width when changing files.