| Commit message (Collapse) | Author | Age |
| ... | |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Changing `src` of an existing plugin cleanly requires manual
`vim.pack.del()` prior to executing `vim.pack.add()` with a new `src`.
Solution: Autodetect `src` change for an existing plugin (by comparing
against lockfile data). If different - properly delete immediately and
treat this as new plugin installation.
Alternative solution might be to update `origin` remote in the
installed plugin after calling `vim.pack.update()`. Although, doable,
this 1) requires more code; and 2) works only for Git plugins (which
might be not the only type of plugins in the future). Automatic
"delete and clean install" feels more robust.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Plain `vim.pack.add()` calls (with default `opts.load`) does
not fully work if called inside 'plugin/' runtime directory. In
particular, 'plugin/' files of newly added plugins are not sourced.
This is because `opts.load` is `false` during the whole startup, which
means `:packadd!` is used (modify 'runtimepath' but not force source
newly added 'plugin/' files).
This use case is common due to users organizing their config as
separate files in '~/.config/nvim/plugin/'.
Solution: Use newly added `v:vim_did_init` to decide default `opts.load`
value instead of `v:vim_did_enter`.
|
| |
|
|
|
|
|
|
|
|
|
| |
Problem: Current requirement is Git>=2.36 as `--also-filter-submodules`
flag for `git clone` was introduced there. This is problematic since
default Git version on Ubuntu 22.04 is 2.34.
Solution: Relax minimal Git version to be (at least) 2.0 by selectively
applying necessary flags based on the current Git version.
As 2.0.0 was released in 2014-05-28 (almost the same age as Neovim
project itself), it is reasonable to drop any mention and checks on
minimal version altogether.
|
| | |
|
| |\
| |
| | |
`vim.pack` consistency improvements: full hashes, state->revision, buffer URI name
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Confirmation buffer is named with `nvim-pack://` as scheme
prefix and uses buffer id (needed for in-process LSP) as one an entry
in the "hierarchical part".
Solution: Use `nvim://pack-confirm#<buf>` format with a more ubiquitous
`nvim://` prefix and buffer id at the end as the optional fragment.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Problem: In some areas plugin's revision is named "state". This might be
confusing for the users.
Solution: Consistently use "revision" to indicate "plugin's state on
disk".
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Using abbreviated version of commit hashes might be unreliable
in the long term (although highly unlikely).
Solution: Use full hashes in lockfile and revision description (in
confirmation buffer and log). Keep abbreviated hashes when displaying
update changes (for brevity).
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Problem: reuse_win will always jump to the first window containing the
target buffer rather even if the buffer is displayed in the current
window/tab
Solution: check to see if the buffer is already displayed in the
current window or any window of the current buffer
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: filetype: .mom files recognized as nroff files
Solution: Detect *.mom files as groff filetype instead
(Callum Andrew)
Reference:
- mom macros are written specifically for groff:
https://www.schaffter.ca/mom/
closes: vim/vim#18718
https://github.com/vim/vim/commit/23e12c0b7ec02cc374f111fd9dfaa84734dbb7f5
Co-authored-by: Callum Andrew <dev@candrew.net>
|
| | |
| |
| |
| |
| |
| |
| |
| | |
`:trust` command calculated SHA-256 on file content reading it as a
text. While it doesn't matter on Unices, on Windows hash was calculated
incorectly. SHA-256 for buffer content was calculated fine though.
After this fix hashes in `%LOCALAPPDATA%/nvim-data/trust` are the same
as in output of `sha256sum -t`.
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: filetype: not all Ruby files are recognized
Solution: Detect *.rbi and Brewfile as ruby filetype
(botantony).
- `rbi` is a file extension used by Sorbet, typechecker for Ruby:
https://sorbet.org/docs/rbi
- `Brewfile` is a bundler file for Homebrew package manager:
https://docs.brew.sh/Brew-Bundle-and-Brewfile
closes: vim/vim#18697
https://github.com/vim/vim/commit/efc3be77bbf707edad9cbbda7aef471de65411fd
Co-authored-by: botantony <antonsm21@gmail.com>
|
| | | |
|
| | |
| |
| |
| |
| | |
* feat(lsp): deprecate `vim.lsp.stop_client`
* fix(tests): fix nil variable in diagnostic_spec.lua
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
- Exposing the raw config as table is a pattern not seen anywhere else
in the Nvim codebase.
- Old spellfile.vim docs still available, no new documentation
Solution:
- Exposing a `config()` function that both acts as "getter" and "setter"
is a much more common idiom (e.g. vim.lsp, vim.diagnostic).
- Add new documentation and link old docs to |spellfile.lua| instead of
|spellfile.vim|.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* feat(lua): `Range:is_empty()` to check vim.range emptiness
* fix(lsp): don't overlay insertion-style inline completions
**Problem:** Some servers commonly respond with an empty inline
completion range which acts as a position where text should be inserted.
However, the inline completion module assumes that all responses with a
range are deletions + insertions that thus require an `overlay` display
style. This causes an incorrect preview, because the virtual text should
have the `inline` display style (to reflect that this is purely an
insertion).
**Solution:** Only use `overlay` for non-empty replacement ranges.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
**Problem:** When quickly entering and leaving insert mode, sometimes
inline completion requests are returned and handled in normal mode. This
causes an extmark to be set, which will not get cleared until the next
time entering & leaving insert mode.
**Solution:** Return early in the inline completion handler if we have
left insert mode.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
closes: vim/vim#18698
https://github.com/vim/vim/commit/c28b73d34990e574ebd7542fe0adb789fc0bd674
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
|
| |/
|
|
|
|
|
|
|
|
|
|
| |
Problem: Resize events during startup may clear an active external
cmdline, which is then not redrawn.
UI2 VimResized autocommand does not work.
UI2 message appearance may be altered by inherited window
options. The message separator uses the wrong fillchar.
Solution: Unset cmdline_was_last_redrawn when clearing the screen, such
that cmdline_show is re-emitted.
Ensure set_pos function is called without arguments.
Ensure such options are unset. Use 'fillchars'->msgsep.
|
| |
|
|
|
|
| |
The iterator is meant to be fully reset in this code path, but only the
`next_row` state was being reset. This would only cause highlight
artifacts for very brief periods of time, though.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
vimrc (#36429)
Problem: A plugin does not know when startup scripts were already
triggered. This is useful to determine if a function is
called inside vimrc or after (like when sourcing 'plugin/'
files).
Solution: Add the v:vim_did_init variable (Evgeni Chasnovski)
closes: vim/vim#18668
https://github.com/vim/vim/commit/294bce21ee837aab209a1008d0efc3e305cf188f
Nvim has two more steps between sourcing startup scripts and loading
plugins. Set this variable after these two steps.
Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com>
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: filetype: not all AppleScript files are recognized
Solution: Detect *.applescript files as applescript filetype
(Samuel Huang)
Reference:
https://en.wikipedia.org/wiki/AppleScript
closes: vim/vim#18672
https://github.com/vim/vim/commit/69dd5906fd9723774715ec37ad3b44652938f655
Co-authored-by: Samuel Huang <hi@sgh.ng>
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Problem:
Previously, the fallback logic to ".conf" was located outside of
`vim.filetype.match()` and directly within the AutoCmd definition. As a
result, `vim.filetype.match()` would return nil instead of ".conf" for
fallback cases (#30100).
Solution:
Added a boolean return value to `vim.filetype.match()` that indicates
whether the match was the result of fallback. If true, the filetype will
be set using `setf FALLBACK <ft>` instead of `setf <ft>`.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: filetype: Android aconfig files are not recognized
Solution: Detect *.aconfig files as pbtxt filetype (Bruno Belanyi)
Reference:
https://source.android.com/docs/setup/build/feature-flagging/declare-flag
closes: vim/vim#18656
https://github.com/vim/vim/commit/7adeb09bb24a9d29179926dd391c3d67cea26057
Co-authored-by: Bruno Belanyi <bruno@belanyi.fr>
|
| |
|
|
|
|
|
|
|
|
| |
This reverts commit 3fc00c05fb464d3e806df53bdc1743faa337ddca.
related: vim/vim#18639
https://github.com/vim/vim/commit/6be154f5e63d47b9e0e5b709577a8c71aa4e4456
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
Problem: Setting a filetype before configuring default options for ui2
buffers (pager, cmd, ...) prevents users from setting their own options.
Solution: Call nvim_set_option_value after defaults are set.
Closes #36314
Co-authored-by: Luuk van Baal <luukvbaal@gmail.com>
|
| |
|
|
|
|
|
|
|
|
| |
Problem:
Error extracting content-length causes all future coroutine resumes to
fail.
Solution:
Replace coroutine.wrap with coroutine.create in create_read_loop
so that we can check its status and catch any errors, allowing us to
stop the lsp client and avoid repeatedly resuming the dead coroutine.
|
| |
|
|
|
|
|
|
|
|
|
| |
Problem: filetype: Soy files are not recognized
Solution: Detect *.soy files as soy filetype,
include a soy filetype plugin (Riley Bruins)
closes: vim/vim#18640
https://github.com/vim/vim/commit/9fff99c3c28083dbe4dcb243309bf2b28c4cb82b
Co-authored-by: Riley Bruins <ribru17@hotmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: pre-inserted text not exposed in complete_info()
Solution: Add the pre-inserted text to the complete_info() Vim script
function (Girish Palya)
closes: vim/vim#18571
Feat: expose preinserted text in complete_info()
https://github.com/vim/vim/commit/ef5bf58d8cb2c6332d4cbc89c1d352466772ecc3
Co-authored-by: Girish Palya <girishji@gmail.com>
|
| |
|
|
|
|
|
|
|
|
| |
and offset
closes: vim/vim#18639
https://github.com/vim/vim/commit/3fc00c05fb464d3e806df53bdc1743faa337ddca
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
| |\ |
|
| | |
| |
| |
| |
| | |
- prefer `stdpath(data)/site/spell` instead of looking for random dirs in 'runtimepath'.
- drop unused functions `choose_directory`, `setup`, etc.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem:
Spell file downloads relied on Vimscript and netrw (:Nread). If netrw is
disabled, downloads fail.
Solution:
Port the logic to Lua as `nvim.spellfile` and wire it via a Lua plugin that
handles `SpellFileMissing`. Use `vim.net.request()` with a timeout for HTTP,
prompt via `vim.fn.input` and report via `vim.notify`.
Closes #7189
|
| |/
|
|
|
|
|
|
|
|
| |
Problem:
Some LSP method handlers were making requests without specifying a
bufnr, defaulting to 0 (current). This works in most cases but
fails when client attaches to background buffers, causing
assertions in handlers to fail.
Solution:
Ensure bufnr is passed to Client.request for buffer-local methods.
|
| |
|
|
| |
This also fixes inconsistent scrolling behavior on terminal output when
cursor is in the middle of the buffer and the scrollback is full.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
**Problem:**
`vim.filetype.match({ filename = 'a.sh' })` returns `nil` because
an invalid buffer ID is passed to `vim.api.nvim_buf_get_lines()`.
For filetypes like `csh`, `txt`, or any other extensions that call
`_getlines()` or `_getline()` to detect their filetypes, the same
issue occurs.
When only the `filename` argument is passed, an error is raised
inside a `pcall()` that wraps the filetype detection function,
causing it to return no value without showing any error message.
**Solution:**
Validate the `bufnr` value in `_getlines()` and `_getline()`.
|
| |
|
|
| |
2 spaces is more visually distinct at very little cost.
|
| |
|
|
|
|
| |
- mention "lua_ls", not "luals". https://github.com/neovim/neovim/discussions/36182
Co-authored-by: Maria Solano <majosolano99@gmail.com>
|
| |\ |
|
| | |
| |
| |
| |
| |
| | |
Problem: No examples of how to use `PackChanged[Pre]` for plugin hooks.
Solution: Add examples of creating plugin hooks.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: `PackChanged[Pre]` events with `kind=update` are triggered both
during plugin's initial installation and after already installed
plugin was updated.
It was a deliberate decision to allow writing only a single update
hook to act as a dedicated "build" entry point (like execute `make` or
`cargo build —release`). This mimics how other plugin managers have a
single "build" command.
This was a result of 'mini.deps' experience with the different
approach: "update" hooks are not run during install. This proved to be
confusing as it requires to write two hooks. But also the reason might
be that 'mini.deps' names it "checkout" hook instead of "update".
However, the `vim.pack` event approach makes it lower cost to handle
separate "update" and "install" events. Something like
`if ev.data.kind == 'install' or ev.data.kind == 'update' then`
instead of two autocommands.
Plus this makes clearer separation of events.
Solution: do not trigger `PackChanged[Pre] kind=update` event during
install.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Inside `PackChanged[Pre]` callbacks it might be useful to tell
if the affected plugin is active or not. It is already possible via
extra `vim.pack.get({ 'plug-name' })[1].active`, but it is not quite
user-friendly for something that might be needed frequently in real
world use cases.
Solution: Supply extra `active` event data field.
|