Git Product home page Git Product logo

Comments (6)

marbris avatar marbris commented on July 18, 2024 1

Actually, my bad. The issue is not closed and i've found what the issue is. iron.fts.common.bracketed_paste_python doesn't work well for ipython. so in commit (#367) when the default format for ipython was changed from bracketed_paste to bracketed_paste_python, something stopped working.

my workaround is to use the following configuration:

python = {
    format = require("iron.fts.common").bracketed_paste,
    command = { "ipython", "--no-autoindent" },
},

i dont know lua well enough to figure out why bracketed_paste_python doesn't work for ipython on linux. So im reopening the issue in case someone want's to figure this out.

from iron.nvim.

rwijtvliet avatar rwijtvliet commented on July 18, 2024

I don't mean to hijack this thread, but it's probably related:

I also have an issue with visual_send in python. In my case, it's sent in one piece, but the indentation gets messed up. My source code:

for i in range(2):
    print (i)
    print (i+1)

After selecting and visual_send:

In [286]: for i in range(2):
     ...:         print (i)
     ...:             print (i+1)
  Cell In[286], line 3
    print (i+1)
    ^
IndentationError: unexpected indent

If I manually yank and paste these lines into the REPL, there's no issue.

For me, the config is

    repl_definition = {
            python = { command = 'ipython --nosep' },
    }

(Don't hesitate to ask me to open a new issue if it's bothering here)

from iron.nvim.

marbris avatar marbris commented on July 18, 2024

@rwijtvliet . I use the command 'ipython --no-autoindent'. its the ipython default in iron. so my config looks like this

repl_definition = {
        python = require("iron.fts.python").ipython,
}

i don't know the difference between --nosep and --no-autoindent but maybe thats your issue.

from iron.nvim.

rwijtvliet avatar rwijtvliet commented on July 18, 2024

Ah, thank you! That actually cleared up my issue 🙏 FYI, the --nosep option removes the blank lines between subsequent inputs, to save on space.

So the issue you're describing, that visual_send() sends each line separately, I cannot confirm. What I do see is that sending a chunk of code, such as send_until_cursor, does not stop at an error, which is making debugging equally hard.

I'll sit this one out and not pollute the thread again.

from iron.nvim.

marbris avatar marbris commented on July 18, 2024

The issue was solved when i reverted back before those updates i listed. Today when i brought it all up to date again, along with other packages, the issue was gone. iron hasn't been updated since then, so the issue must have come from somewhere else. I'm closing the issue.

from iron.nvim.

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.