summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorserg3295 <75196080+serg3295@users.noreply.github.com>2022-09-17 21:42:29 +0300
committerGitHub <noreply@github.com>2022-09-17 14:42:29 -0400
commitfba6856a9cfc54904b8417bc5731dc6f25a297ff (patch)
tree3b629fa59124f86eb68956143c49ab232799d881
parent16f4d9c3269f54c102381d9fa44b5773c5b8c2c2 (diff)
downloadlua-language-server-fba6856a9cfc54904b8417bc5731dc6f25a297ff.zip
Use stricter activation pattern for lfs library (#1560)
* Fixed diagnostics error Blank line in function causes warning. * Use strict pattern to trigger attaching the lfs library Pattern 'lfs%.%w+' is too greedy. A script using the 'lfs' always contains string "requre('lfs')", so new pattern uses 'requre...'
-rw-r--r--meta/3rd/lfs/config.lua2
-rw-r--r--meta/3rd/lfs/library/lfs.lua1
2 files changed, 1 insertions, 2 deletions
diff --git a/meta/3rd/lfs/config.lua b/meta/3rd/lfs/config.lua
index b94f490d..3e46c587 100644
--- a/meta/3rd/lfs/config.lua
+++ b/meta/3rd/lfs/config.lua
@@ -1,5 +1,5 @@
name = 'luafilesystem'
-words = { 'lfs%.%w+' }
+words = { 'require[%s%(\"\']+lfs[%)\"\']' }
configs = {
{
key = 'Lua.diagnostics.globals',
diff --git a/meta/3rd/lfs/library/lfs.lua b/meta/3rd/lfs/library/lfs.lua
index 76f457b7..4016152a 100644
--- a/meta/3rd/lfs/library/lfs.lua
+++ b/meta/3rd/lfs/library/lfs.lua
@@ -95,7 +95,6 @@ end
---@param symlink? boolean
---@return boolean, string
function lfs.link(old, new, symlink)
-
end
--[[