Error when using vim-vinegar plugin #11

Closed
opened 2023-05-15 13:55:20 +00:00 by cdimitroulas · 2 comments
cdimitroulas commented 2023-05-15 13:55:20 +00:00

Info

  • Operating System:
  • nvim --version: 0.9.0
  • Node package manager:
  • yarn --version: 1.22.19

Configuration

require('import-cost').setup {}
Plug 'barrett-ruth/import-cost.nvim', { 'do': 'sh install.sh yarn' }

Description

I get the following error when pressing - to open the directory containing the current file using the vim-vinegar plugin:

Error detected while processing function <SNR>17_opendir[12]..BufEnter Autocommands for "*":
Error executing lua callback: .../share/nvim/plugged/import-cost.nvim/lua/import-cost.lua:4: Invalid buffer id: 36
stack traceback:
        [C]: in function 'nvim_buf_get_option'
        .../share/nvim/plugged/import-cost.nvim/lua/import-cost.lua:4: in function 'is_ic_buf'
        .../share/nvim/plugged/import-cost.nvim/lua/import-cost.lua:12: in function <.../share/nvim/plugged/import-cost.nvim/lua/import-cost.lua:11>

Not sure if there is a configuration option I can set to avoid this, or if it is another problem with my setup.

<!-- Be sure you can affirm the following: --> <!-- 1. import-cost.nvim is up to date --> <!-- 2. I have searched the issue tracker and not found a similar issue --> ### Info - Operating System: - `nvim --version`: 0.9.0 - Node package manager: - `yarn --version`: 1.22.19 ### Configuration <!-- Replace the below with your import-cost.nvim setup --> ```lua require('import-cost').setup {} ``` <!-- Replace the below with your *neovim* package manager setup --> ```lua Plug 'barrett-ruth/import-cost.nvim', { 'do': 'sh install.sh yarn' } ``` </details> ### Description I get the following error when pressing `-` to open the directory containing the current file using the `vim-vinegar` plugin: ``` Error detected while processing function <SNR>17_opendir[12]..BufEnter Autocommands for "*": Error executing lua callback: .../share/nvim/plugged/import-cost.nvim/lua/import-cost.lua:4: Invalid buffer id: 36 stack traceback: [C]: in function 'nvim_buf_get_option' .../share/nvim/plugged/import-cost.nvim/lua/import-cost.lua:4: in function 'is_ic_buf' .../share/nvim/plugged/import-cost.nvim/lua/import-cost.lua:12: in function <.../share/nvim/plugged/import-cost.nvim/lua/import-cost.lua:11> ``` Not sure if there is a configuration option I can set to avoid this, or if it is another problem with my setup. <!-- A clear and concise description of the bug -->
barrettruth commented 2023-05-15 20:15:09 +00:00

Just attempted to fix this here

I was also unable to replicate the issue with vim vinegar, so if that fix does not work, please outline the issue more thoroughly. Otherwise go ahead and close the issue.

Just attempted to fix this [here](https://github.com/barrett-ruth/import-cost.nvim/commit/d2c93deee35fa4042fde28719ddcbad664544fcf) I was also unable to replicate the issue with vim vinegar, so if that fix does not work, please outline the issue more thoroughly. Otherwise go ahead and close the issue.
cdimitroulas commented 2023-05-16 09:59:19 +00:00

Looks like that did the trick, I'm not seeing the error anymore. Thank you for the quick turnaround ❤️

Looks like that did the trick, I'm not seeing the error anymore. Thank you for the quick turnaround ❤️
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
barrettruth/import-cost.nvim#11
No description provided.