diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-05-24 17:37:35 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-05-24 17:37:35 +0800 |
commit | 8a2de634b1db860a009dafb5144c0d38eeacc5ad (patch) | |
tree | 531a0fcf7239e1b7c85ba15008e43a88bc78e078 | |
parent | f0f80fdf1b5c83467687541ffda36cabb8f9bd62 (diff) | |
download | lua-language-server-8a2de634b1db860a009dafb5144c0d38eeacc5ad.zip |
fix #1134 supports `untitled` lua files
-rw-r--r-- | changelog.md | 1 | ||||
-rw-r--r-- | script/provider/provider.lua | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/changelog.md b/changelog.md index 54b0a129..6f8236d3 100644 --- a/changelog.md +++ b/changelog.md @@ -4,6 +4,7 @@ * `FIX` hover: can not union `table` with other basic types * `FIX` [#1125](https://github.com/sumneko/lua-language-server/issues/1125) * `FIX` [#1131](https://github.com/sumneko/lua-language-server/issues/1131) +* `FIX` [#1134](https://github.com/sumneko/lua-language-server/issues/1134) ## 3.2.3 `2022-5-16` diff --git a/script/provider/provider.lua b/script/provider/provider.lua index 08b6ca93..ae99065e 100644 --- a/script/provider/provider.lua +++ b/script/provider/provider.lua @@ -238,7 +238,7 @@ m.register 'textDocument/didOpen' { function (params) local doc = params.textDocument local scheme = furi.split(doc.uri) - if scheme ~= 'file' then + if scheme ~= 'file' and scheme ~= 'untitled' then return end local uri = files.getRealUri(doc.uri) @@ -267,7 +267,7 @@ m.register 'textDocument/didChange' { function (params) local doc = params.textDocument local scheme = furi.split(doc.uri) - if scheme ~= 'file' then + if scheme ~= 'file' and scheme ~= 'untitled' then return end local changes = params.contentChanges |