silicon.nvim icon indicating copy to clipboard operation
silicon.nvim copied to clipboard

Calling from visual mode gives "E481: No range allowed"

Open benjstephenson opened this issue 2 years ago • 11 comments
trafficstars

On neovim nightly on Mac M1 I've configured Silicon using Lazy (in Fennel) with

(lazy :krivahtoo/silicon.nvim
      {:build "./install.sh build"
       :opts {:font "Fira Code=16"
              :theme "Monokai Extended"
              :window_controls false
              :tab_width 2
              :pad_vert 0
              :pad_horiz 0}})

There are no errors in the build process but if I

  • call :Silicon I get an image successfully created but only containing the first line of the file.
  • call :%Silicon I get E481
  • select some text in visual mode and call :'<,'>Silicon I also get E481

I can't see any other error messages so I'm not too sure how to debug the issue further.

benjstephenson avatar Aug 16 '23 04:08 benjstephenson

What is the output of :command Silicon?

krivahtoo avatar Aug 18 '23 11:08 krivahtoo

Not sure how to inspect the definition but here's the output of running :command Silicon

    Name              Args Address Complete    Definition
!   Silicon           0                        <Lua 156>

benjstephenson avatar Aug 18 '23 20:08 benjstephenson

This bug happens for me explicitly in neovim 0.10. Works fine in neovim 0.9

amv-dev avatar Oct 02 '23 14:10 amv-dev

Same here. Also in normal mode, it takes only the first line. Feels like the condition to check the mode is reversed

https://github.com/krivahtoo/silicon.nvim/assets/51330172/493c643a-764e-45b0-9bea-d339cab7d176

Demianeen avatar Feb 13 '24 12:02 Demianeen

I'm also encountering this error in Neovim nightly (541c2d3816cdef9aba7f55f74908fa07d0cfa3ec) on macOS.

jergason avatar Apr 08 '24 18:04 jergason

I'm also encountering this issue

Linux Rust 1.74.1 Neovim v0.10.0-dev-2859+g00e665188

cwebster2 avatar Apr 10 '24 21:04 cwebster2

silicon.nvim currently does not support neovim-nightly.

krivahtoo avatar Apr 11 '24 17:04 krivahtoo

Same issue on the new stable

Demianeen avatar May 24 '24 08:05 Demianeen

@Demianeen Thanks for reporting. I didn't realize there was a new version on Neovim.

I have released a new update the should work on v0.10

krivahtoo avatar May 25 '24 07:05 krivahtoo

It started to work after the update!

It still crushes neovim after it screenshots though. The same behaviour on stable and nightly versions. Might you know where the issue is?

https://github.com/krivahtoo/silicon.nvim/assets/51330172/79e1a62b-a84b-40e1-8bdf-d8a74369e1f4

Versions info:

Stable:

NVIM v0.10.0
Build type: Release
LuaJIT 2.1.1713484068
Run "nvim -V1 -v" for more info

Nightly:

NVIM v0.11.0-dev-49+g10601ac5f
Build type: RelWithDebInfo
LuaJIT 2.1.1713484068
Run "nvim -V1 -v" for more info

P.S. I already added plans to learn Rust in the next couple of months to help here 😄

Demianeen avatar May 26 '24 09:05 Demianeen

It still crushes neovim after it screenshots though. The same behaviour on stable and nightly versions. Might you know where the issue is?

I am unable to reproduce the issue in both v0.10 and nightly. I am on Linux so maybe the issue is with Mac builds.

P.S. I already added plans to learn Rust in the next couple of months to help here 😄

That would be awesome 😊

krivahtoo avatar May 27 '24 07:05 krivahtoo