Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuring vim-slime in LazyVim/Wezterm #451

Open
csoto-3 opened this issue Dec 19, 2024 · 2 comments
Open

Configuring vim-slime in LazyVim/Wezterm #451

csoto-3 opened this issue Dec 19, 2024 · 2 comments

Comments

@csoto-3
Copy link

csoto-3 commented Dec 19, 2024

Trying to setup vim-slime to send code snippets from LazyVim to a multiplexed REPL. (using Wezterm on Win10).
I setup a mux session with LazyVim in a panel and a REPL (Julia) in another.

I installed vim-slime with the following config that I pulled from this discussion from last February.

return { 
  "jpalardy/vim-slime",
  keys = {
    { "<leader>rc", "<cmd>SlimeConfig<cr>", desc = "Slime Config" },
    { "<leader>rr", "<cmd>SlimeSendCell<BAR>/^##<CR>", desc = "Slime Send Cell"},
  },
  config = function()
    vim.g.slime_target = "wezterm"
    vim.g.slime_cell_delimiter = "##"
    vim.g.slime_bracketed_paste = 1
  end,
}

I'm able to successfully pipe text from the LazyVim terminal to the REPL using wezterm cli send-text command, so the mux session seems to be set up properly for Neovim and the REPL to communicate.

screenshot1

I then call SlimeConfig and set the slime target to pane-id 1, which matches the id shown in the wezterm cli list query for the REPL executable.

screenshot2

Setup looks good so far, but when I use Slime Region Send <C-c> <C-c> on highlighted text, nothing happens. Same for other vim-slime commands. If I try to use the custom Send Cell keymap, LazyVim throws up an error saying it's not an editor command (probably due to broken command syntax).

Any insight into how to properly setup this config is greatly appreciated!

@jpalardy
Copy link
Owner

Hi @csoto-3

I can't speak to LazyVim or your setup in general — but it seems like config-wise, something is amiss.

I would recommend opening up the wezterm code (which isn't too long or complicated) and generously adding echom to be able to debug step by step.

Let me know what you find and we'll get you rolling 😄

@jpalardy
Copy link
Owner

on 2nd though, I wonder if this is window-related — do you have access to a different OS to see if it's behaving the same?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants