nvimdev / lspsaga.nvim

improve neovim lsp experience
MIT License
3.42k stars 286 forks source link

lsp_rename problem #1338

Closed MahdiGMK closed 10 months ago

MahdiGMK commented 10 months ago

Describe the bug

I'm using the latest version of lspsaga using lazy package manager and when I use lsp_rename command it throws error. :Lspsaga lsp_rename ++project

Error in executing Lua callback: ...cal/share/nvim/lazy/lspsaga.nvim/lua/lspsaga/command.lua:74: attempt to call a nil value                                                            
stack traceback:
        ...cal/share/nvim/lazy/lspsaga.nvim/lua/lspsaga/command.lua:74: in function 'load_command'
        ...k/.local/share/nvim/lazy/lspsaga.nvim/plugin/lspsaga.lua:8: in function <...k/.local/share/nvim/lazy/lspsaga.nvim/plugin/lspsaga.lua:7>

Steps to reproduce

Add Lspsaga to your lazy.nvim config

    'nvimdev/lspsaga.nvim',
    config = function()
      require('lspsaga').setup({
        rename = {
          in_select = true,
          auto_save = true,
          keys = {
            quit = '<leader>q',
            exec = '<cr>',
            select = 'x'
          }
        }
      })
    end,
    dependencies = {
      'nvim-lspconfig',
      'nvim-treesitter/nvim-treesitter',
      'nvim-tree/nvim-web-devicons'
    }

then try :Lspsaga lsp_rename ++project on some function

Expected behavior

Based on doc : After the LSP rename is done, and if the name still exists somewhere within the project, the project_replace window would pop out.

Neovim version (nvim -v)

NVIM v0.9.4

lspsaga commit

commit 199eb00822f65b811f43736ba65ab7e16501125d (HEAD -> main, origin/main, origin/HEAD)

Terminal name/version

neovide 0.11.2

glepnir commented 10 months ago

:Lspsaga rename ++project

MahdiGMK commented 10 months ago

I have tested :Lspsaga rename ++project and even it doesn't work as expected It opens a blank floating window that does nothing and the only way to close it is by using :q

image