Skip to content

Commit 8a2de63

Browse files
committed
fix #1134 supports untitled lua files
1 parent f0f80fd commit 8a2de63

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* `FIX` hover: can not union `table` with other basic types
55
* `FIX` [#1125](https://github.com/sumneko/lua-language-server/issues/1125)
66
* `FIX` [#1131](https://github.com/sumneko/lua-language-server/issues/1131)
7+
* `FIX` [#1134](https://github.com/sumneko/lua-language-server/issues/1134)
78

89
## 3.2.3
910
`2022-5-16`

script/provider/provider.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ m.register 'textDocument/didOpen' {
238238
function (params)
239239
local doc = params.textDocument
240240
local scheme = furi.split(doc.uri)
241-
if scheme ~= 'file' then
241+
if scheme ~= 'file' and scheme ~= 'untitled' then
242242
return
243243
end
244244
local uri = files.getRealUri(doc.uri)
@@ -267,7 +267,7 @@ m.register 'textDocument/didChange' {
267267
function (params)
268268
local doc = params.textDocument
269269
local scheme = furi.split(doc.uri)
270-
if scheme ~= 'file' then
270+
if scheme ~= 'file' and scheme ~= 'untitled' then
271271
return
272272
end
273273
local changes = params.contentChanges

0 commit comments

Comments
 (0)