Commit graph

415 commits

Author SHA1 Message Date
Akin Sowemimo
61381ae4e8 refactor(toggleterm): send commands as lua functions
rather than strings as the visual selection markers aren't strictly
necessary
2022-07-16 14:22:03 +01:00
Akin Sowemimo
9f05033362 fix(toggleterm): convert cmd args to a number 2022-07-16 14:20:02 +01:00
Akin Sowemimo
0c1dc87fa9 fix(config): only set winbar winhighlight on nightly 2022-07-16 10:28:02 +01:00
Akin
9150581633
feat(toggleterm): add a simple winbar to show terminal data (#229)
* feat(toggleterm): add a simple winbar to show terminal data

* refactor(ui): use win set value

* refactor(ui): improve winbar styling and toggleability

* chore(lsp): update emmy annotations

* fix(toggleterm): toggle terminals on click

* chore(lsp): more Emmy lua fixes

* ci(test): target nvim nightly

* fix(ui): allow opening the first terminal if no id

* docs(README): add mention of winbar and config

* chore(ci): auto generate docs

* fix(toggleterm): revert unnecessary ID changes

Co-authored-by: akinsho <akinsho@users.noreply.github.com>
2022-07-15 11:01:43 +01:00
Akin Sowemimo
bd2b6f67f0 chore(colors): simplify shade colors 2022-07-15 11:41:51 +02:00
Akin Sowemimo
900fb7a90d chore(lsp): fix type annotations 2022-07-15 11:41:51 +02:00
Akin Sowemimo
00d26454e2 feat(ui): fix leaking winhighlight (on nightly)
nvim nightly adds an api method which allows setting window options in
such a way that they do not then get passed on to subsequent windows
2022-07-15 11:41:51 +02:00
Morgan McCauley
8e6f938ed8
fix: ensure terminals are deleted correctly when multiple open (#264) 2022-07-12 09:58:51 +02:00
Akin Sowemimo
1a8b330d3d style(stylua): reformat project
use collapse simple statement
2022-07-10 19:11:33 +02:00
akinsho
615e832430 chore(ci): auto generate docs 2022-07-10 14:24:17 +00:00
Akin Sowemimo
f34298cf4a docs(README): bump recommended tag to v2 2022-07-10 16:23:49 +02:00
Akin Sowemimo
8cba5c20c9 chore(config): remove deprecation handler
As there are currently no deprecations
2022-07-05 09:48:38 +02:00
David Mejorado
b8bb778192
feat: add command completion to TermExec and ToggleTerm (#256) 2022-07-05 08:48:23 +01:00
akinsho
04174e1919 chore(ci): auto generate docs 2022-06-29 13:41:12 +00:00
Grace Han
2e152e840a
docs(README): update vim-plug installation instructions (#254) 2022-06-29 14:40:35 +01:00
Akin Sowemimo
8f2e78d025 fix: close float windows on WinLeave
This fixes a regression where using BufWinLeave instead of WinLeave did
not trigger closing of floating windows on navigating away from them
fixes #246
2022-06-21 08:48:01 +02:00
Akin
ce755e3a07
feat: persist terminal mode (#245)
* style(toggleterm): format with stylua

* fix(terminal): correctly annotate lazy requires

* feat(terminals): save the current terminals mode into state

* test: add failing state tests

* refactor(config): add option to control persisting mode

so users can turn it off or on

* docs(README): add persist mode

* chore(ci): auto generate docs

* refactor(terminal): simplify matching for modes

Only "nt" and "t" are actually relevant not all the variants of all the
other different modes

* test: add but skip failing test case

seems to be broken due to delays starting a shell

Co-authored-by: akinsho <akinsho@users.noreply.github.com>
2022-06-17 09:50:52 +01:00
nesqi
aaeed9e021
fix(next_id): Terminal IDs should be unique. (#240)
Simplified next_id() by removing the 'ids' table and calling
get_all() instead. The previous implementation did not always
produce unique IDs.

Remodelled the next_id test case by creating actuall terminals.

Before this patch, if you created 3 terminals with ID 1, 2, 3
and then closed the first terminal with id 1 using "exit",
the next_id was calculated to 2, resulting in a duplicate ID.
2022-06-12 06:57:16 +01:00
etjupm
50f88d3162
feat: update send visual selection (#239)
Update the ToggleTermSendVisualSelection command by changing the visual selection logic.
For a selection type of visual selection, the lines now come from the new local function get_visual_selection which gets the lines based on the visual mode used to make the selection.
2022-06-07 07:38:54 +01:00
Svetlozar Iliev
5bf839a558
feat(terms): delete internal term resources on shutdown. (#234)
Co-authored-by: Svetlozar Iliev <svetlozar.iliev@sirma.com>
2022-06-04 09:39:30 +01:00
Akin Sowemimo
93c2f2ca96 chore(utils): remove unused autocommand workaround 2022-05-22 18:54:27 +02:00
Akin
c525442a03
fix(colors): apply terminal highlights more consistently (#231)
* If a user specifies highlights, these should actually be applied consistently
* If they specify shading terminal, this overrides any normal highlights and applies the shaded colours
* if the colorscheme changes, pick up on it and re-apply highlights
2022-05-22 17:35:35 +01:00
Akin Sowemimo
9563a9fac8 refactor(terminal): use nvim_create_autocmd
for buffer local mappings
2022-05-22 16:48:12 +02:00
Akin Sowemimo
4ebddc6bc8 refactor(config): config module should expose all fields
of the current config rather than using a get method
this is more magical but easier to use
2022-05-22 16:18:03 +02:00
Akin Sowemimo
4f5a57bc8e refactor: require more lazily
this converts usages of require to use the lazy helper module inspired
by TJ's lazy.nvim, this delays actual requires till their usage which
makes the plugin less expensive to load but easier to develop since I no
longer have to do all requires inline but can import all needed modules
upfront at the top of each file
2022-05-22 16:17:23 +02:00
Akin Sowemimo
c2df9ff6a6 build(test.yaml): bump nvim version to 0.7.0 2022-05-22 16:08:59 +02:00
Akin Sowemimo
775c88036b chore(sumneko): specify optional parameters 2022-05-22 16:00:35 +02:00
akinsho
4aa4f40c35 chore(ci): auto generate docs 2022-05-17 06:15:21 +00:00
Akin Sowemimo
e783fd4466 refactor: convert commands to use 0.7 api 2022-05-17 08:14:36 +02:00
Akin Sowemimo
ba79cb4fe9 refactor!: use 0.7 autocommand api
BREAKING CHANGE: this increases the minimum versions required to
nvim 0.7
2022-05-17 08:14:36 +02:00
dr666m1
ea21c3ef51
fix: shade_color (#224)
Correctly zero pad RGB colours when shading
2022-05-11 09:18:22 +01:00
akinsho
7941edf073 chore(ci): auto generate docs 2022-05-06 07:08:02 +00:00
Jędrzej Boczar
bcc3d138b3
Option to pass env/clear_env to jobstart (#221)
* feat: add option to pass env/clear_env to jobstart()

* test: add tests for :spawn() and for term.env
2022-05-06 09:07:32 +02:00
akinsho
c3fac3d31d chore(ci): auto generate docs 2022-05-04 19:46:21 +00:00
Akin Sowemimo
a7f4051257 docs(README): document tag usage 2022-05-04 21:45:36 +02:00
akinsho
d2b7ddbf27 chore(ci): auto generate docs 2022-05-04 19:42:57 +00:00
Akin Sowemimo
443afa9e02 docs(README): tidy up 2022-05-04 21:42:20 +02:00
Akin Sowemimo
58d10342a5 chore(toggleterm): use vim.notify
instead of echomsg
2022-05-03 23:33:12 +02:00
Akin Sowemimo
ddf142e8a1 chore: specify optional parameters in emmy docs 2022-05-03 23:33:12 +02:00
akinsho
acffc0adfa chore(ci): auto generate docs 2022-05-03 18:53:20 +00:00
Jędrzej Boczar
b82ef23b2b
feat: add api to spawn tasks without opening a window (#218) 2022-05-03 19:52:50 +01:00
Akin
6c7f5dbdd6
docs: add funding.yaml 2022-04-25 19:10:07 +01:00
Akin Sowemimo
dca8f4d951 chore(config): have floats link to the normal hl
by default, fixes #208
2022-04-18 10:43:56 +01:00
akinsho
ed812c8eb4 chore(ci): auto generate docs 2022-04-14 16:16:44 +00:00
Gregory
1be7795c04
docs(README): rename 'window' direction option to 'tab' (#207) 2022-04-14 17:16:08 +01:00
Akin
1a608cc9ab
fix(ui): handle highlighting unknown terminals (#204) 2022-04-11 23:00:01 +01:00
YuanYuYuan
93a7c59230
fix(send_lines): place cursor back in the original window (#201) 2022-04-11 08:39:35 +01:00
Akin
e62008fe58
fix(config): config.highlights should respect prefs (#197) 2022-04-07 10:22:52 +01:00
Akin Sowemimo
3c7903924d fix(config): use correct colours for terminal hls
by default most highlight groups should be set to the darkened normal bg
2022-04-06 20:35:12 +01:00
Akin
b525f7e331
test: fix broken CI tests (#194) 2022-04-06 15:08:41 +01:00