LuaLS / LuaLS/lua-language-server

Mass renaming proposal

未關閉
#1,404 10 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

suggestion
主要語言
Lua
星號
4.4k
分支
442
PR 合併指標
30 天內沒有已合併 PR

描述

There are a number of settings, diagnostics, and more that have unclear names that I think can be improved. This issue serves to propose new names for these items so that they can all be tracked in one place and implemented at once to minimize the number of breaking releases that would need to be released.

## Settings
- [ ] `completion.displayContext` -> `completion.peekDefinition`
- There is already a `Peek Definition` command in VS Code that has a similar function and I think naming it the same will help people understand its function without confusing the two as they are triggered entirely differently.
- [ ] `diagnostics.disable` -> [**REMOVE**](https://github.com/sumneko/lua-language-server/issues/1364)
- [ ] `diagnostics.groupFileStatus` -> [**REMOVE**](https://github.com/sumneko/lua-language-server/issues/1364)
- [ ] `diagnostics.groupSeverity` -> [**REMOVE**](https://github.com/sumneko/lua-language-server/issues/1364)
- [ ] `diagnostics.ignoreFiles` -> `diagnostics.diagnoseIgnored`
- [ ] `diagnostics.libraryFiles` -> `diagnostics.diagnoseLibraries`
- [ ] `diagnostics.neededFileStatus` -> `diagnostics.config` [(Rework functionality)](https://github.com/sumneko/lua-language-server/issues/1364)
- [ ] `diagnostics.severity` [(Rework functionality)](https://github.com/sumneko/lua-language-server/issues/1364)
- [ ] `diagnostics.workspaceDelay` -> `diagnostics.delay`
- [ ] `hint.setType` -> `hint.assignType`
- [ ] `hover.enumsLimit` -> `hover.typesLimit`
- [ ] `hover.previewFields` -> `hover.peekFields`
- [ ] `runtime.special` -> `runtime.aliases`
- [ ] `workspace.checkThirdParty` -> [`workspace.checkEnvConfigs`](https://github.com/sumneko/lua-language-server/issues/1384)
- [ ] `workspace.ignoreDir` -> `workspace.ignore`
- [ ] `workspace.library` -> `workspace.libraries`
- [ ] `workspace.maxPreload` -> `workspace.maxFiles`
- [ ] `workspace.preloadFileSize` -> `workspace.maxFileSize`
- [ ] `workspace.userThirdParty` -> [`workspace.envConfig`](https://github.com/sumneko/lua-language-server/issues/1384)

## Diagnostics
I imagine there is a good reason `abiguity-1` is named how it is 😄 I see they all have at least 1 hyphen so I guess that is a limitation with how they are parsed?

- [ ] `unknown-diag-code` -> `unknown-diagnostic`
- [ ] `cast-local-type` -> `local-cast-mismatch`

## Syntax Errors
Luckily these can probably be changed with very little impact on the user and most people likely would not have any settings related to these.
- [ ] `err-assign-as-eq` -> `assign-with-equals`
- [ ] `err-c-long-comment` -> `multiline-comment-prefix`
- [ ] `err-comment-prefix` -> `comment-prefix`
- [ ] `err-do-as-then` -> `then-as-do`
- [ ] `err-eq-as-assign` -> `equality-with-assign`
- [ ] `err-esc` -> `unknown-escape`
- [ ] `err-nonstandard-symbol` -> `non-standard-symbol`
- [ ] `err-then-as-do` -> `do-as-then`
- [ ] `exp-in-action` -> `unexpected-expression`
- [ ] `keyword` -> `reserved`
- [ ] `miss-esc-x` -> `miss-hex-value`
- [ ] `miss-exp` -> `miss-expression`

`newfield-call` and `newline-call` are not easy to understand but I can't think of anything that does a better job 🤔

~~I don't even know what these do: `unexpect-efunc-name`, `unexpect-lfunc-name`~~

---

Please let me know what you think and feel free to suggest other names.

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

首先檢視此 issue 中提出的設定、診斷代碼和語法錯誤重新命名,以及連結的 issues #1364 和 #1384。首先確定哪些名稱和功能變更已獲接受;要視為完成,需要一份經過同意的完整重新命名計畫,而不是孤立的修改。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
lua
領域
devtools
Issue 類型
重構
難度
5/5
預估耗時
一週以上
活躍度
停滯
描述清晰度
需要釐清
新手友好度
25/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。