Skip to content

Commit 05b2d2f

Browse files
committed
supports all schemes
resolve #1862
1 parent 3255420 commit 05b2d2f

File tree

4 files changed

+4
-11
lines changed

4 files changed

+4
-11
lines changed

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## 3.6.8
44
* `NEW` command `lua.exportDocument` . VSCode will display this command in the right-click menu
5+
* `CHG` setting `Lua.workspace.supportScheme` has been removed. All schemes are supported if the language id is `lua`
56
* `FIX` [#1831]
67
* `FIX` [#1838]
78
* `FIX` [#1841]

script/config/template.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,6 @@ local template = {
318318
['Lua.workspace.library'] = Type.Array(Type.String),
319319
['Lua.workspace.checkThirdParty'] = Type.Boolean >> true,
320320
['Lua.workspace.userThirdParty'] = Type.Array(Type.String),
321-
['Lua.workspace.supportScheme'] = Type.Array(Type.String) >> { 'file', 'untitled', 'git' },
322321
['Lua.completion.enable'] = Type.Boolean >> true,
323322
['Lua.completion.callSnippet'] = Type.String >> 'Disable' << {
324323
'Disable',

script/parser/guide.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,9 @@ function m.getLocal(source, name, pos)
479479
if not block then
480480
return nil
481481
end
482+
if block.type == 'main' then
483+
break
484+
end
482485
if block.start <= pos
483486
and block.finish >= pos
484487
and blockTypes[block.type] then

script/provider/provider.lua

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -266,11 +266,6 @@ m.register 'textDocument/didOpen' {
266266
function (params)
267267
local doc = params.textDocument
268268
local uri = files.getRealUri(doc.uri)
269-
local scheme = furi.split(uri)
270-
local supports = config.get(uri, 'Lua.workspace.supportScheme')
271-
if not util.arrayHas(supports, scheme) then
272-
return
273-
end
274269
log.debug('didOpen', uri)
275270
local text = doc.text
276271
files.setText(uri, text, true, function (file)
@@ -298,11 +293,6 @@ m.register 'textDocument/didChange' {
298293
---@async
299294
function (params)
300295
local doc = params.textDocument
301-
local scheme = furi.split(doc.uri)
302-
local supports = config.get(doc.uri, 'Lua.workspace.supportScheme')
303-
if not util.arrayHas(supports, scheme) then
304-
return
305-
end
306296
local changes = params.contentChanges
307297
local uri = files.getRealUri(doc.uri)
308298
workspace.awaitReady(uri)

0 commit comments

Comments
 (0)