mirror of
https://github.com/dwinkler1/nvimConfig.git
synced 2026-08-22 17:43:13 -04:00
fix: harden REPL/terminal code-sending paths
- lua/keymap/repl.lua
- Replace non-existent `:SlimeSendCurrentLine` with synchronous
`vim.fn["slime#send"](line .. "\n")` fallback.
- Support both modern `r.send` and older `r.run` R.nvim Lua APIs,
falling back to `<Plug>` mappings if neither module is available.
- lua/nix_smart_send.lua
- Refactor `send_repl()` to extract Tree-sitter node text and send it
directly via `slime#send`, eliminating the `feedkeys(..., "x", true)`
race between visual selection and cursor movement.
- Replace internal `slime#send_op` call in `slime_send_region()` with the
public `<Plug>SlimeRegionSend` mapping.
- Improve `move_to_next_non_empty_line()` to walk up the AST when a
node has no next sibling, so the cursor escapes nested blocks.
- plugin/03_terminal.lua
- Set `vim.g.slime_target = "neovim"` at the top of the module so the
target is guaranteed before any slime send.
- plugin/21_datascience.lua
- Remove duplicate `vim.g.slime_target = "neovim"` now that the
terminal module owns the setting.
This commit is contained in:
parent
137ec6d576
commit
6142f7d55e
4 changed files with 50 additions and 28 deletions
|
|
@ -1,5 +1,9 @@
|
|||
local Config = require('config')
|
||||
|
||||
-- vim-slime target: use Neovim's built-in terminal.
|
||||
-- Must be set before any slime send happens.
|
||||
vim.g.slime_target = "neovim"
|
||||
|
||||
local M = {}
|
||||
|
||||
-- Configuration
|
||||
|
|
|
|||
Loading…
Reference in a new issue