Commit graph

347 commits

Author SHA1 Message Date
dependabot[bot] 0010018d61 feat(deps): bump github.com/charmbracelet/bubbletea
Bumps [github.com/charmbracelet/bubbletea](https://github.com/charmbracelet/bubbletea) from 0.24.1 to 0.24.2.
- [Release notes](https://github.com/charmbracelet/bubbletea/releases)
- [Commits](https://github.com/charmbracelet/bubbletea/compare/v0.24.1...v0.24.2)

---
updated-dependencies:
- dependency-name: github.com/charmbracelet/bubbletea
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-07 11:33:26 -04:00
Maas Lalani 8f17aa3f9a feat(write,input): add --cursor.mode=hide,blink,static 2023-06-05 16:08:40 -04:00
Maas Lalani 3609fe1da8
feat: use file picker v0.16.1 2023-05-31 14:07:00 -04:00
Maas Lalani 3f7db714ff
fix(format): indentation issues 2023-05-31 11:09:15 -04:00
Carlos Alexandro Becker 5a4b12c8ca feat: gum filter --no-sort
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-05-30 09:42:41 -05:00
Carlos Alexandro Becker a892c39289
fix: format pager/options.go
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-05-30 14:29:41 +00:00
Maas Lalani accce59ed1 fix: bump to v0.24.1 2023-05-24 13:17:02 -04:00
dependabot[bot] 25ff33e710 feat(deps): bump github.com/charmbracelet/bubbletea
Bumps [github.com/charmbracelet/bubbletea](https://github.com/charmbracelet/bubbletea) from 0.23.3-0.20230316100943-248eb83001a7 to 0.24.0.
- [Release notes](https://github.com/charmbracelet/bubbletea/releases)
- [Commits](https://github.com/charmbracelet/bubbletea/commits/v0.24.0)

---
updated-dependencies:
- dependency-name: github.com/charmbracelet/bubbletea
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-24 13:17:02 -04:00
Maas Lalani 4c3cc1773f
feat: add kaomoji example 2023-05-22 15:00:53 -04:00
Christian Rocha 6e802805cf fix(docs): correct LipglossPadding doc comment 2023-05-18 12:26:33 -04:00
Christian Rocha b23ebce896 fix: measure runes instead of bytes when truncating
There are a couple of gotchas in LipGlossTruncate:

* len() returns the number of bytes in a string
* slicing a string slices it on a byte level

The fix would normally be to convert the string to a slice of runes and
operate on that new slice:

r := []rune(str)

However, reflow already contains an ansi-aware truncate feature that we
can use instead as a drop-in replacement for the LipGlossTruncate
function.
2023-05-18 11:45:14 -04:00
Mikael Fangel c8710071ad
feature(pager): add search functionality (#321)
* Added initial search functionality

 * Added a handler for the key presses
 * Added a searchbar at the bottom of the screen
 * Made search results cycleable by pressing n

* correct start pos and ignore keys while searching

* fix out of bound error when pressing n

* made the matching pattern relative to the current pos

* added p for searching for previous match

* added highlighting to search matches

* dynamically replaced all matches

* fixed string highlight issue

* fixed truncation issue

* small simplifaction in ypos logic

* made prev and next behave the same atBottom

* simplified logic and fixed linter errors

* updated help text

* style changes

* added comments

* fixed truncation issue

* fixes infinte loop on very long lines

* added simple lipgloss truncate function

* updated colors for better contrast

* lint fix

* initial commit for soft-wrap functionality

* linter corrections and added for pager with new model

* added generic functions to a utility package

* fix soft lint errors

* made N match previous as well as p

* replaced help text when search is active

* ran gofmt -w

* reimplemented search and next to enabled support for dynamic highlights

* made the highlight move as you progress through the search

* simplified highlighter

* improvements to the clean up of the highlight function

* semi working reverse search

* reverse search without highlight

* added semi working highlight for reverser search

* working version of previous match

* fixed issue with single letter matches in next

* added support for softwrapping

* respond to soft lint warnings

* removed unused function

* lint

* simplified matchers and fixed duplicate highlights

* optimisations and change in matching pattern

* fixed bug in lipglosspadding and allowed matching 1 etc.

* make highlight respect user settings

* fixed logic error in slice

* made prev match wrap around

* fix: show next/prev match help when active

* updated how view port line is set

* avoid crashes when regex doesn't compile

* fix: spelling previous

---------

Co-authored-by: Maas Lalani <maas@lalani.dev>
2023-05-14 23:19:07 -04:00
Ayman Bagabas 23c56854d3
fix(ci): remove soft-serve workflow 2023-05-12 14:10:10 -04:00
Maas Lalani c668e153e6 feat(format): add GUM_FORMAT_THEME / GUM_FORMAT_LANGUAGE environment variable configuration 2023-05-11 23:45:29 -04:00
Maas Lalani 92c890e717
fix: use lipgloss.Width instead of runewidth.StringWidth 2023-05-11 22:21:09 -04:00
Christian Rocha ece25c7789
fix: correct copyright in man 2023-05-11 21:14:22 -04:00
Ayman Bagabas 9d2741c5f9
fix: update copyrights 2023-05-11 20:56:39 -04:00
Maas Lalani 7f54b3b289 feat(write): width < 1 uses terminal width 2023-05-11 15:13:01 -04:00
Christian Rocha 11584b5982
chore(docs): correct release year in license 2023-05-11 11:55:06 -04:00
Carlos Alexandro Becker fff07286b7
docs: update license
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-05-11 12:39:14 +00:00
Carlos Alexandro Becker 39346ed015 fix: missing filepicker styles
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-05-01 10:01:18 -04:00
Maas Lalani 99a1fa9d8e
chore(deps): update bubbles 2023-05-01 09:59:13 -04:00
Maas Lalani 8da9620bfd
chore(lint): add function comment 2023-04-12 09:57:36 -04:00
Maas Lalani 5887a10fa0 fix: strip ansi from gum filter when output is not a tty 2023-04-06 17:36:29 -04:00
Maas Lalani 6dbadf30b4 fix: strip ansi when stdout is not a tty 2023-04-06 17:36:29 -04:00
Maas Lalani 11f23830c5
fix: use Cursor.Style instead of CursorStyle 2023-03-31 11:42:09 -04:00
Maas Lalani 066c79fa14 fix(file): respect file path specified in arguments 2023-03-30 11:30:05 -04:00
Maas Lalani 0f0f8e9189 fix: detect stderr color profile 2023-03-27 12:00:24 -04:00
Maas Lalani e0bcab8608 fix: remove truecolor 2023-03-27 12:00:24 -04:00
Maas Lalani 95ddbdb416 feat: allow passing language to parse code 2023-03-24 13:40:37 -04:00
dependabot[bot] b6daeece02 chore(deps): bump actions/setup-go from 3 to 4
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 3 to 4.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-22 11:23:35 -04:00
Maas Lalani bb103c0a03
fix: show header only if not empty 2023-03-22 11:17:06 -04:00
Mikael Fangel 38521ff870 fix: correct wrong key combination for gum write in README.md
Fixes #312

### Changes:
 - Moves the `esc` over to the cancel option together with CTRL+c, so it reflects the current behaviour of the program.
2023-03-20 17:47:23 -04:00
mikael d9a3dc5324 Added esc to keys and changed error code to 130 2023-03-20 15:17:16 -04:00
Mikael Fangel 97feb1b4d0
feat: adds headers for choose and filter (#307)
* added header to choose

* corrected mistake in envvar

* added header for filter

* simplified return logic for filter

* Update choose/options.go

* render the header before calculating the height

---------

Co-authored-by: Maas Lalani <maas@lalani.dev>
2023-03-14 15:58:48 -04:00
Mikael Fangel ec2b8d0fee
removed bksp from stdin (#306)
* removed bksp from stdin

---------

Co-authored-by: Maas Lalani <maas@lalani.dev>
2023-03-13 16:35:29 -04:00
Maas Lalani ccc5d9cfea
chore: bump deps 2023-03-13 15:21:39 -04:00
dependabot[bot] b0c9b56e0e feat(deps): bump github.com/charmbracelet/lipgloss
Bumps [github.com/charmbracelet/lipgloss](https://github.com/charmbracelet/lipgloss) from 0.6.1-0.20230222162833-a74950e6da16 to 0.7.1.
- [Release notes](https://github.com/charmbracelet/lipgloss/releases)
- [Commits](https://github.com/charmbracelet/lipgloss/commits/v0.7.1)

---
updated-dependencies:
- dependency-name: github.com/charmbracelet/lipgloss
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-13 15:09:53 -04:00
dependabot[bot] 1e4012ffde feat(deps): bump github.com/muesli/termenv from 0.15.0 to 0.15.1
Bumps [github.com/muesli/termenv](https://github.com/muesli/termenv) from 0.15.0 to 0.15.1.
- [Release notes](https://github.com/muesli/termenv/releases)
- [Commits](https://github.com/muesli/termenv/compare/v0.15.0...v0.15.1)

---
updated-dependencies:
- dependency-name: github.com/muesli/termenv
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-13 15:09:44 -04:00
Mikael Fangel f46060ac43 Update write/command.go
Co-authored-by: Maas Lalani <maas@lalani.dev>
2023-03-09 12:59:53 -05:00
mikael f8adcd649b fixes errors with CR in write --value 2023-03-09 12:59:53 -05:00
dependabot[bot] 65f5a7e44e feat(deps): bump github.com/muesli/termenv from 0.14.0 to 0.15.0
Bumps [github.com/muesli/termenv](https://github.com/muesli/termenv) from 0.14.0 to 0.15.0.
- [Release notes](https://github.com/muesli/termenv/releases)
- [Commits](https://github.com/muesli/termenv/compare/v0.14.0...v0.15.0)

---
updated-dependencies:
- dependency-name: github.com/muesli/termenv
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-09 12:43:56 -05:00
mikael 708a653eae Fix for using --value in combination w/ --no-fuzzy
This add a check if the no fuzzy flag is set together with the
--no-fuzzy flag.
2023-03-09 12:42:55 -05:00
Mikael Fangel 2bda001480
fix(table): removed inheritance for selected foreground (#300) 2023-03-09 12:35:06 -05:00
Mikael Fangel 1267b7a78e
fix: added esc-key to quit table (#290) 2023-03-06 14:17:47 -05:00
Maas Lalani b5444d5f0b
feat: use filepicker bubble (#289)
* feat: use filepicker bubble

* fix: use new API

* chore: bump bubbles
2023-03-06 11:54:02 -05:00
Maas Lalani 99e6625a39
fix: don't use deprecated pager functions 2023-03-03 13:15:50 -05:00
Maas Lalani e5cb9877cf
chore: bump dependencies 2023-02-27 19:27:06 -05:00
Leon Stam 5431540431 feat(file): Add page up/down key bindings 2023-02-27 19:22:56 -05:00
Mathew Payne 83db83296a
Add staged file check for commit example (#269)
* Add staged file check for commit example

* fix: stage all confirmation

---------

Co-authored-by: Maas Lalani <maas@lalani.dev>
2023-02-27 19:19:23 -05:00