diff options
Diffstat (limited to 'script/proto/define.lua')
-rw-r--r-- | script/proto/define.lua | 36 |
1 files changed, 2 insertions, 34 deletions
diff --git a/script/proto/define.lua b/script/proto/define.lua index 2e4116fd..fe7d171b 100644 --- a/script/proto/define.lua +++ b/script/proto/define.lua @@ -1,37 +1,5 @@ local m = {} ----@alias location table ----@param uri string ----@param range range ----@return location -function m.location(uri, range) - return { - uri = uri, - range = range, - } -end - ----@alias locationLink table ----@param uri string ----@param range range ----@param selection range ----@param origin range -function m.locationLink(uri, range, selection, origin) - return { - targetUri = uri, - targetRange = range, - targetSelectionRange = selection, - originSelectionRange = origin, - } -end - -function m.textEdit(range, newtext) - return { - range = range, - newText = newtext, - } -end - --- 诊断等级 m.DiagnosticSeverity = { Error = 1, @@ -61,14 +29,14 @@ m.DiagnosticDefaultSeverity = { ['redefined-local'] = 'Hint', ['newline-call'] = 'Information', ['newfield-call'] = 'Warning', - ['redundant-parameter'] = 'Hint', + ['redundant-parameter'] = 'Warning', ['ambiguity-1'] = 'Warning', ['lowercase-global'] = 'Information', ['undefined-env-child'] = 'Information', ['duplicate-index'] = 'Warning', ['duplicate-set-field'] = 'Warning', ['empty-block'] = 'Hint', - ['redundant-value'] = 'Hint', + ['redundant-value'] = 'Warning', ['code-after-break'] = 'Hint', ['unbalanced-assignments'] = 'Warning', ['close-non-object'] = 'Warning', |