summaryrefslogtreecommitdiff
path: root/script/proto
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-11-08 15:54:58 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-11-08 15:54:58 +0800
commit93abb07995244becd028828c1bfb9ee4a76ca7f9 (patch)
treebe0f7cfe7a3c86eec157585f82f407ed067b5f59 /script/proto
parente9c0fee9f413cc55d141231a40775cb48037ccf3 (diff)
parent5a8e3212d25a5c511e25cdf00232e807a7fb5da7 (diff)
downloadlua-language-server-93abb07995244becd028828c1bfb9ee4a76ca7f9.zip
Merge branch 'master' into not-yieldable
Diffstat (limited to 'script/proto')
-rw-r--r--script/proto/converter.lua5
-rw-r--r--script/proto/define.lua2
2 files changed, 6 insertions, 1 deletions
diff --git a/script/proto/converter.lua b/script/proto/converter.lua
index cf6331f1..9c75f056 100644
--- a/script/proto/converter.lua
+++ b/script/proto/converter.lua
@@ -2,7 +2,6 @@ local guide = require 'parser.guide'
local files = require 'files'
local encoder = require 'encoder'
--- TODO
local offsetEncoding = 'utf16'
local m = {}
@@ -178,4 +177,8 @@ function m.textEdit(range, newtext)
}
end
+function m.setOffsetEncoding(encoding)
+ offsetEncoding = encoding:lower():gsub('%-', '')
+end
+
return m
diff --git a/script/proto/define.lua b/script/proto/define.lua
index e4216be1..dbb6ba85 100644
--- a/script/proto/define.lua
+++ b/script/proto/define.lua
@@ -46,6 +46,7 @@ m.DiagnosticDefaultSeverity = {
['different-requires'] = 'Warning',
['await-in-sync'] = 'Warning',
['not-yieldable'] = 'Warning',
+ ['discard-returns'] = 'Warning',
['type-check'] = 'Warning',
['duplicate-doc-class'] = 'Warning',
@@ -102,6 +103,7 @@ m.DiagnosticDefaultNeededFileStatus = {
['different-requires'] = 'Any',
['await-in-sync'] = 'None',
['not-yieldable'] = 'None',
+ ['discard-returns'] = 'Opened',
['type-check'] = 'None',
['duplicate-doc-class'] = 'Any',