Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vscode里对文件大小写重命名后提示重复的定义 #818

Closed
HiKit opened this issue Nov 24, 2021 · 3 comments
Closed

vscode里对文件大小写重命名后提示重复的定义 #818

HiKit opened this issue Nov 24, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@HiKit
Copy link

HiKit commented Nov 24, 2021

TestA.lua

---@class TestA
_G.TestA = {};

function TestA:Test()

end

该阶段一切正常

image


在vscode里将TestA.lua重命名为Testa.lua,发现类提示生效
如果重启vscode,会提示重复定义的类 TestA

image

目前没研究明白插件的server缓存策略,或者如何彻底清理缓存

@sumneko sumneko added the bug Something isn't working label Nov 24, 2021
@sumneko
Copy link
Collaborator

sumneko commented Nov 24, 2021

把重启后出问题的日志发来看看 https://github.com/sumneko/lua-language-server/wiki/Default-log-path

暂时的解决方法:

  1. 关闭这个文件
  2. F1 -> 输入 clear, 点击 "文件:清除最近打开"
  3. 重启 VSCode

@sumneko
Copy link
Collaborator

sumneko commented Nov 24, 2021

确保你操作的时候,把所有的文件视图都关闭了

@HiKit
Copy link
Author

HiKit commented Nov 24, 2021

上面clear的时候没有关闭这个文件,关闭后clear测试是有效的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants