Commit graph

368 commits

Author SHA1 Message Date
JINNOUCHI Yasushi
ec289423a1
fix: return early to avoid errors with no asyncfns (#616)
When no async functions are supplied, it will be stuck because rx()
waits forever. This diff fixes it.
2024-08-19 07:20:57 +02:00
Simon Hauser
a3e3bc82a3
fix(compat): in fast vim loop issue (#589)
fixes regression introduced in ce8556d
2024-05-20 20:33:47 +02:00
Tristan Knight
b5c8de02a4
ci: bump nvim ci versions and add 0.10 release (#587) 2024-05-19 12:51:36 +02:00
Tristan Knight
ce8556de8f
fix: 0.11 compat (#586) 2024-05-19 12:51:15 +02:00
AoMe · 青目
08e301982b
fix(popup): set modifiable failed when vim.api.nvim_buf_set_lines (#575) 2024-04-26 00:26:00 +02:00
Kristijan Husak
5129a3693c
feat(luassert): Add luassert annotation types (#552) 2024-04-22 14:21:08 +02:00
Teppei Taguchi
f592187e58
docs: fix typo (#554) 2024-04-22 14:14:06 +02:00
Marcin
bc9ec884ab
feat: option to use custom curl bin (#556) 2024-04-22 14:13:45 +02:00
betaboon
b05ee67983
fix(path): make find_upwards stop at root (#562) 2024-04-22 14:12:56 +02:00
AoMe · 青目
a398c5f9a5
fix(log): print -0 when number = 0, closes #569 (#572) 2024-04-22 14:12:25 +02:00
AoMe · 青目
0d0079c75f
fix(popup): create popup after set nomodifiable, closes #570 (#571)
* fix(popup): nomodifiable popup, closes #570

* feat: added test for `set nomodifiable`
2024-04-22 14:12:05 +02:00
drop-stones
8aad439684
fix(path): add a windows style path pattern to is_absolute() (#551) 2024-03-25 13:22:05 +01:00
weirdgiraffe
f7adfc4b3f
fix(curl): stream option handling in curl (#557)
There are two major problems when supplying `opts.stream`

1. curl methods do produce junk in temp folder. Curl command dumps
   headers to some file in tmp folder and cleans it up only in the
   `parse.response()` method. This method is not called if
   `opts.stream` is set
2. there is no way to access response code, because it is also writen to
   the headers dump file in temp folder.

This commit address both of those problems by setting `job.on_exit`
callback even if `opts.stream` is specified.
2024-03-06 11:23:45 +01:00
Tomas Slusny
6778384edf
feat(curl): add support for curl insecure and curl proxy (#559) 2024-03-06 11:21:18 +01:00
James Trew
4f71c0c4a1
fix(path): Windows parent root directory (#504) 2024-01-29 22:23:27 +01:00
Alejandro Suero
6632469363
feat(curl): change request option compressed if using Windows (#527) 2024-01-21 13:59:16 +01:00
Marcel de Vries
55d9fe89e3
fix: re-add .log extension to plugin bases logfile name (#546) 2023-11-30 12:17:20 +01:00
JINNOUCHI Yasushi
366b083748
fix: return the results from async.api.* (#544) 2023-11-25 09:18:56 +01:00
moonveil
19ff925632
feat(curl): add 'http_version' option, fix #394 (#543) 2023-11-25 09:18:34 +01:00
JINNOUCHI Yasushi
c47e1a21d2
feat: add async.util.race to run funcs in race (#538) 2023-11-24 15:22:52 +01:00
Marcel Mikołajko
6bbfa69595
feat: Add jai and hlsl file types (#541) 2023-11-24 15:16:31 +01:00
JINNOUCHI Yasushi
284740ccf3
fix: avoid error when it exceeds timeout (#539)
When I ran this code, I got an error below.

```lua
async.util.block_on(function()
  async.util.sleep(4000)
end)
print "done"
```

```bash
E5113: Error while calling lua chunk: /tmp/hoge.lua:4: bad argument #1 to 'block_on' (table expected, got nil)
stack traceback:
        [C]: in function 'block_on'
        /tmp/hoge.lua:4: in main chunk
```

This means the func is terminated by `vim.wait` and the variable `ret`
is still `nil`. So `unpack(ret)` raises an error.

This PR fixes this bug by setting a default value for `ret`.
2023-11-24 15:16:21 +01:00
Frederik Buchlák
50012918b2
docs: remove gitsigns from async block (#531)
plenary is no longer used in gitsigns
2023-10-11 15:43:47 +02:00
Matteo Golin
9ce85b0f7d
fix(test_harness): floating results window (#520)
* Resolved invalid escape sequence error caused by Windows backslash in filepaths.

* PlenaryBustedDirectory now works with no path issues, and the PlenaryTestFile keymap now properly tests only the file.

* Refactored test running and floating window logic out into _test_paths and made test_directory only responsible for passing a list of test files to the new _test_paths function. Finally added a test_file function which calls _test_paths with only one path: the current file.

* Update fix to be unique to Windows machines. For some reason, Path:absolute behaves differently on Linux.
2023-09-12 15:47:13 +02:00
Simon Hauser
4cd4c29e39
fix: ffi calls for macos (#522) 2023-09-12 10:57:25 +02:00
Ricardo Casía
f1939e8ec9
fix(async): prevent nil value error (#523) 2023-09-12 10:56:58 +02:00
Asror
62292256fe
fix(test_harness): timeout error on Windows using powershell when testing dirs (#525)
* fix: timeout error on Windows using powershell when testing dirs

* fix formatting with using stylua
2023-09-12 10:55:02 +02:00
Thibeau Vercruyssen
82a797cbbe
docs: Improve lua-language-server annotations of Job class (#526) 2023-09-12 10:54:48 +02:00
JINNOUCHI Yasushi
0232372b90
fix(log): use robust way to create path (#521) 2023-09-10 12:35:11 +02:00
xactlyblue
62d1e2e569
feat(popup): add 'finalize_callback' option (#513) 2023-09-10 11:33:09 +02:00
Juho Eerola
23deb47177
fix: couple bugs with multiple results and varargs (...) (#515)
* fix(vararg.rotate): edge cases and nil arguments

- zero argument rotation returned one value (a global by the name A0)
- the generic fallback dropped the first argument and trailing nils

* fix: functional.partial & fun.bind

These only worked for binding exactly one parameter.

* Include generated rotate.lua file in linting
2023-09-10 11:28:59 +02:00
Matteo Golin
e739a2e539
fix(test_harness): resolved invalid escape sequence error caused by Windows backslash in filepaths. (#519) 2023-09-10 11:15:56 +02:00
Jongwook Choi
a56bf0071b
fix: support LuaJIT versions with neovim 0.9.2 and 0.10.x (#518)
neovim 0.10 has bumped up LuaJIT version, which makes plenary.profile
fail to work due to the "LuaJIT core/library version mismatch" error.
We can have an allowed range for `jit.version_num` as 20100~20199.

FYI, `require('jit')` reports:

  nvim-0.9.1:
    version = "LuaJIT 2.1.0-beta3",
    version_num = 20100

  nvim-0.10.x (HEAD version as of today, an example):
    version = "LuaJIT 2.1.1693268511",
    version_num = 20199
2023-09-07 17:01:14 +02:00
NICK
0dbe561ae0
fix: ensure that handlers are emptied after notify_all (#501) 2023-08-24 17:29:34 +02:00
Simon Hauser
f97a076555
fix(tests): run sequential to reduce failure (#516) 2023-08-24 17:27:48 +02:00
Matthew Brock
0b937aeb4f
docs: add links in module list to relevant sections (#514)
Co-authored-by: Matt Brock <mbrock@repay.com>
2023-08-24 17:09:52 +02:00
Nick Caniglia
dd5a2f6d67
fix(busted) - before_each and after_each execute in unpredictable order - fixes #491 (#508)
* fix #491 where before_each and after_each execute in unpredictable
order. Just changed the tables that store these functions to be indexed by the
parent `describe`s index in the current_describe table which uses
sequential integers.  Then in the run_each function where these
functions get executed, iterating thru them usning ipairs instead of
pairs.
2023-08-24 17:07:25 +02:00
wenjin
267282a9ce
fix: is_uri not accept all valid schemas (#500) 2023-07-17 12:19:10 +02:00
James Trew
1a6a7c9296
fix(job): escape square brackets [] from being expanded (#511)
Looks like vim is doing regex string parsing when using `expand` so when
using have paths that represent some invalid regex, an error is thrown.

In this particular case, the invalid regex came in the form of reverse
range: `:expand("[z-a]")` will error out
2023-07-13 22:35:20 +02:00
Cameron
bda256fab0
docs: fix spelling in comment (#507) 2023-07-06 12:19:36 +02:00
Will Hopkins
a5ca1507b9
feat: add Iterator:fold and Iterator:enumerate (#505) 2023-07-06 12:19:13 +02:00
Sunlight
102c02903c
feat(curl): use XDG_RUNTIME_DIR if available (#503) 2023-06-30 07:45:58 +02:00
Simon Hauser
36aaceb6e9
fix(path): dont use Path:expand internally (#499) 2023-06-10 20:34:04 +02:00
Ed Jeffreys
499e0743cf
fix(filtetype.lua): don't fail on integer filepath (#498)
This looks to be very similar to #465

I have been encountering the below error when the filepath is an integer.

```
Error executing vim.schedule lua callback: ...scope.nvim/lua/telescope/previewers/buffer_previewer.lua:428: Error executing lua: ...al/share/nvim/lazy/plenary.nvim/lua/plenary/filetype.lua:123: attempt to index local 'filepath' (a number value)
stack traceback:
	...al/share/nvim/lazy/plenary.nvim/lua/plenary/filetype.lua:123: in function 'detect_from_name'
	...al/share/nvim/lazy/plenary.nvim/lua/plenary/filetype.lua:167: in function 'detect'
	...scope.nvim/lua/telescope/previewers/buffer_previewer.lua:434: in function <...scope.nvim/lua/telescope/previewers/buffer_previewer.lua:428>
	[C]: in function 'nvim_buf_call'
	...scope.nvim/lua/telescope/previewers/buffer_previewer.lua:428: in function <...scope.nvim/lua/telescope/previewers/buffer_previewer.lua:422>
stack traceback:
	[C]: in function 'nvim_buf_call'
	...scope.nvim/lua/telescope/previewers/buffer_previewer.lua:428: in function <...scope.nvim/lua/telescope/previewers/buffer_previewer.lua:422>
```
2023-05-31 06:54:40 +02:00
Simon Hauser
52544825d6
fix: rotate_spec not correctly asserting
fixes #494
2023-05-24 17:28:04 +02:00
Simon Hauser
6aeb98daac
fix(test_harness): followup to #459, dont use --clean but rather --noplugin (#497)
otherwise its a breaking change, see
https://github.com/nvim-treesitter/nvim-treesitter/pull/4856
2023-05-24 13:51:57 +02:00
Jonathan
58a496a55e
docs: Add file limit command for macOS (#430)
The README only showed the command to raise the limit on the number of
open files. I added the command for macOS, as it can be difficult to
find.
2023-05-24 10:06:49 +02:00
Marcus Caisey
ee6fda7de0
fix(job): remove delay from shutdown (#406) 2023-05-24 09:59:41 +02:00
Gianmaria Bajo
c4d6e556f2
feat(test_harness): use minimal configuration by default (#459) 2023-05-24 09:48:23 +02:00
Simon Hauser
7cc390e642
chore: add nvim 0.9 ci (#496) 2023-05-24 09:38:29 +02:00