| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
|
|
|
| |
Currently, highlight.on_yank() does buffer-local highlighting, this PR
makes it window scoped.
Also fix the problem that when yanking in a buffer, moving to another
buffer, and yanking before the original buffer highlight disappears, the
original buffer highlight won't disappear on timeout.
|
|
|
|
|
|
|
|
|
| |
Problem:
`vim.ui.open` uses `wslview`, which is slow and require a package from external PPA:
https://wslutiliti.es/wslu/install.html#ubuntu
Solution:
Use `explorer.exe` instead. WSL supports it by default:
https://learn.microsoft.com/en-us/windows/wsl/filesystems#view-your-current-directory-in-windows-file-explorer
|
|
|
|
| |
Problem: Error when parsing v:lua in a ternary expression.
Solution: Set rettv->v_type for v:lua even if not evaluating.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
and for return value of nlua_exec/nlua_call_ref, as this uses
the same family of functions.
NB: the handling of luaref:s is a bit of a mess.
add api_luarefs_free_XX functions as a stop-gap as refactoring
luarefs is a can of worms for another PR:s.
as a minor feature/bug-fix, nvim_buf_call and nvim_win_call now preserves
arbitrary return values.
|
|
|
|
|
|
|
|
|
|
| |
Problem: Loading `vim.fs` via the `vim.loader` Lua package loader will
result in a stack overflow due to a cyclic dependency. This may happen
when the `vim.fs` module isn't byte-compiled, i.e. when `--luamod-dev`
is used (#27413).
Solution: `vim.loader` depends on `vim.fs`. Therefore `vim.fs` should
be loaded in advance.
|
|
|
| |
Minor "best practices" nudge.
|
| |
|
|
|
|
|
|
|
|
| |
Problem:
Processing non-fast events during SystemObj:wait() may cause two pieces
of code to interfere with each other, and is different from jobwait().
Solution:
Don't process non-fast events during SystemObj:wait().
|
|
|
|
|
|
| |
Problem: Erroring when both {range} and {code} are supplied to
:lua is inconvenient and may break mappings.
Solution: Don't error, ignore {range} and execute {code} when both
are supplied.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Separate the lint job (`make lintdoc`) to validate runtime/doc,
it is no longer as a part of functionaltest (help_spec).
Build (cmake) and CI:
- `make lintdoc`: validate vimdoc files and test-generate HTML docs.
CI will run this as a part of the "docs" workflow.
- `scripts/lintdoc.lua` is added as an entry point (executable script)
for validating vimdoc files.
scripts/gen_help_html.lua:
- Move the tests for validating docs and generating HTMLs from
`help_spec.lua` to `gen_help_html`. Added:
- `gen_help_html.run_validate()`.
- `gen_help_html.test_gen()`.
- Do not hard-code `help_dir` to `build/runtime/doc`, but resolve from
`$VIMRUNTIME`. Therefore, the `make lintdoc` job will check doc files
on `./runtime/doc`, not on `./build/runtime/doc`.
- Add type annotations for gen_help_html.
|
|
|
|
| |
This fixes the flakiness caused by typing a completion menu key when the
completion menu hasn't showed up.
|
|
|
|
|
| |
- `:lua (no file)` is misleading because `:lua` never takes a file arg,
unlike `:source`.
- Update various related docs.
|
|
|
|
|
|
| |
:{range}lua executes the specified lines in the current buffer as
Lua code, regardless of its extension or 'filetype'.
Close #27103
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Problem: One cannot easily write something like, for example:
`version_current >= {0, 10, 0}`; writing like
`not vim.version.lt(version_current, {0, 10, 0})` is verbose.
- Solution: add {`le`,`ge`} in addition to {`lt`,`gt`}.
- Also improve typing on the operator methods: allow `string` as well.
- Update the example in `vim.version.range()` docs: `ge` in place of
`gt` better matches the semantics of `range:has`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
On devel(nightly) versions, deprecation warnings for hard-deprecated
features are not being displayed. E.g.,
- to be removed in: 0.11
- hard-deprecation since 0.10
- soft-deprecation since 0.9
then 0.10-nightly (0.10.0-dev) versions as well as 0.10.0 (stable)
should display the deprecation warning message.
Solution:
Improve the code and logic on `vim.deprecate()`, and improve
test cases with mocked `vim.version()`.
|
| |
|
|
|
|
|
|
| |
Co-authored-by: Jongwook Choi <wookayin@gmail.com>
Co-authored-by: Oliver Marriott <hello@omarriott.com>
Co-authored-by: Benoit de Chezelles <bew@users.noreply.github.com>
Co-authored-by: Jongwook Choi <wookayin@gmail.com>
|
| |
|
|
|
|
| |
Followup to 07a7c0ec
|
| |
|
|\
| |
| | |
fix(buffer_updates): correct buffer updates when splitting empty line
|
| |
| |
| |
| | |
fixes #11591
|
| | |
|
| |
| |
| |
| |
| | |
- remove helpers.cur*meths
- remove helpers.nvim
|
| | |
|
| | |
|
| | |
|
| | |
|
|/ |
|
|
|
|
|
| |
Co-authored-by: Gregory Anders <greg@gpanders.com>
Co-authored-by: Jongwook Choi <wookayin@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
feat(diagnostic): add `vim.diagnostic.count()`
Problem: Getting diagnostic count based on the output of
`vim.diagnostic.get()` might become costly as number of diagnostic
entries grows. This is because it returns a copy of diagnostic cache
entries (so as to not allow users to change them in place).
Getting information about diagnostic count is frequently used in
statusline, so it is important to be as fast as reasonbly possible.
Solution: Add `vim.diagnostic.count()` which computes severity
counts without making copies.
|
|
|
|
| |
The exec_lua wrapper is no longer necessary.
|
|
|
|
|
|
|
|
|
|
|
|
| |
As specified by MAINTAIN.md, features should be soft deprecated at first
(meaning no warnings) to give people a chance to adjust. The problem
with this approach is that deprecating a feature becomes harder than
usual as during the soft deprecation period you need to remember not to
issue a warning, and during the hard deprecation period you need to
remember to start issuing a warning.
This behavior is only enforced if the `plugin` parameter is `nil` as
plugins may not want this specific behavior.
|
|
|
|
|
|
|
|
| |
refactor(lsp): move glob parsing to vim.glob
Moving the logic for using vim.lpeg to create a match pattern from a
glob into `vim.glob`. There are several places in the LSP spec that
use globs, and it's very useful to have glob matching as a
generally-available utility.
|
|
|
|
|
| |
Diagnostic signs should now be configured with vim.diagnostic.config(),
but "legacy" sign definitions should go through the standard deprecation
process to minimize the impact from breaking changes.
|
| |
|
| |
|
|
|
|
| |
after sign implementation refactor by using extmark, we can use
`nvim_buf_set_extmark` to set diagnostic sign instead use `sign_define`
|
| |
|
| |
|
|
|
|
| |
Problem: Vimscript function exists() can't check v:lua functions.
Solution: Add support for v:lua functions to exists().
|
|\ |
|
| |
| |
| |
| |
| |
| | |
Problem: Many places in the code use `findoption()` to access an option using its name, even if the option index is available. This is very slow because it requires looping through the options array over and over.
Solution: Use option index instead of name wherever possible. Also introduce an `OptIndex` enum which contains the index for every option as enum constants, this eliminates the need to pass static option names as strings.
|
|/
|
|
|
|
| |
This is the command invoked repeatedly to make the changes:
:%s/^\(.*\)|\%(\*\(\d\+\)\)\?$\n\1|\%(\*\(\d\+\)\)\?$/\=submatch(1)..'|*'..(max([str2nr(submatch(2)),1])+max([str2nr(submatch(3)),1]))/g
|
| |
|