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 44<!-- Add all new changes here. They will be moved under a version at release -->
55* ` NEW ` Add postfix snippet for ` unpack `
66* ` 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
99* ` 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
1011
1112## 3.9.3
1213` 2024-6-11 `
145146 Cat = 1 ,
146147 Dog = 2 ,
147148 }
148-
149+
149150 --- @param animal userdata
150151 --- @param atp AnimalType
151152 --- @return boolean
Original file line number Diff line number Diff line change @@ -360,7 +360,7 @@ local function loadSingle3rdConfig(libraryDir)
360360
361361 if cfg .words then
362362 for i , word in ipairs (cfg .words ) do
363- cfg .words [i ] = ' ()' .. word .. ' ()'
363+ cfg .words [i ] = ' ([%w_]? )' .. word .. ' ([%w_]? )'
364364 end
365365 end
366366 if cfg .files then
@@ -370,7 +370,7 @@ local function loadSingle3rdConfig(libraryDir)
370370 else
371371 filename = filename :gsub (' \\ ' , ' /' )
372372 end
373- cfg .files [i ] = ' ()' .. filename .. ' ()'
373+ cfg .files [i ] = ' ([%w_]? )' .. filename .. ' ([%w_]? )'
374374 end
375375 end
376376
@@ -515,17 +515,10 @@ end
515515--- @param b string
516516--- @return boolean
517517local 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 ] == ' '
529522end
530523
531524local function check3rdByWords (uri , configs , checkThirdParty )
You can’t perform that action at this time.
0 commit comments