Hello, I have LSP configured with pyright for python development and vim.lsp.buf.rename() does not work. When I run :lua vim.lsp.buf.rename(), it asks for the new name, but doesn’t change the name, and I don’t get any error either.
Configured servers: pyright
Neovim logs at: /Users/foo/.cache/nvim/lsp.log
1 client(s) attached to this buffer: pyright
Client: pyright (id 1)
root: /private/tmp/servicenow-tmp
filetypes: python
cmd: pyright-langserver --stdio
1 active client(s):
Client: pyright (id 1)
root: /private/tmp/servicenow-tmp
filetypes: python
cmd: pyright-langserver --stdio
Clients that match the filetype python:
Config: pyright
cmd: pyright-langserver --stdio
cmd is executable: True
identified root: /private/tmp
custom handlers:
This is what lsp log shows
[ DEBUG ] 2021-07-06T08:08:03-0700 ] ...l/Cellar/neovim/0.5.0/share/nvim/runtime/lua/vim/lsp.lua:895 ] "LSP[pyright]" "client.request" 1 "textDocument/rename" { newName = "api2", position = { character = 4, line = 15 }, textDocument = { uri = "file:///private/tmp/servicenow-tmp/server.py" }} <function 1> 1
[ DEBUG ] 2021-07-06T08:08:03-0700 ] ...llar/neovim/0.5.0/share/nvim/runtime/lua/vim/lsp/rpc.lua:395 ] "rpc.send.payload" { id = 6, jsonrpc = "2.0", method = "textDocument/rename", params = { newName = "api2", position = { character = 4, line = 15 }, textDocument = { uri = "file:///private/tmp/servicenow-tmp/server.py" } }}
[ DEBUG ] 2021-07-06T08:08:03-0700 ] ...llar/neovim/0.5.0/share/nvim/runtime/lua/vim/lsp/rpc.lua:496 ] "decoded" { id = 6, jsonrpc = "2.0", result = vim.NIL}
[ DEBUG ] 2021-07-06T08:08:03-0700 ] ...neovim/0.5.0/share/nvim/runtime/lua/vim/lsp/handlers.lua:434 ] "default_handler" "textDocument/rename" { bufnr = 1, client_id = 1}