Git Product home page Git Product logo

Comments (7)

dahlbaek avatar dahlbaek commented on May 17, 2024

I made some naive changes to the file iron.nvim/rplugin/python3/iron/repls/python.py, and now it seems to be working. I don't know if my changes break some other functionality.

https://github.com/dahlbaek/iron.nvim

from iron.nvim.

hkupty avatar hkupty commented on May 17, 2024

Sory for taking long to answer..

The fix you implemented might indeed actually break for some/most clients. This is actually strange since I use python frequently (i.e. for testing neovim plugins) and iron behaves correctly.

Could you print the neovim interface (if any), python3 neovim package version? I'll try to reproduce that on my side..

from iron.nvim.

dahlbaek avatar dahlbaek commented on May 17, 2024

Thank you for taking an interest in my issue!

I noticed that if I use ipython (the default) or ipython3 with IronPromptCommand, then the indentation also ends up funny, while the indentation is fine if I use python or python3. When using ipython, I get the comment If you want to paste code into IPython, try the %paste and %cpaste magic functions.

I am not sure I know what you mean by neovim interface, I am using the stable neovim for Ubuntu.

Here is the output of :CheckHealth, in case that is useful (I removed the parts that I do not think are useful):

========================================================================
## Configuration
  - SUCCESS: no issues found

## Performance
  - SUCCESS: Build type: RelWithDebInfo

## Remote Plugins
  - SUCCESS: Up to date

## terminal
  - INFO: key_backspace (kbs) terminfo entry: key_backspace=\177
  - INFO: key_dc (kdch1) terminfo entry: key_dc=\E[3~

health#provider#check
========================================================================
## Clipboard (optional)
  - SUCCESS: Clipboard tool found: xsel

## Python 2 provider (optional)
  - INFO: Using: g:python_host_prog = "usr/bin/python"
  - INFO: Executable: /usr/bin/python
  - INFO: Python2 version: 2.7.12
  - INFO: python-neovim version: 0.1.13
  - SUCCESS: Latest python-neovim is installed: 0.1.13

## Python 3 provider (optional)
  - INFO: Using: g:python3_host_prog = "/usr/bin/python3"
  - INFO: Executable: /usr/bin/python3
  - INFO: Python3 version: 3.5.2
  - INFO: python3-neovim version: 0.1.13
  - SUCCESS: Latest python3-neovim is installed: 0.1.13

Maybe the output of nvim --version is also useful?

Build type: RelWithDebInfo
Compilation: /usr/bin/x86_64-linux-gnu-gcc -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -DDISABLE_LOG -Wdate-time -D_FORTIFY_SOURCE=2 -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2 -g -DDISABLE_LOG -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -I/build/neovim-LpFVCC/neovim-0.2.0/build/config -I/build/neovim-LpFVCC/neovim-0.2.0/src -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/build/neovim-LpFVCC/neovim-0.2.0/build/src/nvim/auto -I/build/neovim-LpFVCC/neovim-0.2.0/build/include
Compiled by pkg-vim-maintainers@lists.alioth.debian.org

Optional features included (+) or not (-): +acl   +iconv    +jemalloc +tui      
For differences from Vim, see :help vim-differences

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

from iron.nvim.

hkupty avatar hkupty commented on May 17, 2024

It seems that, for some reason, your repl isn't correctly parsing the '\x1b[200~' and '\x1b[201~' escape characters. What terminal are you running (though I suspect it shouldn't interfere)? By interface I mean GUI, such as neovim-qt or gonvim, but you're using it straight from the terminal it seems..

from iron.nvim.

hkupty avatar hkupty commented on May 17, 2024

Nonetheless, I'll try to implement those block pastes with %cpaste and -- which seems to be more reliable, though the current setting works for me both on neovim-qt and using alacritty as terminal. Not sure about ptpython/ptipython. I'll leave those as they are now since they seem to be working pretty well..

from iron.nvim.

dahlbaek avatar dahlbaek commented on May 17, 2024

I actually just got ipython working, by upgrading from 2.4.1 to 6.2.0 (ahem, slightly embarrassing). And now iron.nvim automatically launches ipython/python3 instead of ipython/python2. Maybe there is something else I should make sure to update with pip to make python/python3 work without ipython?

I am using nvim from gnome-terminal on ubuntu 16.04. For the sake of it, I tried xterm just now, and it behaves exactly the same.

In any case, I am happy that just ipython is working for now! Let me know if I can help with anything.

from iron.nvim.

hkupty avatar hkupty commented on May 17, 2024

Glad to know that it's working now!
Not really sure how to handle the issue with the python executable.
I'm planning to revamp this REPL selection and hopefully this will be sorted out in the future.

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.