Commit Graph

1873 Commits (c73b18be77ca73e461a991bf8d30a8c5f95af597)

Author SHA1 Message Date
Wilfred Hughes a27f7c11c1 Allow overriding the terminal width calculation 2019-01-21 10:05:56 +07:00
Wilfred Hughes 1c6501cf6f Tweak help formatting 2019-01-21 10:05:32 +07:00
Wilfred Hughes 842f8f0554 Three lines of context by default 2019-01-21 09:57:53 +07:00
Wilfred Hughes f94ef9e300 Factoring out a helper function for line start positions 2019-01-21 01:02:30 +07:00
Wilfred Hughes 140ad392ab A function for colouring on a line-by-line basis 2019-01-21 00:38:53 +07:00
Wilfred Hughes 586842721d Make apply_color handle ranges that exceed the length of the string 2019-01-18 09:41:32 +07:00
Wilfred Hughes ed653c0b20 Factor out a diffs module 2019-01-15 09:54:45 +07:00
Wilfred Hughes 07e0774818 Basic context implementation 2019-01-15 09:44:57 +07:00
Wilfred Hughes 8823efa83c Remove debugging 2019-01-14 09:59:27 +07:00
Wilfred Hughes 6ff9764716 Add Language::from helper function 2019-01-14 09:59:04 +07:00
Wilfred Hughes 4971083c23 Move language detection and lexing to a separate module 2019-01-14 09:53:57 +07:00
Wilfred Hughes 9775bf9b60 Move lines functionality to a separate file 2019-01-14 01:13:40 +07:00
Wilfred Hughes 5f487211a7 WIP allow the user to specify context 2019-01-13 10:43:26 +07:00
Wilfred Hughes 33a6d189fe Define a LineNumber wrapper type 2019-01-12 15:10:06 +07:00
Wilfred Hughes c3fd6ab072 Factor out a range type 2019-01-12 13:37:36 +07:00
Wilfred Hughes 07b72c1ee6 Factor out a LineRange type 2019-01-12 01:28:42 +07:00
Wilfred Hughes 5bb9fca580 Get relative line length calculations passing 2019-01-11 09:50:24 +07:00
Wilfred Hughes ee4650b031 WIP line relative positions 2019-01-10 01:48:32 +07:00
Wilfred Hughes d763cf9c3b Drop trivia, fix start positions for lexing, and add test 2019-01-04 01:14:24 +07:00
Wilfred Hughes 8d0710d4f0 Use first class string offsets 2019-01-04 01:14:20 +07:00
Wilfred Hughes 79d32067f0 Infer file type from extension 2019-01-01 13:45:43 +07:00
Wilfred Hughes 71bc6a53c4 Pad to the terminal width if the files are narrower 2018-12-31 17:53:07 +07:00
Wilfred Hughes 958033924a Initial proof of concept 2018-12-29 15:29:42 +07:00