Git Product home page Git Product logo

nvim-cursorline's Introduction

Profile image

Stats

Technologies

nvim-cursorline's People

Contributors

andersevenrud avatar axieax avatar shatur avatar wayjam avatar yamatsum avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

nvim-cursorline's Issues

Your plugin break anything about colorscheme, I removed it.

I just removed your plugin and then everything go back to normal.

Question link: https://vi.stackexchange.com/questions/34747/cursorline-became-black-when-cursor-is-moving?noredirect=1#comment62834_34747


If I change the colorscheme by <option>+12345

:colorscheme newsprint

Then when I will firstly got the expected result:

But then if I move my cursor by j/k, it shows some ugly bull-sh_t and the clean cursorline gone:

I can give you bounty if you know how to fix this. This has caused me so much time.


The version I'm using:

NVIM v0.6.0-dev+452-gb3e0d6708
Build type: Release
LuaJIT 2.1.0-beta3

Nil value error when loading plugin

Making a new issue since I am unable to load the plugin with default configuration.

Error Log:

Error detected while processing /home/user/.config/nvim/init.lua:                                                                                                    
E5113: Error while calling lua chunk: ...ack/packer/start/nvim-cursorline/lua/nvim-cursorline.lua:55: attempt to call upvalue 'au' (a nil value)                      
stack traceback:                                                                                                                                                      
        ...ack/packer/start/nvim-cursorline/lua/nvim-cursorline.lua:55: in function 'setup'                                                                           
        init.lua:6: in main chunk

Neovim spec:

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

Any help would be appreciated. Thanks

how to add these in init.vim

how can i add the setup line in init.vim file ? like i dont use paker etc i just use vim plug and add vim configuration code in init.vim , the code given looks like its supposed to be lua .. little noob here plz help

Colorschemes set with `:colorscheme` break highlighting on cursor move

This is related to #15 which is still a relevant issue. I really like this plugin, hopefully we can figure out what's going on!

The theme I use just moved over from loading the colorscheme via a Lua command to now just calling :colorscheme. This plugin does not seem to play nicely with that.

Launching nvim, or explicitly calling :colorscheme nightfox, I get the expected CursorLine highlight:

image

However, upon moving the cursor, the highlighting reverts to what seems like the default bg color?

image

If I call :hi CursorLine guibg=none it is definitely updating the color. But again, once I move the cursor, it resets back to the ugly background in the second screenshot above.

I'm happy to provide any additional information that would be helpful here. Thank you!

Breaks highlighting on campsiers/snap

Making this because I have determined with my setup that disabling this plugin fixes the issue. Not sure if there are some additional factors with my setup that are causing this. But I can at least confirm that commenting out this section of the config fixes the problem.

To confirm... without this plugin, I see:

image

With this plugin, I see:

image

Note that the "highlighted" background for the "current item" disappears with this plugin.

This is camspiers/snap, setup basically with the default find_files setup. I'm using the nightfox theme.

Happy to provide whatever other information is helpful!

Bug: Error detected while processing CursorMoved Autocommands for "*"

Situation

Right after installation I got an error that would reappear whenever I tried to move the cursor

Error Message

image

Environment

Lua:
==> lua-5.3.6
==> luarocks-3.6.0
NVIM v0.5.0-dev+1233-g82ac44d01
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Plugin manager:
Packer.nvim

Option to disable cursorline timeout completely

Hello, it seems that the cursorline keeps flashing everytime it is updated (if vim.g.cursorline_timeout is set to 0). This seems to be due to the timer updating the cursorline to the same colour.

Install failed

E5108: Error executing lua ...are/nvim/plugged/nvim-cursorline/lua/nvim-cursorline.lua:55: attempt to call upvalue 'au' (a nil value)
stack traceback:
        ...are/nvim/plugged/nvim-cursorline/lua/nvim-cursorline.lua:55: in function 'setup'
        [string ":lua"]:1: in main chunk

Error executing lua callback: Vim:E871: (NFA regexp) Can't have a multi follow a multi

image

Error detected while processing CursorMoved Autocommands for "*":
Error executing lua callback: Vim:E871: (NFA regexp) Can't have a multi follow a multi
stack traceback:
[C]: in function 'matchadd'
.../share/nvim/lazy/nvim-cursorline/lua/nvim-cursorline.lua:47: in function 'matchadd'
.../share/nvim/lazy/nvim-cursorline/lua/nvim-cursorline.lua:96: in function <.../share/nvim/lazy/nvim-cursorline/l
ua/nvim-cursorline.lua:95>

reproduce

  • ubuntu, apt installed neovim
  • i am in an SSH session with no clipboard provider
  • Run :Pexplore from netrw with no buffers open
NVIM v0.8.0-dev
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/cc -g -O2 -fdebug-prefix-map=/build/neovim-k8QUnL/neovim-0.8.0~ubuntu1+git202209130117-f6232e160-c99271b19=. -fstack-protector-strong -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -DNVIM_TS_HAS_SET_ALLOCATOR -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/build/neovim-k8QUnL/neovim-0.8.0~ubuntu1+git202209130117-f6232e160-c99271b19/build/cmake.config -I/build/neovim-k8QUnL/neovim-0.8.0~ubuntu1+git202209130117-f6232e160-c99271b19/src -I/build/neovim-k8QUnL/neovim-0.8.0~ubuntu1+git202209130117-f6232e160-c99271b19/.deps/usr/include -I/usr/include -I/build/neovim-k8QUnL/neovim-0.8.0~ubuntu1+git202209130117-f6232e160-c99271b19/build/src/nvim/auto -I/build/neovim-k8QUnL/neovim-0.8.0~ubuntu1+git202209130117-f6232e160-c99271b19/build/include
Compiled by buildd@lcy02-amd64-022

Features: +acl +iconv +tui
See ":help feature-compile"

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

Run :checkhealth for more info

Seems to clash with highlight on yank

Whenever I activate this plugin I lose highlight on yank. I'm not doing anything special, I just have this in my init.vim

  augroup highlight_yank
      autocmd!
      autocmd TextYankPost * silent! lua require'vim.highlight'.on_yank()
  augroup END

Exclude buffertype

I see that on file explorers like chadtree or symbols-outline that are sidebar I get the word underline.

It is possible to exclude filetype in this way the behaviour will be more clean.

Error executing lua callback: Vim:E976: using Blob as a String

Received an error while opening a tar file in neovim. The following error:

Error detected while processing CursorMoved Autocommands for "*":
Error executing lua callback: Vim:E976: using Blob as a String
stack traceback:
        [C]: in function 'matchstr'
        ...ack/packer/start/nvim-cursorline/lua/nvim-cursorline.lua:27: in function 'matchadd'
        ...ack/packer/start/nvim-cursorline/lua/nvim-cursorline.lua:96: in function <...ack/packer/start/nvim-cursorline/lua/nvim-cursorline.lua:95>

Can be reliably recreated with the following command

mkdir test && echo "Hello World" > test/test.txt && tar -cf test.tar test && nvim test.tar

Basically, whenever Neovim opens a tar, it seems to have some string in there that cursorline doesn't know how to handle and thus it blows up.

Neovim Info

NVIM v0.8.0-dev-1008-g12fe197cf
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/cc -DNVIM_TS_HAS_SET_MATCH_LIMIT -DNVIM_TS_HAS_SET_ALLOCATOR -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/home/miversen/git/neovim/build/cmake.config -I/home/miversen/git/neovim/src -I/home/miversen/git/neovim/.deps/usr/include -I/usr/include -I/home/miversen/git/neovim/build/src/nvim/auto -I/home/miversen/git/neovim/build/include
Compiled by miversen

Features: +acl +iconv +tui
See ":help feature-compile"

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

Run :checkhealth for more info

Bug: Error detected while processing CursorMoved Autocommands for "*": in function matchdelete()

Issue

If ":call clearmatches()" was performed, it would break the cursorword highlighting for that window

Error detected while processing CursorMoved Autocommands for "*":
Error executing lua callback: Vim:E803: ID not found: 1000
stack traceback:
        [C]: in function 'call'
        ...rline-debug/lazy/nvim-cursorline/lua/nvim-cursorline.lua:35: in function 'matchadd'
        ...rline-debug/lazy/nvim-cursorline/lua/nvim-cursorline.lua:96: in function <...rline-debug/lazy/nvim-cursorline/lua/nvim-cursorline.lua:95>

Discovery

I discovered this bug while installing and testing out ThePrimeagen's latest harpoon update. When opening the harpoon menu, the clearmatches() function was called. This would cause an error message to pop up anytime the cursor moved in the popup menu. Closing the popup menu would fix it in the open file however.

I believe this is a bug in this plugin as there is a check on the existence of cursorword_id on the w object, but that does not take into account whether that that id actually gets deleted.

How to reproduce (discovery)

  1. minimal init.lua: https://pastebin.com/DUp8H0Yx
  2. open a file with some text greater than 3 characters
  3. move cursor over to that word
  4. open quick menu with mm
  5. error!

How to reproduce (general case)

  1. open a file with some text greater than 3 characters
  2. move cursor over to that word
  3. do ":call clearmatches()"
  4. error!

Fix

PR: #30

p.s. I am new to open source development. If there's anything i can fix about my post, please let me know. I would really appreciate it

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.