Folke Lemaitre
39c009fe0b
fix(indent): make sure cursor line is in scope for the out
style. Fixes #264
2024-12-12 11:55:46 +01:00
Folke Lemaitre
0a9b013ff1
feat(indent): animation styles out
, up_down
, up
, down
2024-12-12 11:03:35 +01:00
Folke Lemaitre
50912dc2fd
feat(animate): allow toggling buffer-local / global animations with or without id
2024-12-12 09:18:54 +01:00
Folke Lemaitre
42439123c4
feat(util): get var either from buffer or global
2024-12-12 09:18:12 +01:00
Folke Lemaitre
baf8c180d9
feat(indent): move animate settings top-level, since they impact both scope and chunk
2024-12-12 09:17:54 +01:00
Folke Lemaitre
851dc7854b
docs: docgen
2024-12-12 08:44:47 +01:00
Folke Lemaitre
25c290d7c0
feat(animate): allow disabling all animations globally or per buffer
2024-12-12 08:44:19 +01:00
Folke Lemaitre
4f22016b4b
feat(toggle): return toggle after map
2024-12-12 08:00:14 +01:00
Folke Lemaitre
3367705813
feat(toggle): added zoom toggle
2024-12-12 07:28:09 +01:00
SueXY
63506d5168
feat(dashboard): add dashboard startuptime icon option ( #214 )
...
## Description
Adds an `icon` option to the dashboard `startup` section. So people
(like me, who thinks an emoji in a bunch of nerdfonts is awkward) can
change it easily.
## Screenshots
<details>
<summary>Screenshots</summary>
Screenshot with a minimal config

</details>
---------
Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2024-12-12 06:50:04 +01:00
Folke Lemaitre
2457d913dc
fix(indent): when at edge of two blocks, prefer the one below. See #231
2024-12-12 06:42:35 +01:00
Folke Lemaitre
bc7f96bdee
fix(indent): gradually increase scope when identical to visual selection for text objects
2024-12-11 23:58:55 +01:00
Folke Lemaitre
5f217bca6a
fix(indent): set max_size=1 for textobjects and jumps by default. See #231
2024-12-11 23:58:55 +01:00
Folke Lemaitre
897f801924
fix(indent): expand scopes to inlude end_pos based on the end_pos scope. See #231
2024-12-11 23:58:55 +01:00
Folke Lemaitre
33fbb309f8
fix(compat): fixes for Neovim < 0.10
2024-12-11 23:20:28 +01:00
Folke Lemaitre
b13eaf6bd9
fix(zen): return after closing. Fixes #259
2024-12-11 22:54:19 +01:00
Folke Lemaitre
69018d070c
fix(dim): check if win still exist when animating. Closes #259
2024-12-11 22:53:55 +01:00
Folke Lemaitre
0324125ca1
fix(scope): typo for textobject
2024-12-11 22:37:13 +01:00
pynappo
9c68a54af6
fix(dashboard): add filetype to terminal sections ( #215 )
...
The intention is to make it easier to exclude the dashboard terminal
from some plugins. For example, heirline.nvim sets winbar per-window to
allow for winbar to be optionally disabled in non-floating windows, so
this PR lets me disable heirline for snacks' dashboard terminals over
other floating terminals.
2024-12-11 22:35:56 +01:00
Folke Lemaitre
8b58b55e40
fix(notifier): toggle show history. Fixes #197
2024-12-11 22:26:23 +01:00
Folke Lemaitre
ec191b3fe9
docs: docgen
2024-12-11 22:20:26 +01:00
Folke Lemaitre
b72560fa58
docs: docgen
2024-12-11 22:18:44 +01:00
Folke Lemaitre
8faafb3483
feat(scope): text objects and jumping for scopes. Closes #231
2024-12-11 22:17:59 +01:00
Folke Lemaitre
41ca13d119
fix(scroll): don't animate invalid windows
2024-12-11 20:50:44 +01:00
Folke Lemaitre
8c2410c2de
fix(input): set current win in vim.schedule
so that it works properly from expr
keymaps. Fixes #257
2024-12-11 18:53:38 +01:00
Folke Lemaitre
c1296836f5
fix(indent): better way of dealing with indents on blank lines. See #246
2024-12-11 18:50:55 +01:00
Folke Lemaitre
c17c1b2f6c
fix(input): set current win before executing callback. Fixes #257
2024-12-11 18:31:32 +01:00
Folke Lemaitre
c9f494bd9a
feat(toggle): add which-key mappings when which-key loads
2024-12-11 18:23:39 +01:00
Folke Lemaitre
f540b7b6cc
feat(util): added Snacks.util.on_module to execute a callback when a module loads (or immediately when already loaded)
2024-12-11 18:23:14 +01:00
Folke Lemaitre
6c27ff2a36
fix(input): update window position in the context of the parent window to make sure position=cursor works as expected. Fixes #254
2024-12-11 17:23:27 +01:00
Chris Grieser
e01668c367
fix(input): various minor visual fixes ( #252 )
...
## Description
1. Trim the trailing `:` from the prompt. The `:` is usually added to
`vim.ui.input`, since it is by default displayed in the cmdline, where a
separater is useful. As a window title, however, it serves no purpose;
adding a `:` to a title is generally disrecommended.
2. Disable cursorline in the input window by default. Since the input
window by default has a height of 1, the cursorline is not helpful at
all, and only results in an inconsistently looking appearance.
3. In case the user disables the icon by setting it to `""`, there is
excess padding which looks weird (and also does not align with a window
title set to `left`). Thus added a check for an empty string and adjust
the padding accordingly.
4. Set `snacks_input` as default filetype for the input buffer, in line
with how the other modules of `snacks` work.
All four changes are a separate commit, in case one of them is for some
reason not desirable.
## Screenshots
before

after

2024-12-11 14:51:52 +01:00
Jorge Villalobos
9454ba35f8
feat(toggle): add zen mode toggle ( #243 )
...
## Description
<!-- Describe the big picture of your changes to communicate to the
maintainers
why we should accept this pull request. -->
Adds a `zen` mode toggle.
## 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. -->




---------
Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2024-12-11 11:28:48 +01:00
Folke Lemaitre
7b5a78a5c7
fix(scroll): disable scroll by default for terminals
2024-12-11 10:35:15 +01:00
Folke Lemaitre
d04cf1dc4f
fix(indent): properly deal with empty lines when highlighting scopes. Fixes #246 . Fixes #245
2024-12-11 10:33:09 +01:00
Folke Lemaitre
9c8f3d5318
fix(words): incorrect enabled check. Fixes #247
2024-12-11 10:05:30 +01:00
Folke Lemaitre
4a4ad633dc
feat(indent): allow disabling indent guides. See #230
2024-12-11 10:00:52 +01:00
Folke Lemaitre
280a09e4ee
fix(scroll): use actual scrolling to perform the scroll to properly deal with folds etc. Fixes #236
2024-12-11 09:54:39 +01:00
Folke Lemaitre
fefa6fd692
feat(scroll): user virtual columns while scrolling
2024-12-11 09:54:06 +01:00
Folke Lemaitre
0ca9ca7992
fix(scroll): don't bother setting cursor when scrolloff is larger than half of viewport. Fixes #240
2024-12-11 09:53:00 +01:00
Folke Lemaitre
26c3e4960f
feat(scroll): use on_key
to track mouse scrolling
2024-12-11 09:51:00 +01:00
Folke Lemaitre
1fe01039fe
refactor(animate): del -> stop
2024-12-11 09:50:35 +01:00
Folke Lemaitre
7211ec08ce
fix(scroll): move scrollbind check to M.check
2024-12-10 21:32:26 +01:00
Folke Lemaitre
c9880ce872
fix(scroll): only animate the current window when scrollbind is active
2024-12-10 20:34:06 +01:00
Folke Lemaitre
51f95693ae
fix(indent): underline. See #234
2024-12-10 20:10:10 +01:00
Folke Lemaitre
b5cb90f91d
feat(zen): zz
when entering zen mode
2024-12-10 19:50:58 +01:00
Folke Lemaitre
d93de7af69
fix(zen): when Normal is transparent, show an opaque transparent backdrop. Fixes #235
2024-12-10 19:50:47 +01:00
Folke Lemaitre
acf743fcfc
fix(input): health check. Fixes #239
2024-12-10 19:38:40 +01:00
Folke Lemaitre
4209929e6d
fix(scroll): set cursor to correct position when target is reached. Fixes #236
2024-12-10 19:36:58 +01:00
Folke Lemaitre
782b6ee3fc
fix(indent): set shiftwidth to tabstop when 0
2024-12-10 19:30:32 +01:00
Folke Lemaitre
109a0d207e
feat(indent): optional rendering of scopes as chunks. Closes #230
2024-12-10 19:25:40 +01:00