Commit graph

116 commits

Author SHA1 Message Date
Folke Lemaitre
ca233c7448
fix(win): don't enter when focusable is false 2024-12-31 06:03:31 +01:00
Folke Lemaitre
a1da66e3bf
feat(win): Snacks.win:scroll 2024-12-31 06:02:36 +01:00
Folke Lemaitre
eb887f4abb
style: luals 2024-12-18 07:02:08 +01:00
Folke Lemaitre
0617e28f82
fix(win): unset winblend when transparent 2024-12-16 08:49:33 +01:00
Folke Lemaitre
37038df00d
feat(input): disable completion engines in input 2024-12-15 20:20:50 +01:00
Folke Lemaitre
17494ad9bf
feat(win): win:line() 2024-12-13 23:57:50 +01:00
Folke Lemaitre
33fbb309f8
fix(compat): fixes for Neovim < 0.10 2024-12-11 23:20:28 +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
140204fde5 build: added metadata to plugins 2024-12-10 13:55:51 +01:00
Folke Lemaitre
5d472b833b fix(win): ensure win is set when relative=win 2024-12-10 13:55:51 +01:00
Folke Lemaitre
46362a5a9c feat(win): added actions to easily combine actions in keymaps 2024-12-10 13:55:51 +01:00
Folke Lemaitre
bd49d2f32e feat(win): col/row can be negative calculated on height/end of parent 2024-12-10 13:55:51 +01:00
Folke Lemaitre
003ea8d6ed feat(win): allow configuring initial text to display in the buffer 2024-12-10 13:55:51 +01:00
Folke Lemaitre
cdb495cb8f feat(win): allow customizing backdrop window 2024-12-10 13:55:51 +01:00
Folke Lemaitre
681b9c9d65
feat(win): backdrop can now be made opaque 2024-12-03 10:29:55 +01:00
Folke Lemaitre
96ac87b6b1
refactor: move is_transparent to util 2024-12-03 10:29:21 +01:00
Folke Lemaitre
446f50208f
fix(win): update opts.wo for padding instead of vim.wo directly 2024-12-03 10:18:27 +01:00
Folke Lemaitre
630d96cf1f
fix(win): update window local options when the buffer changes 2024-12-03 09:18:10 +01:00
Folke Lemaitre
964d7ae99a
feat(win): width/height can now be a function 2024-12-02 20:47:32 +01:00
Folke Lemaitre
1f74d1ce77
feat(win): added opts.fixbuf to configure fixed window buffers 2024-12-02 20:47:32 +01:00
Folke Lemaitre
0043fa9ee1
fix(win): allow resolving nil window option values. Fixes #179 2024-12-01 17:19:14 +01:00
Folke Lemaitre
d517b11cab
fix(win): don't force close modified buffers 2024-11-30 21:47:33 +01:00
Folke Lemaitre
b813c3383c
refactor(win): normalize keys during init 2024-11-30 21:46:55 +01:00
Folke Lemaitre
51996dfeac
feat(win): go back to the previous window, when closing a snacks window 2024-11-29 07:37:49 +01:00
Folke Lemaitre
0b020449ad
fix(win): handle E565 errors on close 2024-11-23 13:10:33 +01:00
Folke Lemaitre
7f63d4fefb
feat(terminal): added Snacks.terminal.get(). Closes #122 2024-11-20 20:58:00 +01:00
Folke Lemaitre
9c0d2e2e93
feat(win): detect alien buffers opening in managed windows and open them somewhere else. Fixes #110 2024-11-19 10:16:51 +01:00
Folke Lemaitre
d540fa607c
feat(dashboard): added new dashboard snack (#77)
## Description

A new dashboard plugin that comes with sane defaults, and can be fully
customized to your liking.

## Screenshots


![image](https://github.com/user-attachments/assets/944373ea-f443-4c16-bfe0-2dc78101f8f5)


![image](https://github.com/user-attachments/assets/492b075e-168d-4d58-af39-1268c047f374)


![image](https://github.com/user-attachments/assets/53a388c2-ca5a-4efb-94f2-752222f43584)


![image](https://github.com/user-attachments/assets/3c6ee94b-6785-4035-8ed2-2f67f39b5f06)


![image](https://github.com/user-attachments/assets/5b7a7117-e504-4b36-88db-91ccc89d8997)
2024-11-18 16:25:17 +01:00
Chris Grieser
d3dc8e7c27
fix(win): delay when closing windows (#81)
## Description
`vim.keymap.set` was missing the `nowait = true`
2024-11-16 06:59:03 +01:00
Tu Nguyen
f0e47fd5dc
fix(win): take border into account for window position (#64)
## Description

<!-- Describe the big picture of your changes to communicate to the
maintainers
  why we should accept this pull request. -->
The window position is not correctly centered when position is set to
`float` and border isn't `none`. I found [a similar
issue](https://github.com/folke/lazy.nvim/issues/812) in
[lazy.nvim](https://github.com/folke/lazy.nvim) along with [your
fix](451f217e9b)
there, so I have applied the same fix here. Thank you for your work!

## Related Issue(s)
https://github.com/folke/lazy.nvim/issues/812

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

## Screenshots

<!-- Add screenshots of the changes if applicable. -->

### Before
<img width="2240" alt="image"
src="https://github.com/user-attachments/assets/6e5eeb7b-7993-4ab5-a40e-c77021a5ccb0">

### After
<img width="2240" alt="image"
src="https://github.com/user-attachments/assets/66ad76ab-8ca2-446f-afce-b18599313319">

---------

Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
2024-11-12 19:57:01 +01:00
Folke Lemaitre
09a6f17ecc
fix(notifier): take title/footer into account to determine notification width. Fixes #54 2024-11-11 11:07:28 +01:00
Folke Lemaitre
eb8ab37f6a
perf(win): don't try highlighting snacks internal filetypes 2024-11-10 09:20:12 +01:00
Folke Lemaitre
cc80f6dc1b
perf(win): prevent treesitter and syntax attaching to scratch buffers 2024-11-08 15:39:17 +01:00
Folke Lemaitre
5ccf72e6d0
docs(win): document width/height behavior for win 2024-11-08 13:20:02 +01:00
Folke Lemaitre
5fd9c426e8
fix(win): update win/buf opts when needed 2024-11-08 09:27:28 +01:00
Folke Lemaitre
61496a3ef0
perf(win): skip events when setting buf/win options. Trigger FileType on BufEnter only if needed 2024-11-08 07:28:27 +01:00
Folke Lemaitre
12077bcf65
feat(win): disable winblend when colorscheme is transparent. Fixes #26 2024-11-07 23:10:39 +01:00
Folke Lemaitre
cc5ee192ca
fix(win): properly resolve user styles as last 2024-11-07 22:22:55 +01:00
Folke Lemaitre
f59237f1dc
fix(win): simpler way to add buffer padding 2024-11-07 18:30:01 +01:00
borgy
f5602e60c3
fix(win): set border to none for backdrop windows (#19)
## Description
Previously, backdrop windows were being created with the default border
options set in `opts`. I can't imagine this is ever desirable (see
screenshots), so always set the backdrop window border to none.

## Related Issue(s)
N/A

## Screenshots
### Before:

![image](https://github.com/user-attachments/assets/1ff0d810-ac6a-4309-b198-125f2a68331c)

### After:

![image](https://github.com/user-attachments/assets/2f1b348e-4e55-4631-934f-67896c0e2488)
2024-11-07 14:38:16 +01:00
Folke Lemaitre
d3efb92aa5
feat(win): util methods to handle buffer text 2024-11-07 14:32:34 +01:00
Folke Lemaitre
4991e347dc
fix(win): dont center float when relative="cursor" 2024-11-07 14:32:18 +01:00
Folke Lemaitre
107d10b52e
fix(win): disable sidescroloff in minimal style 2024-11-07 14:31:57 +01:00
Teppei Taguchi
59ae7cf162
docs(readme, lazygit): fix typos (#16)
## Description

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

## 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-11-07 13:50:13 +01:00
Folke Lemaitre
cad236f9bb
feat(win): allow setting ft just for highlighting without actually changing the filetype 2024-11-07 00:17:39 +01:00
Folke Lemaitre
e982aabefd
feat(win): equalize splits 2024-11-06 23:40:47 +01:00
Folke Lemaitre
476fb56bfd
feat(win): win:focus() 2024-11-06 23:07:02 +01:00
Folke Lemaitre
8be14c68a7
fix(win): better winfixheight and winfixwidth for splits 2024-11-06 23:07:02 +01:00
Folke Lemaitre
8c0f10b9da
feat(win): added default hl groups for windows 2024-11-06 22:52:43 +01:00
Folke Lemaitre
6c76f91398
fix(config): deepcopy config where needed 2024-11-06 22:36:37 +01:00