aboutsummaryrefslogtreecommitdiff
path: root/test/functional/lua
Commit message (Collapse)AuthorAge
* test: check vim.wait() error message in fast context (#26242)zeertzjq2023-11-27
|
* fix(lua): disallow vim.wait() in fast contextsLewis Russell2023-11-27
| | | | | | | `vim.wait()` cannot be called in a fast callback since the main loop cannot be run in that context as it is not reentrant Fixes #26122
* fix(vim.region): handle multibyte inclusive selection properly (#26129)zeertzjq2023-11-21
|
* test: skip failing watch file tests on freebsd (#26110)Mathias Fußenegger2023-11-19
| | | | | | | | | Quick fix as follow up to https://github.com/neovim/neovim/pull/26108 kqueue only reports events on a watched folder itself, not for files created or deleted within. So the approach the PR took doesn't work on FreeBSD. We'll either need to bring back polling for it, combine watching with manual file tracking, or disable LSP file watching on FreeBSD
* perf(lsp): replace file polling on linux with per dir watcher (#26108)Mathias Fußenegger2023-11-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Should help with https://github.com/neovim/neovim/issues/23291 On linux `new_fs_event` doesn't support recursive watching, but we can still use it to watch folders. The downside of this approach is that we may end up sending some false `Deleted` events. For example, if you save a file named `foo` there will be a intermediate `foo~` due to the save mechanism of neovim. The events we get from vim.uv in that case are: - rename: foo~ - rename: foo~ - rename: foo - rename: foo - change: foo - change: foo The mechanism in this PR uses a debounce to reduce this to: - deleted: foo~ - changed: foo `foo~` will be the false positive. I suspect that for the LSP case this is good enough. If not, we may need to follow up on this and keep a table in memory that tracks available files.
* refactor(snippet): rename test utilitiesMaria José Solano2023-11-17
|
* feat(lsp): support for choice snippet nodesMaria José Solano2023-11-17
|
* feat: add vim.text module (#26069)Gregory Anders2023-11-16
|
* test: skip failing test on freebsddundargoc2023-11-10
| | | | | The watch_file test started failing on bsd after 3ca967387c49c754561c3b11a574797504d40f38.
* fix(f_wait): flush UI before blocking (#25962)zeertzjq2023-11-10
|
* fix(lua): correct return value for on_key with no arguments (#25911)altermo2023-11-07
|
* feat(stdlib): add vim.base64 module (#25843)Gregory Anders2023-10-31
| | | Add base64 encode() and decode() functions to a vim.base64 module.
* fix(lsp): do not cancel snippet when selecting placeholder (#25835)Maria José Solano2023-10-30
|
* fix(diagnostic): virtual_text prefix function should have index and total ↵Jongwook Choi2023-10-27
| | | | | | | | | | | | | (#25801) The prefix option of the diagnostic virtual text can be a function, but previously it was only a function of diagnostic. This function should also have additional parameters index and total, more consistently and similarily as in the prefix function for `vim.diagnostic.open_float()`. These additional parameters will be useful when there are too many number of diagnostics in a single line.
* fix(lsp): cancel session when leaving snippet region (#25762)Maria José Solano2023-10-26
|
* fix(lsp): do not add extra indentationMaria José Solano2023-10-23
|
* fix(lsp): track snippet deletionMaria José Solano2023-10-23
|
* feat(lsp): add snippet API (#25301)Maria José Solano2023-10-21
|
* ci(cirrus): don't run lua/help_spec (#25498)zeertzjq2023-10-21
|
* vim-patch:8.1.0822: peeking and flushing output slows down execution (#25629)zeertzjq2023-10-14
| | | | | | | Problem: Peeking and flushing output slows down execution. Solution: Do not update the mode message when global_busy is set. Do not flush when only peeking for a character. (Ken Takata) https://github.com/vim/vim/commit/cb574f415486adff645ce384979bfecf27f5be8c
* fix(lua): vim.region on linewise selection #25467Aayush Ojha2023-10-06
| | | fixes #18155
* fix(api, lua): handle setting v: variables properly (#25325)zeertzjq2023-09-24
|
* fix(lua): show error message when failing to set variable (#25321)zeertzjq2023-09-23
|
* fix(lua): not using global value in vim.opt_global (#25196)Phelipe Teles2023-09-17
|
* fix: invoke changed_bytes when rewriting <Tab> char #25125Ilia Choly2023-09-15
| | | | | | | When tabstop and shiftwidth are not equal, tabs are inserted as individual spaces and then rewritten as tab characters in a second pass. That second pass did not call changed_bytes which resulted in events being omitted. Fixes #25092
* test(windows): unskip working tests (#25153)dundargoc2023-09-15
| | | Also simplify home detection with os_homedir()
* fix(diagnostic): always return copies of diagnostic items (#25010)Evgeni Chasnovski2023-09-06
|
* refactor(vim.system): factor out on_exit handlingLewis Russell2023-09-05
|
* fix(vim.system): make timeout work properlyLewis Russell2023-09-05
| | | | Mimic the behaviour of timeout(1) from coreutils.
* fix(vim.system): let on_exit handle cleanup after killLewis Russell2023-09-05
| | | | Fixes #25000
* feat(treesitter): improve query error messageAmaan Qureshi2023-08-31
|
* vim-patch:9.0.1710: scrolloff options work slightly differentzeertzjq2023-08-23
| | | | | | | | | | | | | | | | | | | | | | | Problem: sidescrolloff and scrolloff options work slightly different than other global-local options Solution: Make it behave consistent for all global-local options It was noticed, that sidescrolloff and scrolloff options behave differently in comparison to other global-local window options like 'listchars' So make those two behave like other global-local options. Also add some extra documentation for a few special local-window options. Add a few tests to make sure all global-local window options behave similar closes: vim/vim#12956 closes: vim/vim#12643 https://github.com/vim/vim/commit/4a8eb6e7a9df10f79bf95301ced012f0d6a13088 Co-authored-by: Christian Brabandt <cb@256bit.org>
* feat(diagnostic): filter diagnostics by specific severities (#24736)Michael Strobel2023-08-16
| | | Allow users to filter diagnostics by specifying severities
* fix(iter): make pipeline termination conditions consistent (#24614)Gregory Anders2023-08-09
| | | | | | | | If an iterator pipeline stage returns nil as its first return value, the other return values are ignored and it is treated as if that stage returned only nil (the semantics of returning nil are different between different stages). This is consistent with how for loops work in Lua more generally, where the for loop breaks when the first return value from the function iterator is nil (see :h for-in for details).
* fix(api): revert unintended change of optional bool paramsbfredl2023-08-09
| | | | | | | | | | Currently (as of nvim 0.9), the behavior of boolean params in vim.api lua wrappers is inconsistent for optional parameters (part of an `opts` dict) compared to positional parameters. This was inadvertently changed in #24524 . While cleaning up this inconsistency is something we might want eventually, it needs to be discussed separately and the impact of existing code considered.
* test(api): update tests to new error messagesbfredl2023-08-07
|
* fix(loader): cache path ambiguity #24491Tyler Miller2023-08-01
| | | | | | | | | | | Problem: cache paths are derived by replacing each reserved/filesystem- path-sensitive char with a `%` char in the original path. With this method, two different files at two different paths (each containing `%` chars) can erroneously resolve to the very same cache path in certain edge-cases. Solution: derive cache paths by url-encoding the original (path) instead using `vim.uri_encode()` with `"rfc2396"`. Increment `Loader.VERSION` to denote this change.
* fix(api/options): validate buf and winLewis Russell2023-07-22
| | | Fixes #24398
* test(vim.ui.open): mock failure on WindowsJustin M. Keyes2023-07-21
| | | | | | | | | Problem: On Windows, `rundll32` exits zero (success) even when given a non-existent file. Solution: Mock vim.system() on Windows to force a "failure" case.
* docs: also change "vimL" and "viml" to "Vimscript" (#24414)zeertzjq2023-07-21
|
* fix(fs.lua): normalize slash truncation (#23753)Mike2023-07-18
| | | Preserve last slash in windows' root drive directories
* test(fs): vim.loop was renamed to vim.uv (#24376)kylo2522023-07-17
| | | test(fs): vim.loop has been replaced with vim.uv
* test(fs): get tmpdir robustly #23021kylo2522023-07-16
| | | | | | | | Problem: helpers.tmpname() may create a local file, depending on circumstances. Solution: Only use helpers.tmpname() for its parent directory (the "temp root"). Use fs_mkdtemp() to actually get a unique name.
* fix(runtime): respect 'fileignorecase' when sourcing (#24344)zeertzjq2023-07-14
|
* fix(runtime): respect 'rtp' order for all runtime files (#24335)zeertzjq2023-07-14
|
* perf(rtp): reduce rtp scans (#24191)Lewis Russell2023-07-13
| | | | | | | | | | | * perf(rtp): reduce rtp scans Problem: Scanning the filesystem is expensive and particularly affects startuptime. Solution: Reduce the amount of redundant directory scans by relying less on glob patterns and handle vim and lua sourcing lower down.
* fix(completion): don't add backslashes to runtime pattern (#24296)zeertzjq2023-07-08
| | | | | Problem: Bashslashes added as regexp in runtime completion may be treated as path separator with some 'isfname' value. Solution: Make curly braces work for runtime completion and use it.
* feat(lua): allow vim.wo to be double indexed (#20288)Lewis Russell2023-07-07
| | | | | | | | * feat(lua): allow vim.wo to be double indexed Problem: `vim.wo` does not implement `setlocal` Solution: Allow `vim.wo` to be double indexed Co-authored-by: Christian Clason <c.clason@uni-graz.at>
* fix(vim.system): close check handle (#24270)zeertzjq2023-07-06
| | | Fix hang after running vim.system() with sanitizers.
* fix(vim.ui.open): return (don't show) error messageJustin M. Keyes2023-07-05
| | | | | | | | | | Problem: Showing an error via vim.notify() makes it awkward for callers such as lsp/handlers.lua to avoid showing redundant errors. Solution: Return the message instead of showing it. Let the caller decide whether and when to show the message.