LuaLS / LuaLS/lua-language-server
[Enhancement] Create cache in a user directory
未关闭
还没有人认领这个 Issue。
- 主要语言
- Lua
- 星标
- 4.4k
- 派生
- 442
- PR 合并指标
- 30 天内没有已合并 PR
描述
How are you using the lua-language-server?
Neovim
Which OS are you using?
Linux
What is the issue affecting?
Other
Expected Behaviour
lua-language-server should create the cache directory on the user's home directory. On Linux this should be in ~/.cache/lua-language-server/ ideally.
Actual Behaviour
lua-language-server fails to start because it attempts to create the cache directory in a system directory which a regular user doesn't have permissions to write to.
Reproduction steps
- Download
lua-language-server-3.9.1-linux-x64.tar.gzand extract it to/opt/lua-language-server/ - Make sure the owner of
/opt/lua-language-server/isroot:root. - Execute
/opt/lua-language-server/bin/lua-language-server --help - See error:
lua-language-server: create_directories: "/opt/lua-language-server/log/cache/40815": (generic:13)Permission denied
Additional Notes
No response
Log File
No response
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从复现 /opt/lua-language-server/bin/lua-language-server --help 开始,并追踪 log/cache/40815 路径在哪里被选定。验证对于普通 Linux 用户,缓存会创建在 ~/.cache/lua-language-server/ 下,然后在没有权限错误的情况下重新运行文档中所述的启动步骤。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- linux, lua, neovim
- 领域
- operating-systems, tooling
- Issue 类型
- 功能
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 48/100