nvimdev / lspsaga.nvim

improve neovim lsp experience
MIT License
3.41k stars 287 forks source link

Filter doc wrong #1394

Closed xzbdmw closed 5 months ago

xzbdmw commented 6 months ago

Describe the bug

from the doc

You can use the filter option to filter LSP methods result. The keys are method, and values are Lua function with client_id and result parameter. The function should return a boolean. As an example:

require('lspsaga').setup({
  finder = {
    filter = {
      ['textDocument/references']  = function(client_id, result)
        -- your logic
        return true
      end
    }
  }
})

you can't copy paste it because actual code is totally different https://github.com/nvimdev/lspsaga.nvim/blob/b1b140aa20a0cf353cd3e282870429b48b30a169/lua/lspsaga/finder/box.lua#L52C1-L54C6

Steps to reproduce

copy expamle from doc, result in throwing error

Expected behavior

no effect

Neovim version (nvim -v)

0.10

lspsaga commit

2198c07

Terminal name/version

iterm