Git Product home page Git Product logo

Comments (5)

meicale avatar meicale commented on June 1, 2024

I just test the setting and it works fine. Maybe can need to figure out what is your problem. The textobj and the ]x command just works fine. I guess you may miss the lua config of iron.nvim, you need use that config instead of the default config. Or you can change the mapping of ]x.

from iron.nvim.

weiyshay avatar weiyshay commented on June 1, 2024

Hi Meicale,
Thanks for your feedback. I tried changing the mapping and it didn't help and this is my iron config, anything am I missing?

local iron = require("iron.core")

vim.g.mapleader = ";"

iron.setup {
  config = {
    -- Whether a repl should be discarded or not
    scratch_repl = true,
    -- Your repl definitions come here
    repl_definition = {
      sh = {
        -- Can be a table or a function that
        -- returns a table (see below)
        command = {"bash"}
      }
    },
    -- How the repl window will be displayed
    -- See below for more information
    repl_open_cmd = require("iron.view").split.vertical(100)
  },
  -- Iron doesn't set keymaps by default anymore.
  -- You can set them here or manually add keymaps to the functions in iron.core
  keymaps = {
    send_motion = "<leader>j",
    visual_send = "<leader>v",
    send_file = "<leader>f",
    send_line = "<leader>l",
    send_mark = "<leader>k",
    mark_motion = "<leader>mc",
    mark_visual = "<leader>mc",
    remove_mark = "<leader>md",
    cr = "<leader>s<cr>",
    -- interrupt = "<leader>s<leader>",
    -- exit = "<leader>q",
    -- clear = "<leader>c",
  },
  -- If the highlight is on, you can change how it looks
  -- For the available options, check nvim_set_hl
  highlight = {
    italic = true
  },
  ignore_blank_lines = true, -- ignore blank lines when sending visual select lines
}

-- iron also has a list of commands, see :h iron-commands for all available commands
vim.keymap.set('n', '<leader>T', '<cmd>IronRepl<cr>')
vim.keymap.set('n', '<leader>R', '<cmd>IronRestart<cr>')
vim.keymap.set('n', '<leader>F', '<cmd>IronFocus<cr>')
vim.keymap.set('n', '<leader>H', '<cmd>IronHide<cr>')
vim.g.mapleader = "\\"

from iron.nvim.

meicale avatar meicale commented on June 1, 2024

Hi Meicale, Thanks for your feedback. I tried changing the mapping and it didn't help and this is my iron config, anything am I missing?

local iron = require("iron.core")

vim.g.mapleader = ";"

iron.setup {
  config = {
    -- Whether a repl should be discarded or not
    scratch_repl = true,
    -- Your repl definitions come here
    repl_definition = {
      sh = {
        -- Can be a table or a function that
        -- returns a table (see below)
    command = {"bash"}
  }
},

I think you use this to run python code, so that you need using command = {"ipython"} and install ipython in your machine. I recommend that you just double check the blog related to your config.

from iron.nvim.

milanglacier avatar milanglacier commented on June 1, 2024

I implemented my own function to send code chunk to REPL and it works fine.

https://github.com/milanglacier/nvim/blob/b9214c06907cd573bf9d85267116907fb9dbc1e2/lua/conf/langs.lua#L20

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.