File tree Expand file tree Collapse file tree 2 files changed +10
-16
lines changed Expand file tree Collapse file tree 2 files changed +10
-16
lines changed Original file line number Diff line number Diff line change 4
4
<!-- Add all new changes here. They will be moved under a version at release -->
5
5
* ` NEW ` Add postfix snippet for ` unpack `
6
6
* ` FIX ` ` diagnostics.severity ` defaulting to "Warning" when run using ` --check ` [ #2730 ] ( https://github.com/LuaLS/lua-language-server/issues/2730 )
7
- * ` NEW ` Add support for lambda style functions, ` |paramList| expr ` is syntactic sugar for ` function(paramList) return expr end `
8
- * ` FIX ` Respect ` completion.showParams ` config for local function completion
7
+ * ` NEW ` Add support for lambda style functions, ` |paramList| expr ` is syntactic sugar for ` function(paramList) return expr end `
8
+ * ` FIX ` Respect ` completion.showParams ` config for local function completion
9
9
* ` CHG ` Improve performance of multithreaded ` --check ` and ` undefined-field ` diagnostic
10
+ * ` FIX ` Addons can now self-recommend as expected. Fixed by correcting the ` wholeMatch ` function
10
11
11
12
## 3.9.3
12
13
` 2024-6-11 `
145
146
Cat = 1 ,
146
147
Dog = 2 ,
147
148
}
148
-
149
+
149
150
--- @param animal userdata
150
151
--- @param atp AnimalType
151
152
--- @return boolean
Original file line number Diff line number Diff line change @@ -360,7 +360,7 @@ local function loadSingle3rdConfig(libraryDir)
360
360
361
361
if cfg .words then
362
362
for i , word in ipairs (cfg .words ) do
363
- cfg .words [i ] = ' ()' .. word .. ' ()'
363
+ cfg .words [i ] = ' ([%w_]? )' .. word .. ' ([%w_]? )'
364
364
end
365
365
end
366
366
if cfg .files then
@@ -370,7 +370,7 @@ local function loadSingle3rdConfig(libraryDir)
370
370
else
371
371
filename = filename :gsub (' \\ ' , ' /' )
372
372
end
373
- cfg .files [i ] = ' ()' .. filename .. ' ()'
373
+ cfg .files [i ] = ' ([%w_]? )' .. filename .. ' ([%w_]? )'
374
374
end
375
375
end
376
376
@@ -515,17 +515,10 @@ end
515
515
--- @param b string
516
516
--- @return boolean
517
517
local function wholeMatch (a , b )
518
- local pos1 , pos2 = a :match (b )
519
- if not pos1 then
520
- return false
521
- end
522
- local left = a :sub (pos1 - 1 , pos1 - 1 )
523
- local right = a :sub (pos2 , pos2 )
524
- if left :match ' [%w_]'
525
- or right :match ' [%w_]' then
526
- return false
527
- end
528
- return true
518
+ local captures = {
519
+ a :match (b ),
520
+ }
521
+ return captures [1 ] == ' ' and captures [# captures ] == ' '
529
522
end
530
523
531
524
local function check3rdByWords (uri , configs , checkThirdParty )
You can’t perform that action at this time.
0 commit comments