Commit graph

35 commits

Author SHA1 Message Date
Folke Lemaitre
544a2ae01c
fix(terminal): softer check for using jobstart with term=true instead of deprecated termopen 2025-02-16 12:12:08 +01:00
Folke Lemaitre
6e45829879
fix(terminal): check for 0.11 2025-02-11 14:44:44 +01:00
Folke Lemaitre
37f6665c48
feat(terminal): don't use deprecated vim.fn.termopen on Neovim >= 0.10 2025-02-11 13:41:32 +01:00
Folke Lemaitre
73c4b62896
feat(terminal): added Snacks.terminal.list(). Closes #421. Closes #759 2025-02-07 16:13:28 +01:00
Folke Lemaitre
4a6ed6912e
docs: docgen 2025-02-06 22:19:24 +01:00
Folke Lemaitre
64129e4c3c
feat(terminal): added start_insert 2025-02-06 22:17:26 +01:00
Folke Lemaitre
bb76cae87e
feat(terminal): auto_close and auto_insert. Closes #965 2025-02-06 22:14:18 +01:00
Folke Lemaitre
2abf208f2c
feat(terminal): close terminals on ExitPre. Fixes #419 2025-01-20 13:02:13 +01:00
Folke Lemaitre
3146fd139b
feat(terminal): allow overriding default shell. Closes #450 2025-01-20 12:42:59 +01:00
Folke Lemaitre
140204fde5 build: added metadata to plugins 2024-12-10 13:55:51 +01:00
Folke Lemaitre
30a0721d56
fix(terminal): hide on q instead of close 2024-11-21 11:05:01 +01:00
Folke Lemaitre
7f63d4fefb
feat(terminal): added Snacks.terminal.get(). Closes #122 2024-11-20 20:58:00 +01:00
Folke Lemaitre
313954efdf
feat(terminal): when terminal terminates too quickly, don't close the window and show an error message. See #80 2024-11-16 07:28:45 +01:00
Folke Lemaitre
1c4c74828f feat(health): added health checks to plugins 2024-11-14 23:56:37 +01:00
Folke Lemaitre
14c7875408
docs(terminal): add --color=always to example for Snacks.terminal.colorize() 2024-11-14 14:03:20 +01:00
Folke Lemaitre
0de2599b0a
docs(terminal): show as sh 2024-11-14 09:15:43 +01:00
Folke Lemaitre
519b6841c4
feat(terminal): added Snacks.terminal.colorize() to replace ansi codes by colors 2024-11-14 09:12:59 +01:00
Folke Lemaitre
215b8b3705
docs: docgen 2024-11-13 10:44:36 +01:00
Folke Lemaitre
2ccb70fd3a
fix(terminal): properly deal with args in vim.o.shell. Fixes #69 2024-11-13 10:42:04 +01:00
Folke Lemaitre
458a84bd1d
fix(terminal): pass a list of strings to termopen to prevent splitting. Fixes #59 2024-11-11 09:31:39 +01:00
Iordanis Petkakis
340cc2756e
fix(terminal): gf properly opens file (#45)
## Description
1. Currently `gf` only search in current working directory. Use `**` in
`findfile()` to do a recursive search. Otherwise, `gf` can't open a file
down a nested directory.
2. `vim.schedule` the command `vim.cmd("e ", f)`, because otherwise it
opens the file but goes to the buffer that was already opened. Not sure
why this happens, but if we schedule it correctly goes to the opened
buffer by `gf`.
3. Also changed `self:close()` to `self:toggle()`, so as not to reset
the state of the terminal unless a user specifically exits the terminal.
This is rather personal and also based on a [LazyVim
Discussion](https://github.com/LazyVim/LazyVim/discussions/4741), but I
can understand if it's not wanted in the scope of `snacks.nvim` and
probably users could change the behavior of the `gf` key in their
personal configuration.

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

## Related Issue(s)
[A LazyVim
discussion](https://github.com/LazyVim/LazyVim/discussions/4741)
<!--
  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-09 15:01:39 +01:00
Folke Lemaitre
334895c5bb
fix(terminal): user options 2024-11-07 18:04:37 +01:00
Folke Lemaitre
0b08d280b6
fix(terminal): dont overwrite user opts 2024-11-07 18:03:23 +01:00
Folke Lemaitre
084fdf7d79
docs: more docs... 2024-11-06 17:49:10 +01:00
Folke Lemaitre
66810971b9
fix(win): better implementation of window styles (previously views) 2024-11-06 10:56:08 +01:00
Folke Lemaitre
12d6f863f7
feat(win): custom views 2024-11-04 22:17:12 +01:00
Folke Lemaitre
44495d3e4d
refactor(terminal): config.float -> config.win 2024-11-04 20:40:44 +01:00
Folke Lemaitre
1bdb193139
refactor: float -> win, since it also manages splits 2024-11-04 20:29:25 +01:00
Folke Lemaitre
1abce78a8b
feat: better buffer/window vars for terminal and float 2024-11-04 12:13:42 +01:00
Folke Lemaitre
11c9ee83aa
feat(terminal): allow to override the default terminal implementation (like toggleterm) 2024-11-04 10:45:09 +01:00
Folke Lemaitre
b3d08beb8c
feat(config): get config for snack with defaults and custom opts 2024-11-04 10:15:43 +01:00
Folke Lemaitre
7ceeb47e54
feat(terminal): better defaults and winbar 2024-11-04 10:03:14 +01:00
Folke Lemaitre
a4af729b24
feat(terminal): better double esc to go to normal mode 2024-11-04 10:02:38 +01:00
Folke Lemaitre
66b252535c
fix(float): only set default filetype if no ft is set 2024-11-03 23:04:59 +01:00
Folke Lemaitre
e6cc7c998a
feat: terminal 2024-11-03 22:06:04 +01:00