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 摘要。