| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
|
|
| |
`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
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
The watch_file test started failing on bsd after
3ca967387c49c754561c3b11a574797504d40f38.
|
| |
|
| |
|
|
|
| |
Add base64 encode() and decode() functions to a vim.base64 module.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
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
|
|
|
| |
fixes #18155
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
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
|
|
|
| |
Also simplify home detection with os_homedir()
|
| |
|
| |
|
|
|
|
| |
Mimic the behaviour of timeout(1) from coreutils.
|
|
|
|
| |
Fixes #25000
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
| |
Allow users to filter diagnostics by specifying severities
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
| |
Fixes #24398
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
Preserve last slash in windows' root drive directories
|
|
|
| |
test(fs): vim.loop has been replaced with vim.uv
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
| |
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
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 hang after running vim.system() with sanitizers.
|
|
|
|
|
|
|
|
|
|
| |
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.
|