GithubHelp home page GithubHelp logo

Comments (7)

tamago324 avatar tamago324 commented on August 12, 2024

What version of neovim?

from lir.nvim.

TheCalculus avatar TheCalculus commented on August 12, 2024

What version of neovim?

NVIM v0.9.1
Build type: Release
LuaJIT 2.1.0-beta3

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/opt/homebrew/Cellar/neovim/0.9.1/share/nvim"

Run :checkhealth for more info

from lir.nvim.

tamago324 avatar tamago324 commented on August 12, 2024

This did not happen with nvim.exe on Windows 11 NVIM 0.9.1.
What is your OS and terminal?
I checked using init.vim as follows
Can you confirm this using a minimal init.vim like the one above?

set encoding=utf-8
scriptencoding utf-8

syntax enable
filetype plugin indent on

set nocompatible

call plug#begin('$HOME/AppData/Local/nvim/plugged')

Plug 'tamago324/lir.nvim'
Plug 'nvim-lua/plenary.nvim'

call plug#end()


lua << EOF

local actions = require'lir.actions'
local mark_actions = require 'lir.mark.actions'
local clipboard_actions = require'lir.clipboard.actions'

require'lir'.setup {
  show_hidden_files = false,
  ignore = {}, -- { ".DS_Store", "node_modules" } etc.
  devicons = {
    enable = false,
    highlight_dirname = false
  },
  mappings = {
    ['l']     = actions.edit,
    ['<C-s>'] = actions.split,
    ['<C-v>'] = actions.vsplit,
    ['<C-t>'] = actions.tabedit,

    ['h']     = actions.up,
    ['q']     = actions.quit,

    ['K']     = actions.mkdir,
    ['N']     = actions.newfile,
    ['R']     = actions.rename,
    ['@']     = actions.cd,
    ['Y']     = actions.yank_path,
    ['.']     = actions.toggle_show_hidden,
    ['D']     = actions.delete,

    ['J'] = function()
      mark_actions.toggle_mark()
      vim.cmd('normal! j')
    end,
    ['C'] = clipboard_actions.copy,
    ['X'] = clipboard_actions.cut,
    ['P'] = clipboard_actions.paste,
  },
  float = {
    winblend = 0,
    curdir_window = {
      enable = false,
      highlight_dirname = false
    },
  },
  hide_cursor = true
}

vim.api.nvim_create_autocmd({'FileType'}, {
  pattern = {"lir"},
  callback = function()
    -- use visual mode
    vim.api.nvim_buf_set_keymap(
      0,
      "x",
      "J",
      ':<C-u>lua require"lir.mark.actions".toggle_mark("v")<CR>',
      { noremap = true, silent = true }
    )
  
    -- echo cwd
    vim.api.nvim_echo({ { vim.fn.expand("%:p"), "Normal" } }, false, {})
  end
})

EOF

from lir.nvim.

TheCalculus avatar TheCalculus commented on August 12, 2024

os: macos ventura 13.4.1 (22F82)
(on an m1 chip)
terminal: iterm2

my init file is obviously slightly different:

installation (using packer), packer.lua

    use({
        'tamago324/lir.nvim',
        requires = { {'nvim-lua/plenary.nvim' } }
    })

setup of lir, lir_setup.lua

local actions = require'lir.actions'
local mark_actions = require 'lir.mark.actions'
local clipboard_actions = require'lir.clipboard.actions'

require'lir'.setup {
    show_hidden_files = false,
    ignore = {}, -- { ".DS_Store", "node_modules" } etc.
    devicons = {
        enable = false,
        highlight_dirname = false
    },
    mappings = {
        ['l']     = actions.edit,
        ['<C-s>'] = actions.split,
        ['<C-v>'] = actions.vsplit,
        ['<C-t>'] = actions.tabedit,

        ['h']     = actions.up,
        ['q']     = actions.quit,

        ['K']     = actions.mkdir,
        ['N']     = actions.newfile,
        ['R']     = actions.rename,
        ['@']     = actions.cd,
        ['Y']     = actions.yank_path,
        ['.']     = actions.toggle_show_hidden,
        ['D']     = actions.delete,

        ['J'] = function()
            mark_actions.toggle_mark()
            vim.cmd('normal! j')
        end,
        ['C'] = clipboard_actions.copy,
        ['X'] = clipboard_actions.cut,
        ['P'] = clipboard_actions.paste,
    },
    float = {
        winblend = 0,
        curdir_window = {
            enable = false,
            highlight_dirname = false
        },
    },
    hide_cursor = true
}

vim.api.nvim_create_autocmd({'FileType'}, {
    pattern = {"lir"},
    callback = function()
        -- use visual mode
        vim.api.nvim_buf_set_keymap(
        0,
        "x",
        "J",
        ':<C-u>lua require"lir.mark.actions".toggle_mark("v")<CR>',
        { noremap = true, silent = true }
        )

        -- echo cwd
        vim.api.nvim_echo({ { vim.fn.expand("%:p"), "Normal" } }, false, {})
    end
})

it is identical to the minimal config you provided

from lir.nvim.

tamago324 avatar tamago324 commented on August 12, 2024

I don't have a Mac so I can't check it at hand, but could you please follow these steps?

  1. Clone the plugin
mkdir ~/temp
cd ~/temp
git clone https://github.com/tamago324/lir.nvim
git clone https://github.com/nvim-lua/plenary.nvim
  1. Create a minimal vimrc

~/temp/.min.vimrc

syntax enable
filetype plugin indent on
set termguicolors

set rtp+=~/temp/plenary.nvim
set rtp+=~/temp/lir.nvim

lua << EOF

local actions = require'lir.actions'
local mark_actions = require 'lir.mark.actions'
local clipboard_actions = require'lir.clipboard.actions'

require'lir'.setup {
  show_hidden_files = false,
  ignore = {}, -- { ".DS_Store", "node_modules" } etc.
  devicons = {
    enable = false,
    highlight_dirname = false
  },
  mappings = {
    ['l']     = actions.edit,
    ['<C-s>'] = actions.split,
    ['<C-v>'] = actions.vsplit,
    ['<C-t>'] = actions.tabedit,

    ['h']     = actions.up,
    ['q']     = actions.quit,

    ['K']     = actions.mkdir,
    ['N']     = actions.newfile,
    ['R']     = actions.rename,
    ['@']     = actions.cd,
    ['Y']     = actions.yank_path,
    ['.']     = actions.toggle_show_hidden,
    ['D']     = actions.delete,

    ['J'] = function()
      mark_actions.toggle_mark()
      vim.cmd('normal! j')
    end,
    ['C'] = clipboard_actions.copy,
    ['X'] = clipboard_actions.cut,
    ['P'] = clipboard_actions.paste,
  },
  float = {
    winblend = 0,
    curdir_window = {
      enable = false,
      highlight_dirname = false
    },
  },
  hide_cursor = true
}

vim.api.nvim_create_autocmd({'FileType'}, {
  pattern = {"lir"},
  callback = function()
    -- use visual mode
    vim.api.nvim_buf_set_keymap(
      0,
      "x",
      "J",
      ':<C-u>lua require"lir.mark.actions".toggle_mark("v")<CR>',
      { noremap = true, silent = true }
    )
  
    -- echo cwd
    vim.api.nvim_echo({ { vim.fn.expand("%:p"), "Normal" } }, false, {})
  end
})


EOF
  1. Start nvim
nvim -u ~/temp/.min.vimrc
  1. Open lir.nvim
:e .

from lir.nvim.

miguejarias avatar miguejarias commented on August 12, 2024

DId this ever get resolved? im having the same issue....

from lir.nvim.

miguejarias avatar miguejarias commented on August 12, 2024

Looks like when i set the hide_cursor to false, the issue went away. Seems like it has to do with that setting

from lir.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.