11 Commits

Author SHA1 Message Date
Olivia Kinnear fcd1d97265 feat(lua)!: vim.isnil, vim.nonnil, deprecate vim.F #39495 2026-05-06 08:15:00 -04:00
Olivia Kinnear 1799aaebda fix(lsp): util.lua attempt to concatenate userdata #39225
Problem:
Error when querying document symbols using python-lsp-server:

    lsp/util.lua:1955: attempt to concatenate field 'containerName' (a userdata value)

Solution:
Check for `vim.NIL`.
2026-04-28 19:17:44 -04:00
Evgeni Chasnovski e45cdbc7c4 fix(util): add and use forge link computation
Problem: There are many Git forges each with a different way of
  constructing permanent links to like commits and tags.

Solution: Add a private utility function that computes these special
  links on the best effort basis.
2026-04-25 20:29:19 +03:00
Justin M. Keyes 3ebfa2a3cb feat(vimfn): use Lua for more excmds/vimfns
Problem:
Too much boilerplate needed to use Lua to impl an excmd or f_xx
function.

Solution:
- Add `nlua_call_vimfn` which takes the args typval, executes
  Lua, and returns a typval.
- refactor(excmd): lua impl for :log, :lsp
2026-04-18 16:57:37 +02:00
Olivia Kinnear 8715877417 feat(ex): add :log command 2026-04-10 11:08:26 -05:00
nikolightsaber fd1e019e90 refactor(treesitter)!: get_parser return nil on error #37276 2026-03-13 15:57:36 -04:00
Ayaan c8693051a8 feat(terminal): surface exit code via virttext + nvim_get_chan_info #37987
Problem:
When a terminal process exits, "[Process Exited]" text is added
to the buffer contents.

Solution:
- Return `exitcode` field from `nvim_get_chan_info`.
- Show it in the default 'statusline'.
- Show exitcode as virtual text in the terminal buffer.
2026-03-10 08:02:50 -04:00
benarcher2691 55a0843b7c feat(editor): :source can run Lua codeblock / ts injection #36799
Problem:
Can't use `:source` to run a Lua codeblock (treesitter injection) in
a help (vimdoc) file.

Solution:
Use treesitter to parse the range and treat it as Lua if detected as
such.
2026-01-07 20:20:53 -05:00
Justin M. Keyes 20e77c5d88 build: ship "_core/*" as bytecode (built-into Nvim binary)
Problem:
We want to encourage implementing core features in Lua instead of C, but
it's clumsy because:
- Core Lua code (built into `nvim` so it is available even if VIMRUNTIME
  is missing/invalid) requires manually updating CMakeLists.txt, or
  stuffing it into `_editor.lua`.
- Core Lua modules are not organized similar to C modules, `_editor.lua`
  is getting too big.

Solution:
- Introduce `_core/` where core Lua code can live. All Lua modules added
  there will automatically be included as bytecode in the `nvim` binary.
- Move these core modules into `_core/*`:
  ```
  _defaults.lua
  _editor.lua
  _options.lua
  _system.lua
  shared.lua
  ```

TODO:
- Move `_extui/ => _core/ui2/`
2025-12-30 01:44:24 -05:00
Tomas Slusny c6113da5a9 fix(difftool): fully resolve symlinks when comparing paths #36147
Fixes issue on mac where it was constantly reloading buffers as paths
were not being normalized and resolved correctly (in relation to buffer
name).

Quickfix entry:
/var/folders/pt/2s7dzyw12v36tsslrghfgpkr0000gn/T/git-difftool.m95lj8/right/app.vue

Buffer name:
/private/var/folders/pt/2s7dzyw12v36tsslrghfgpkr0000gn/T/git-difftool.m95lj8/right/app.vue

/var was synlinked to /private/var and this was not being properly
handled.

Also added lazy redraw to avoid too many redraws when this happens in
future and added test for symlink handling.

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
2025-10-12 18:25:14 +00:00
Tomas Slusny fec02ae8e4 feat(plugins): nvim.difftool can compare directories #35448
Problem:
Built-in diff mode (nvim -d) does not support directory diffing
as required by git difftool -d. This makes it difficult to compare
entire directories, detect renames, and navigate changes efficiently.

Solution:
Add a DiffTool plugin and command that enables side-by-side diffing of
files and directories in Neovim. The plugin supports rename detection,
highlights changes in the quickfix list, and provides a user command for
easy invocation. This allows proper integration with git difftool -d for
directory comparison.

Example git config:

```ini
[diff]
    tool = nvim_difftool

[difftool "nvim_difftool"]
    cmd = nvim -c "packadd nvim.difftool" -c "DiffTool $LOCAL $REMOTE"
```

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
Co-authored-by: Phạm Bình An <111893501+brianhuster@users.noreply.github.com>
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2025-10-11 19:24:39 -07:00