Comments (6)
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.
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.
@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.
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.
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)
- On start error, the REPL window closes immediately so one can't read the error
- config broken? HOT 2
- basic config leads to python unexpected indent HOT 7
- Allow 'cwd' option on repl_definition? Potential PR HOT 1
- repl on the bottom makes status window disappear HOT 1
- code is sent to the ipython console but not run HOT 16
- iron.core not found with LazyVim HOT 1
- Why am I not able to resize the REPL window/split? HOT 2
- How to detach from the IronFocus window HOT 4
- Connect to python kernel and virtual environment
- Abandoned? HOT 2
- Highlights randomly appears and disappears
- How to resize REPL window HOT 1
- Fix broken tests
- Error Using Visual Send with IPython -- Identical issue with closed issue 225 HOT 1
- close option gets ignored when sending one line HOT 3
- [bug]: send file and send until cursor in python linux doesn't works as expected HOT 11
- Error from fts/common.lua attempt to index python HOT 2
- [feature request] images in REPL
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from iron.nvim.