summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-09-30 23:19:20 +0800
committerGitHub <noreply@github.com>2022-09-30 23:19:20 +0800
commit18691bdfea49c829115437e7d029aa15bddd3d58 (patch)
tree9971529811a2f31791bad0981b19647fde4b3cff
parent8148c37d33973c6689ab4a5c0895dceec6f6880a (diff)
parente8dd3c3c674790771438173606a027f06a90c9ed (diff)
downloadlua-language-server-18691bdfea49c829115437e7d029aa15bddd3d58.zip
Merge branch 'master' into master
m---------3rd/bee.lua0
-rw-r--r--changelog.md2
-rw-r--r--script/filewatch.lua3
-rw-r--r--script/parser/luadoc.lua6
4 files changed, 10 insertions, 1 deletions
diff --git a/3rd/bee.lua b/3rd/bee.lua
-Subproject 986a732da91ae65407ca0508c69b55b80d0befd
+Subproject 1709488beac7d8c381a5ac061297145186c72e5
diff --git a/changelog.md b/changelog.md
index 9b5ce41d..ba78d563 100644
--- a/changelog.md
+++ b/changelog.md
@@ -17,11 +17,13 @@ server will generate `doc.json` and `doc.md` in `LOGPATH`.
}
```
* `CHG` [#1177] re-support for symlinks, users need to maintain the correctness of symlinks themselves
+* `FIX` [#1593]
[#1177]: https://github.com/sumneko/lua-language-server/issues/1177
[#1458]: https://github.com/sumneko/lua-language-server/issues/1458
[#1557]: https://github.com/sumneko/lua-language-server/issues/1557
[#1558]: https://github.com/sumneko/lua-language-server/issues/1558
+[#1593]: https://github.com/sumneko/lua-language-server/issues/1593
## 3.5.6
`2022-9-16`
diff --git a/script/filewatch.lua b/script/filewatch.lua
index a3abaa48..66e8afb3 100644
--- a/script/filewatch.lua
+++ b/script/filewatch.lua
@@ -29,6 +29,9 @@ m._eventList = {}
m._watchings = {}
function m.watch(path)
+ if path == '' then
+ return function () end
+ end
if m._watchings[path] then
m._watchings[path].count = m._watchings[path].count + 1
else
diff --git a/script/parser/luadoc.lua b/script/parser/luadoc.lua
index 176d6f03..d5ac93bb 100644
--- a/script/parser/luadoc.lua
+++ b/script/parser/luadoc.lua
@@ -1494,10 +1494,14 @@ local function buildLuaDoc(comment)
comment = comment,
}
end
+ local startOffset = comment.start
+ if comment.type == 'comment.long' then
+ startOffset = startOffset + #comment.mark - 2
+ end
local doc = text:sub(startPos)
- parseTokens(doc, comment.start + startPos)
+ parseTokens(doc, startOffset + startPos)
local result, rests = convertTokens(doc)
if result then
result.range = comment.finish