nvimdev / nvimdev/lspsaga.nvim

Avoid nvim-tree update_focused_file on saga finder (go to def)

Open
#1,476 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Lua
Stars
3.8k
Forks
308
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

Everytime I press go to definition (sagafinder) the nvim-tree is auto focusing the file inside the floating window.

I'm trying to avoid this behavior:

https://github.com/user-attachments/assets/88e351b0-9778-45c8-a6ba-87d135e527c1

I tried adding sagafinder, SagaFinder, Saga, etc; to the ignore_list option in nvim-tree config but it doesn't work.

return {
  "nvim-tree/nvim-tree.lua",
  version = "*", -- using latest
  opts = {
    -- minimal config
    update_focused_file = {
      enable = true,
      update_root = true,
      ignore_list = { "sagafinder" }, -- adding this should prevent the behavior but it doesn't
    },
  },
}

Also tried printing echo &filetype to check the right value to add to the ignore_list but it prints no type in particular (typescriptreact). &buftype prints nothing.

Steps to reproduce

Check the video. Nvim-tree plugin with the basic config above is needed.

Expected behavior

Prevent the nvim-tree focusing the file inside the sagafinder floating window, a filetype or something should be provided? In order to make it work with the ignore_list in nvim-tree.

Neovim version (nvim -v)

0.10.0

lspsaga commit

6f920cf

Terminal name/version

kitty 0.35.2

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the saga finder go-to-definition entry point and nvim-tree's update_focused_file handling, especially the ignore_list behavior. Reproduce with Neovim 0.10.0, lspsaga commit 6f920cf, and the minimal configuration shown; done when the floating saga finder does not cause nvim-tree to focus its file and the supported ignore value is clear.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua, neovim
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.