nvimdev / lspsaga.nvim

improve neovim lsp experience
MIT License
3.47k stars 288 forks source link

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

Open diegoulloao opened 3 months ago

diegoulloao commented 3 months ago

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