Code Monkey home page Code Monkey logo

Comments (6)

jiz4oh avatar jiz4oh commented on August 27, 2024 1

@jam1015 thanks for your quick response, it's ok now @jpalardy

from vim-slime.

jpalardy avatar jpalardy commented on August 27, 2024

cc @jam1015

from vim-slime.

jam1015 avatar jam1015 commented on August 27, 2024

I'm not able to reproduce this using a minimal config:

local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({
    "git",
    "clone",
    "--filter=blob:none",
    "https://github.com/folke/lazy.nvim.git",
    "--branch=stable", -- latest stable release
    lazypath,
  })
end
vim.opt.rtp:prepend(lazypath)

require("lazy").setup(
  {
    {
      "jpalardy/vim-slime",
      init = function()
        vim.g.slime_target = "neovim"
        vim.g.slime_no_mappings = true
        vim.g.slime_input_pid = false
        vim.g.slime_suggest_default = true
        vim.g.slime_menu_config = false
      end
    },
  }

)

I run nvim --clean -u ./minimal.lua test.coffee and then :SlimeSendCurrentLine with no terminal open and just get the Terminal not found. warning message (I get it twice, this is a bug that will take some refactoring to fix, but that isn't relevant here). The text is successfully sent when I open a terminal.

Also tested on an example python file which also has an _EscapeText_python function and had no problems.

Maybe try adding your personal config piece by piece to the minimal config to see what causes the errors.

from vim-slime.

jiz4oh avatar jiz4oh commented on August 27, 2024

Hi @jam1015, I think it's not able to reproduce due to the _EscapeText_{&filetype} is loaded by a ftplugin, and thefiletype is not set if you run nvim --clean -u ./minimal.lua test.coffee, so the reproduce steps with the minimal config is

  1. nvim --clean -u ./minimal.lua test.coffee
  2. :set ft=coffee
  3. :SlimeSendCurrentLine

and the reason is if the _EscapeText_{&filetype} return an array with more than one elememts, e.g. _EscapeText_coffee, the s:SlimeDispatch function will be executed multiple times. seems like the b:slime_config is removed by first time and the second and following executation will raise error

from vim-slime.

jam1015 avatar jam1015 commented on August 27, 2024

addressed by #428

from vim-slime.

jpalardy avatar jpalardy commented on August 27, 2024

@jiz4oh let us know if that works for you

from vim-slime.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.