Skip to content

Commit 007e863

Browse files
committed
fix #941
1 parent ee476c7 commit 007e863

17 files changed

+160
-153
lines changed

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## 2.6.4
44
* `FIX` [#937](https://github.com/sumneko/lua-language-server/issues/937)
5+
* `FIX` [#941](https://github.com/sumneko/lua-language-server/issues/941)
56

67
## 2.6.3
78
`2022-1-25`

meta/3rd/love2d/library/love.audio.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ function Source:setDirection(x, y, z) end
503503
---
504504
---The effect must have been previously defined using love.audio.setEffect.
505505
---
506-
---@overload fun(name: string, filtersettings: table):boolean
506+
---@overload fun(self: love.Source, name: string, filtersettings: table):boolean
507507
---@param name string # The name of the effect previously set up with love.audio.setEffect.
508508
---@param enable? boolean # If false and the given effect name was previously enabled on this Source, disables the effect.
509509
---@return boolean success # Whether the effect was successfully applied to this Source.
@@ -512,7 +512,7 @@ function Source:setEffect(name, enable) end
512512
---
513513
---Sets a low-pass, high-pass, or band-pass filter to apply when playing the Source.
514514
---
515-
---@overload fun()
515+
---@overload fun(self: love.Source)
516516
---@param settings {type: love.FilterType, volume: number, highgain: number, lowgain: number} # The filter settings to use for this Source, with the following fields:
517517
---@return boolean success # Whether the filter was successfully applied to the Source.
518518
function Source:setFilter(settings) end

meta/3rd/love2d/library/love.filesystem.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ function File:open(mode) end
354354
---
355355
---Read a number of bytes from a file.
356356
---
357-
---@overload fun(container: love.ContainerType, bytes: number):love.FileData|string, number
357+
---@overload fun(self: love.File, container: love.ContainerType, bytes: number):love.FileData|string, number
358358
---@param bytes? number # The number of bytes to read.
359359
---@return string contents # The contents of the read bytes.
360360
---@return number size # How many bytes have been read.
@@ -387,7 +387,7 @@ function File:tell() end
387387
---
388388
---Write data to a file.
389389
---
390-
---@overload fun(data: love.Data, size: number):boolean, string
390+
---@overload fun(self: love.File, data: love.Data, size: number):boolean, string
391391
---@param data string # The string data to write.
392392
---@param size? number # How many bytes to write.
393393
---@return boolean success # Whether the operation was successful.

meta/3rd/love2d/library/love.font.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ function Rasterizer:getGlyphCount() end
155155
---
156156
---Gets glyph data of a specified glyph.
157157
---
158-
---@overload fun(glyphNumber: number):love.GlyphData
158+
---@overload fun(self: love.Rasterizer, glyphNumber: number):love.GlyphData
159159
---@param glyph string # Glyph
160160
---@return love.GlyphData glyphData # Glyph data
161161
function Rasterizer:getGlyphData(glyph) end

meta/3rd/love2d/library/love.graphics.lua

Lines changed: 42 additions & 42 deletions
Large diffs are not rendered by default.

meta/3rd/love2d/library/love.image.lua

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ local CompressedImageData = {}
4747
---
4848
---Gets the width and height of the CompressedImageData.
4949
---
50-
---@overload fun(level: number):number, number
50+
---@overload fun(self: love.CompressedImageData, level: number):number, number
5151
---@return number width # The width of the CompressedImageData.
5252
---@return number height # The height of the CompressedImageData.
5353
function CompressedImageData:getDimensions() end
@@ -61,7 +61,7 @@ function CompressedImageData:getFormat() end
6161
---
6262
---Gets the height of the CompressedImageData.
6363
---
64-
---@overload fun(level: number):number
64+
---@overload fun(self: love.CompressedImageData, level: number):number
6565
---@return number height # The height of the CompressedImageData.
6666
function CompressedImageData:getHeight() end
6767

@@ -74,7 +74,7 @@ function CompressedImageData:getMipmapCount() end
7474
---
7575
---Gets the width of the CompressedImageData.
7676
---
77-
---@overload fun(level: number):number
77+
---@overload fun(self: love.CompressedImageData, level: number):number
7878
---@return number width # The width of the CompressedImageData.
7979
function CompressedImageData:getWidth() end
8080

@@ -89,8 +89,8 @@ local ImageData = {}
8989
---
9090
---Encodes the ImageData and optionally writes it to the save directory.
9191
---
92-
---@overload fun(outFile: string)
93-
---@overload fun(outFile: string, format: love.ImageFormat)
92+
---@overload fun(self: love.ImageData, outFile: string)
93+
---@overload fun(self: love.ImageData, outFile: string, format: love.ImageFormat)
9494
---@param format love.ImageFormat # The format to encode the image as.
9595
---@param filename? string # The filename to write the file to. If nil, no file will be written but the FileData will still be returned.
9696
---@return love.FileData filedata # The encoded image as a new FileData object.

meta/3rd/love2d/library/love.joystick.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ function Joystick:getGamepadAxis(axis) end
121121
---
122122
---Gets the button, axis or hat that a virtual gamepad input is bound to.
123123
---
124-
---@overload fun(button: love.GamepadButton):love.JoystickInputType, number, love.JoystickHat
124+
---@overload fun(self: love.Joystick, button: love.GamepadButton):love.JoystickInputType, number, love.JoystickHat
125125
---@param axis love.GamepadAxis # The virtual gamepad axis to get the binding for.
126126
---@return love.JoystickInputType inputtype # The type of input the virtual gamepad axis is bound to.
127127
---@return number inputindex # The index of the Joystick's button, axis or hat that the virtual gamepad axis is bound to.
@@ -208,8 +208,8 @@ function Joystick:isVibrationSupported() end
208208
---
209209
---Sets the vibration motor speeds on a Joystick with rumble support. Most common gamepads have this functionality, although not all drivers give proper support. Use Joystick:isVibrationSupported to check.
210210
---
211-
---@overload fun():boolean
212-
---@overload fun(left: number, right: number, duration: number):boolean
211+
---@overload fun(self: love.Joystick):boolean
212+
---@overload fun(self: love.Joystick, left: number, right: number, duration: number):boolean
213213
---@param left number # Strength of the left vibration motor on the Joystick. Must be in the range of 1.
214214
---@param right number # Strength of the right vibration motor on the Joystick. Must be in the range of 1.
215215
---@return boolean success # True if the vibration was successfully applied, false if not.

meta/3rd/love2d/library/love.math.lua

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -341,8 +341,8 @@ function RandomGenerator:getState() end
341341
---
342342
---Generates a pseudo-random number in a platform independent manner.
343343
---
344-
---@overload fun(max: number):number
345-
---@overload fun(min: number, max: number):number
344+
---@overload fun(self: love.RandomGenerator, max: number):number
345+
---@overload fun(self: love.RandomGenerator, min: number, max: number):number
346346
---@return number number # The pseudo-random number.
347347
function RandomGenerator:random() end
348348

@@ -357,7 +357,7 @@ function RandomGenerator:randomNormal(stddev, mean) end
357357
---
358358
---Sets the seed of the random number generator using the specified integer number.
359359
---
360-
---@overload fun(low: number, high: number)
360+
---@overload fun(self: love.RandomGenerator, low: number, high: number)
361361
---@param seed number # The integer number with which you want to seed the randomization. Must be within the range of 2^53.
362362
function RandomGenerator:setSeed(seed) end
363363

@@ -449,9 +449,9 @@ function Transform:scale(sx, sy) end
449449
---
450450
---Directly sets the Transform's internal 4x4 transformation matrix.
451451
---
452-
---@overload fun(layout: love.MatrixLayout, e1_1: number, e1_2: number, ..., e4_4: number):love.Transform
453-
---@overload fun(layout: love.MatrixLayout, matrix: table):love.Transform
454-
---@overload fun(layout: love.MatrixLayout, matrix: table):love.Transform
452+
---@overload fun(self: love.Transform, layout: love.MatrixLayout, e1_1: number, e1_2: number, ..., e4_4: number):love.Transform
453+
---@overload fun(self: love.Transform, layout: love.MatrixLayout, matrix: table):love.Transform
454+
---@overload fun(self: love.Transform, layout: love.MatrixLayout, matrix: table):love.Transform
455455
---@param e1_1 number # The first column of the first row of the matrix.
456456
---@param e1_2 number # The second column of the first row of the matrix.
457457
---@param e4_4 number # The fourth column of the fourth row of the matrix.

meta/3rd/love2d/library/love.physics.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ function Body:applyAngularImpulse(impulse) end
317317
---
318318
---Note that the force components and position must be given in world coordinates.
319319
---
320-
---@overload fun(fx: number, fy: number, x: number, y: number)
320+
---@overload fun(self: love.Body, fx: number, fy: number, x: number, y: number)
321321
---@param fx number # The x component of force to apply to the center of mass.
322322
---@param fy number # The y component of force to apply to the center of mass.
323323
function Body:applyForce(fx, fy) end
@@ -333,7 +333,7 @@ function Body:applyForce(fx, fy) end
333333
---
334334
---Note that the impulse components and position must be given in world coordinates.
335335
---
336-
---@overload fun(ix: number, iy: number, x: number, y: number)
336+
---@overload fun(self: love.Body, ix: number, iy: number, x: number, y: number)
337337
---@param ix number # The x component of the impulse applied to the center of mass.
338338
---@param iy number # The y component of the impulse applied to the center of mass.
339339
function Body:applyLinearImpulse(ix, iy) end

meta/3rd/love2d/library/love.sound.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ function SoundData:getDuration() end
9494
---
9595
---Gets the value of the sample-point at the specified position. For stereo SoundData objects, the data from the left and right channels are interleaved in that order.
9696
---
97-
---@overload fun(i: number, channel: number):number
97+
---@overload fun(self: love.SoundData, i: number, channel: number):number
9898
---@param i number # An integer value specifying the position of the sample (starting at 0).
9999
---@return number sample # The normalized samplepoint (range -1.0 to 1.0).
100100
function SoundData:getSample(i) end
@@ -114,7 +114,7 @@ function SoundData:getSampleRate() end
114114
---
115115
---Sets the value of the sample-point at the specified position. For stereo SoundData objects, the data from the left and right channels are interleaved in that order.
116116
---
117-
---@overload fun(i: number, channel: number, sample: number)
117+
---@overload fun(self: love.SoundData, i: number, channel: number, sample: number)
118118
---@param i number # An integer value specifying the position of the sample (starting at 0).
119119
---@param sample number # The normalized samplepoint (range -1.0 to 1.0).
120120
function SoundData:setSample(i, sample) end

0 commit comments

Comments
 (0)