1
1
mirror of https://github.com/walles/moar.git synced 2024-11-30 12:42:26 +03:00
Commit Graph

888 Commits

Author SHA1 Message Date
Johan Walles
71ee7db815 Make line.go compile again 2024-01-06 16:40:13 +01:00
Johan Walles
00ad3f4699 Make gotoLine.go compile again 2024-01-06 16:36:08 +01:00
Johan Walles
f5302738f6 Make search.go compile again 2024-01-06 16:34:20 +01:00
Johan Walles
6f92718ab2 Make scrollPosition.go compile again 2024-01-06 16:30:03 +01:00
Johan Walles
2388327f69 Start working on scrollPosition.go 2024-01-06 14:47:50 +01:00
Johan Walles
a92121e2ec Make reader.go compile 2024-01-06 14:34:16 +01:00
Johan Walles
bc866a1971 Fix package name 2024-01-06 14:10:26 +01:00
Johan Walles
a4d68435cb Add a line numbers package 2024-01-06 14:08:32 +01:00
Johan Walles
55e2daf07f Move textstyles into the (mostly) not-public part
I don't foresee this ever being published for anybody else to use.
2024-01-05 09:12:17 +01:00
Johan Walles
dc0243f9e3 Handle some warnings 2024-01-05 07:02:58 +01:00
Johan Walles
54c88d3858 Merge branch 'johan/textstyles'
This moves text styling code into its own package.
2024-01-05 06:53:27 +01:00
Johan Walles
c70228207e Make the binary compile 2024-01-05 06:45:03 +01:00
Johan Walles
4dde8fe115 Make two more files build again 2024-01-05 06:43:37 +01:00
Johan Walles
cbb5d95b5e Make styling.go compile 2024-01-05 06:42:03 +01:00
Johan Walles
0cac41d753 Make pager.go compile 2024-01-05 06:40:11 +01:00
Johan Walles
bce5031cd0 Make line.go compile 2024-01-05 06:33:43 +01:00
Johan Walles
f97a57cfaf Start extracting another package 2024-01-05 06:31:33 +01:00
Johan Walles
192838ab89
Merge pull request #181 from zmc/wezterm
Use the "select" mouse mode on WezTerm
2024-01-04 09:11:16 +01:00
Zack Cerza
06c13120d0 Use the "select" mouse mode on WezTerm 2024-01-03 10:40:49 -07:00
Johan Walles
ba9de4bfc6 Clean up the Reader type
This function is only used internally, no need to have it publicly
available.
2024-01-03 14:37:34 +01:00
Johan Walles
f98d0472fa Merge branch 'johan/color-streams'
Fixes #134.
2024-01-03 14:34:22 +01:00
Johan Walles
de5cd653fb Used to exit pager on < 1 screen of contents 2024-01-03 11:02:59 +01:00
Johan Walles
fdbbf4d1ca Text readers are done immediately, no need to wait 2024-01-03 11:01:14 +01:00
Johan Walles
8d1553179f Make the tests pass 2024-01-03 10:54:36 +01:00
Johan Walles
4167d6997f Highlight streams if we know the language 2024-01-03 10:41:53 +01:00
Johan Walles
83c1c7be38
Merge pull request #180 from walles/johan/force-format
Add a -lang option for setting the highlighting language
2024-01-02 16:18:22 +01:00
Johan Walles
d5fb484fb9 Add --lang to the man page 2024-01-02 16:14:19 +01:00
Johan Walles
cb07ce3d3a Tune --lang explanation 2024-01-02 15:43:33 +01:00
Johan Walles
cd2a8a9d09 Fix some error messages
After testing. The invalid value is already printed by the framework, no
need to include it in the error message.
2024-01-02 15:36:45 +01:00
Johan Walles
4264d277dc Make the tests pass 2024-01-02 15:32:08 +01:00
Johan Walles
a6d62191f8 Remedy a warning 2024-01-02 09:50:20 +01:00
Johan Walles
cfbbcb7980 Fix production code compile errors 2024-01-02 09:46:19 +01:00
Johan Walles
b7603ea026 Add a -lang option for input file language 2024-01-02 09:39:47 +01:00
Johan Walles
6c86039965 Move background highlighting into its own function 2024-01-01 18:11:17 +01:00
Johan Walles
855a6bf5cb Fix a test 2024-01-01 13:49:43 +01:00
Johan Walles
52e04a6eda Further slim down the highlighting API 2024-01-01 13:47:38 +01:00
Johan Walles
d8d76374f2 Update one test 2024-01-01 13:47:38 +01:00
Johan Walles
2d2844f68c Modify the highlighting API
This changes the highlighting API to take a string instead of a file
because strings are what Chroma can highlight.

With this change in place, we should invoke the highlighter after
we're done reading the input. This will allow highlighting both files
(as before) and streaming input.

This also moves the responsibility of checking the file against the max
highlight size from the highlighter to the caller.
2024-01-01 13:47:38 +01:00
Johan Walles
64022c8909
Merge pull request #179 from walles/johan/revive
Use Revive for finding unused code
2024-01-01 13:47:08 +01:00
Johan Walles
786b0d4e06 Bump CI version of golangci-lint 2024-01-01 13:43:39 +01:00
Johan Walles
4e4d7fd923 Handle warnings in moar.go 2024-01-01 13:42:42 +01:00
Johan Walles
ff74c2d27c Handle warnings in twin 2024-01-01 13:39:30 +01:00
Johan Walles
8667ded229 Disable warnings for existing issues
Fix in the future as needed.
2024-01-01 13:33:30 +01:00
Johan Walles
f0bc8f2258 Enable revive for unused parameters check 2024-01-01 13:30:25 +01:00
Johan Walles
4475ce5c63 Improve a comment 2023-12-28 18:42:50 +01:00
Johan Walles
e80c60439b Revert "Merge branch 'johan/ui-colors-from-chroma'"
This reverts commit ed491742a1, reversing
changes made to 12f316f8c8.

Before this goes in, we should first auto detect bright vs dark terminal
background and default to different themes in those two cases: #67
2023-12-28 18:42:04 +01:00
Johan Walles
794047451e
Merge pull request #174 from emanuel-skrenkovic/limit-right-scroll
Limit right paging to text
2023-12-28 18:37:04 +01:00
Johan Walles
2f6be78e4d Use the same code for wrapped and non-wrapped lines 2023-12-28 18:34:59 +01:00
Emanuel Skrenković
1acffbd42e Page right only to after last char
When paging right, it was possible to infinitely go to the right. This
commit changes that so it is only possible to go right until the last
visible character is out of screen.
2023-12-26 12:10:19 +01:00
Johan Walles
ed491742a1 Merge branch 'johan/ui-colors-from-chroma' 2023-12-20 21:03:16 +01:00