summaryrefslogtreecommitdiff
path: root/script/proto
diff options
context:
space:
mode:
authoruhziel <uhziel@gmail.com>2020-12-15 18:17:18 +0800
committeruhziel <uhziel@gmail.com>2020-12-15 18:17:18 +0800
commit295d45c0e8b781e056138e869c5c32e876272b9c (patch)
treeaef6634f884e3482c971445ddfa5f030d5ba9323 /script/proto
parentf3ec5825e3c6a8090a020097e088f26718c316bb (diff)
downloadlua-language-server-295d45c0e8b781e056138e869c5c32e876272b9c.zip
指定诊断类型可以配置只分析打开的文件还是全项目,初版还需要支持vscode配置
Diffstat (limited to 'script/proto')
-rw-r--r--script/proto/define.lua46
1 files changed, 39 insertions, 7 deletions
diff --git a/script/proto/define.lua b/script/proto/define.lua
index 6ddcd3a7..88493abe 100644
--- a/script/proto/define.lua
+++ b/script/proto/define.lua
@@ -168,6 +168,45 @@ m.DiagnosticDefaultSeverity = {
['duplicate-doc-field'] = 'Warning',
}
+-- 文件状态
+m.FileStatus = {
+ Any = 1,
+ Opened = 2,
+}
+
+--- 诊断类型与需要的文件状态(可以控制只分析打开的文件、还是所有文件)
+m.DiagnosticDefaultNeededFileStatus = {
+ ['unused-local'] = 'Opened',
+ ['unused-function'] = 'Opened',
+ ['undefined-global'] = 'Any',
+ ['undefined-field'] = 'Opened',
+ ['global-in-nil-env'] = 'Any',
+ ['unused-label'] = 'Opened',
+ ['unused-vararg'] = 'Opened',
+ ['trailing-space'] = 'Opened',
+ ['redefined-local'] = 'Opened',
+ ['newline-call'] = 'Any',
+ ['newfield-call'] = 'Any',
+ ['redundant-parameter'] = 'Opened',
+ ['ambiguity-1'] = 'Any',
+ ['lowercase-global'] = 'Any',
+ ['undefined-env-child'] = 'Any',
+ ['duplicate-index'] = 'Any',
+ ['empty-block'] = 'Opened',
+ ['redundant-value'] = 'Opened',
+ ['code-after-break'] = 'Opened',
+ ['unbalanced-assignments'] = 'Any',
+
+ ['duplicate-doc-class'] = 'Any',
+ ['undefined-doc-class'] = 'Any',
+ ['undefined-doc-name'] = 'Any',
+ ['circle-doc-class'] = 'Any',
+ ['undefined-doc-param'] = 'Any',
+ ['duplicate-doc-param'] = 'Any',
+ ['doc-field-no-class'] = 'Any',
+ ['duplicate-doc-field'] = 'Any',
+}
+
--- 诊断报告标签
m.DiagnosticTag = {
Unnecessary = 1,
@@ -221,13 +260,6 @@ m.CompletionItemKind = {
TypeParameter = 25,
}
-m.DiagnosticSeverity = {
- Error = 1,
- Warning = 2,
- Information = 3,
- Hint = 4,
-}
-
m.ErrorCodes = {
-- Defined by JSON RPC
ParseError = -32700,