LuaLS / LuaLS/lua-language-server

[Enhancement] Create cache in a user directory

未关闭
#2,676 2 条评论 17 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 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
  1. Download lua-language-server-3.9.1-linux-x64.tar.gz and extract it to /opt/lua-language-server/
  2. Make sure the owner of /opt/lua-language-server/ is root:root.
  3. Execute /opt/lua-language-server/bin/lua-language-server --help
  4. 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

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 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

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。