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

Add finder option ref_opt

Open wiserfz opened this issue 6 months ago • 0 comments

Hi, thank you for such amazing plugin.

I noticed the command lspsaga finder def+ref will display the definition and the references, but the definition also include in the references section:

bashls

image

rust-analyzer

image

and I also see the issue #1336 , so I open this PR and add an option finder.ref_opt which indicated the parameters includeDeclaration for the LSP RCP method textDocument/references, the default value is true and also can be a table which can setup value for each LSP client for example:

local saga = require("lspsaga")

saga.setup({
    finder = {
      ref_opt = {
        bashls = false,
        rust_analyzer = false,
        lua_ls = true,
      },
    },
})

bashls

image

rust-analyzer

image

lua_ls

image

Any feedback is appreciated.

wiserfz avatar Aug 29 '25 09:08 wiserfz