Commit graph

1292 commits

Author SHA1 Message Date
Folke Lemaitre
737980d987
feat(util): throttle 2024-12-16 18:03:24 +01:00
Folke Lemaitre
3123e6e988
fix(input): make sure to show input window with a higher zindex of the parent window (if float) 2024-12-16 18:03:24 +01:00
Folke Lemaitre
0617e28f82
fix(win): unset winblend when transparent 2024-12-16 08:49:33 +01:00
Folke Lemaitre
766e671452
fix(indent): allow rendering over blank lines. Fixes #313 2024-12-16 08:42:54 +01:00
Folke Lemaitre
58081bcecb
fix(indent): use space instead of full blank for indent offset. See #313 2024-12-16 08:34:44 +01:00
Folke Lemaitre
37038df00d
feat(input): disable completion engines in input 2024-12-15 20:20:50 +01:00
Folke Lemaitre
6a36f32eaa
fix(scope): use virtcol for calculating scopes at the cursor 2024-12-15 19:24:57 +01:00
Valentin Degenne
c11b74c676
feat(styles): exportable styles (#306)
To allow syntax like:

```lua
local mystyle = Snacks.config.style('...')

-- somewhere else
Snacks.win({
  style = mystyle
})
```

and improve code navigation (e.g. jumping using `gd`, as opposed to
searching string, or not being sure of the exact name, ...)
2024-12-15 19:08:04 +01:00
Folke Lemaitre
6f3cbf8ad3
fix(indent): correct calculation of partial indent when leftcol > 0 2024-12-15 19:04:08 +01:00
Folke Lemaitre
66cce2f512
fix(indent): typo for underline 2024-12-15 18:14:10 +01:00
Iordanis Petkakis
d2b5680359
fix(notifier): open history window with correct style (#307)
## Description
This
[commit](fd9ef30206)
renamed the style for `history_notification`, but opening the window
still used the old name.
<!-- Describe the big picture of your changes to communicate to the
maintainers
  why we should accept this pull request. -->

## Related Issue(s)

<!--
  If this PR fixes any issues, please link to the issue here.
  - Fixes #<issue_number>
-->

## Screenshots

<!-- Add screenshots of the changes if applicable. -->
2024-12-15 13:24:16 +01:00
Folke Lemaitre
8ec6e6adc5
feat(scope): disable treesitter blocks by default 2024-12-15 12:32:02 +01:00
Folke Lemaitre
e63fa7bf05
fix(scope): properly caluclate start indent when cursor=true for indent scopes. See #5068 2024-12-15 12:22:17 +01:00
Folke Lemaitre
05602b6caf
docs: added documentation on how to customize styles 2024-12-15 11:17:32 +01:00
Folke Lemaitre
fd9ef30206
fix(notifier): rename style notification.history -> notification_history 2024-12-15 11:17:12 +01:00
Folke Lemaitre
54bc6bab2d
feat(scope): added opts.cursor to take cursor column into account for scope detection. (defaults to true). Closes #282 2024-12-15 09:55:42 +01:00
Folke Lemaitre
14d71c3fb2
fix(indent): fixup 2024-12-15 09:28:38 +01:00
Folke Lemaitre
f2bb7fa94e
feat(indent): properly handle continuation indents. Closes #286 2024-12-15 09:22:07 +01:00
Folke Lemaitre
effa885120
fix(util): on_key compat with Neovim 0.9 2024-12-15 08:36:14 +01:00
Folke Lemaitre
3d67bda1e2
fix(scroll): check mousescroll before spamming 2024-12-15 08:36:14 +01:00
Folke Lemaitre
002d5eb5c2
feat(util): on_key handler 2024-12-15 08:26:44 +01:00
Folke Lemaitre
cb42b952c5
feat(statuscolumn): allow left/right to be a function. Closes #288 2024-12-15 08:12:29 +01:00
Folke Lemaitre
dcc5338e6f
fix(dashboard): telescope can't be run from a vim.schedule for some reason 2024-12-15 07:54:47 +01:00
Marcin
8f56e19f91
feat(notifier): notification history option (#297)
## Description

<!-- Describe the big picture of your changes to communicate to the
maintainers
  why we should accept this pull request. -->

Option to exclude some notifications from notification history,
for example, when dealing with spinners.

## Related Issue(s)

<!--
  If this PR fixes any issues, please link to the issue here.
  - Fixes #<issue_number>
-->

## Screenshots

<!-- Add screenshots of the changes if applicable. -->
2024-12-15 07:46:27 +01:00
hankertrix
7db0cc9281
fix(indent): honor lead listchar (#303)
## Description

The lead listchar was not being honoured in
0e150f5510,
this pull request fixes that.

## Related Issue(s)

Fixes #291.

## Screenshots

Before the fix:


![image](https://github.com/user-attachments/assets/62c6ac53-1585-4285-a46d-db04013401e4)

After the fix:

![image](https://github.com/user-attachments/assets/089a9370-31ca-4190-ab50-74b0b2dc6184)
2024-12-15 07:45:42 +01:00
Folke Lemaitre
0e150f5510
fix(indent): honor listchars and list when blank is nil. Closes #296 2024-12-14 22:46:37 +01:00
Folke Lemaitre
e5ace00ddf
style(indent): debug 2024-12-14 22:46:37 +01:00
Folke Lemaitre
b41320c6b4
test: added scope tests 2024-12-14 21:50:19 +01:00
Folke Lemaitre
a9536973a9
feat(scope): text objects now use treesitter scopes by default. See #231 2024-12-14 21:50:19 +01:00
Folke Lemaitre
b7355c16fb
fix(scope): better treesitter scope edge detection 2024-12-14 21:50:19 +01:00
Folke Lemaitre
8a8b1c976f
feat(scope): Scope:inner for indent based and treesitter scopes 2024-12-14 21:50:19 +01:00
Folke Lemaitre
94e0849c3a
feat(scope): added __tostring for debugging 2024-12-14 21:50:19 +01:00
Folke Lemaitre
be2779e942
fix(scope): add indent to __eq 2024-12-14 21:50:19 +01:00
Folke Lemaitre
31bc409342
fix(indent): opts.indent.blank now defaults to listchars.space. Closes #291 2024-12-14 15:29:06 +01:00
Folke Lemaitre
7f668185ea
fix(indent): lower priorities of indent guides 2024-12-14 15:19:07 +01:00
Folke Lemaitre
ab07ec3ae7
style(toggle): make luals happy 2024-12-14 15:19:07 +01:00
Chris Grieser
97542a7d9b
fix(input): missing padding if neither title nor icon positioned left (#292)
## Description
The new`icon_pos` /`title_pos` options resulted in a situation where
there is missing padding when neither is positioned left. This PR fixes
this by falling back to `" "` as statuscolumn.

## Screenshots
before
<img alt="before" width=40%
src="https://github.com/user-attachments/assets/e99a600f-0ab6-4319-a70d-24e3f658a0bb">

after
<img alt="after" width=40%
src="https://github.com/user-attachments/assets/377f2157-32c6-40fb-a439-9af9141f00e7">
2024-12-14 14:14:58 +01:00
Folke Lemaitre
5d00e6dec5
fix(input): go back to insert mode if input was started from insert mode. Fixes #287 2024-12-14 08:08:33 +01:00
Folke Lemaitre
26b7d4cbd9
fix(input): open input window with noautocmd=true set. Fixes #287 2024-12-14 07:51:31 +01:00
Folke Lemaitre
db768a5497
fix(input): check if parent win still exists. Fixes #287 2024-12-14 07:47:31 +01:00
Folke Lemaitre
b0f5b74f4a
style: annotations 2024-12-13 23:57:50 +01:00
Folke Lemaitre
17494ad9bf
feat(win): win:line() 2024-12-13 23:57:50 +01:00
Folke Lemaitre
d0cb7070e9
feat(input): allow configuring position of prompt and icon 2024-12-13 23:57:50 +01:00
Folke Lemaitre
2a664b615f
ci: try making config options optional 2024-12-13 15:58:54 +01:00
Folke Lemaitre
ac6a74823b
fix(scope): possible loop? See #278 2024-12-13 15:44:11 +01:00
Scott Swensen
ef114c0efe
feat(lazygit): respect existing LG_CONFIG_FILE when setting config paths (#208)
## Description

This change preserves any existing Lazygit user config while still
adding the theme configuration.

New Behavior:
1. Check if `LG_CONFIG_FILE` already exists in the environment
(`vim.env.LG_CONFIG_FILE`)
2. If it exists, use that value; if not, fall back to the default config
path (`vim.fs.normalize(config_dir .. "/config.yml")`)
3. Append the normalized theme configuration path (`opts.theme_path`)

---------

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2024-12-13 14:36:26 +01:00
Folke Lemaitre
05bb95739a
feat(zen): make zen/zoom mode work for floating windows. Closes #5028 2024-12-13 13:37:39 +01:00
Folke Lemaitre
12e68a33b5
fix(notifier): set modifiable=false for notifier history 2024-12-13 13:36:59 +01:00
Folke Lemaitre
e8dd394c01
fix(scope): change from/to selection to make more sense 2024-12-13 13:23:52 +01:00
Folke Lemaitre
5200a8baa5
fix(scratch): normalize filename 2024-12-13 13:23:36 +01:00