Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cursor next to selected item #40

Open
beauwilliams opened this issue Jun 22, 2021 · 7 comments
Open

Add cursor next to selected item #40

beauwilliams opened this issue Jun 22, 2021 · 7 comments

Comments

@beauwilliams
Copy link
Contributor

beauwilliams commented Jun 22, 2021

I currently have an issue where I can not see the selected item in the list, but seeing as nobody has mentioned it yet, might be just my setup.. however, this lead me to an enhancement suggestion, a cursor icon next to current selection

such as telescope
image

If there was a cursor, this would be enough to solve my issue for now without having to rip apart my configs trying to figure out what the issue is

@beauwilliams
Copy link
Contributor Author

beauwilliams commented Jun 22, 2021

FYI I found the issue with the selected item highlight not showing. All good now. Was my plugin I am writing causing the issue.

@gegoune
Copy link

gegoune commented Jun 22, 2021

Please post the solution. I am not seeing the cursor either.

@beauwilliams
Copy link
Contributor Author

beauwilliams commented Jun 22, 2021

Please post the solution. I am not seeing the cursor either.

Yep so the issue I was having earlier was the gif below, the selected item highlights are not working. I removed my own plugin focus.nvim and it fixed the problem

I believe it was likely related to auto window sizing on my end. It has a bug anyways I need to fix..

image

@beauwilliams
Copy link
Contributor Author

@camspiers do snap buffers have a filetype set? I would like to disable my plugin running on snap buffers

@camspiers
Copy link
Owner

They don't have a file type set, but if that would help I could set one (except for previews). The results and the input buffers are both of buftype prompt.

@camspiers
Copy link
Owner

With respect to a cursor, I think it's probably a good idea, I'll put it on my todo list.

@beauwilliams
Copy link
Contributor Author

They don't have a file type set, but if that would help I could set one (except for previews). The results and the input buffers are both of buftype prompt.

Actually I don't think its going to be necessary (at least myself for now)

I found the source of the issue being related to setting the below autocmds.

    { 'WinEnter', '*', 'setlocal cursorline' })
    { 'WinLeave', '*', 'setlocal nocursorline' })

Here is how I fixed the problem in my plugin. I suppose I should have been using BufEnter anyways

    { 'BufEnter', '*', 'setlocal cursorline' })
    { 'BufLeave', '*', 'setlocal nocursorline' })

beauwilliams added a commit to nvim-focus/focus.nvim that referenced this issue Jun 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants