From d50f6d665061f96da4e132760c37c40857c8449d Mon Sep 17 00:00:00 2001 From: Luke100000 Date: Tue, 3 Dec 2024 17:42:01 +0100 Subject: [PATCH 1/4] Added script to automatically update definitions --- .gitignore | 1 + README.md | 9 +++++++++ update.sh | 23 +++++++++++++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100755 update.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..62e67163 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +lua-language-server \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 00000000..ceaaeca6 --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +# LÖVE Definitions + +Definitions for the LÖVE 2D game framework, generated from +[love-api](https://github.com/love2d-community/love-api) using +[LLSs meta build script](https://github.com/LuaLS/lua-language-server/blob/master/tools/build-3rd-meta.lua) + +## Usage + +Run [`update.sh`](update.sh) to update, commit, and push changes. diff --git a/update.sh b/update.sh new file mode 100755 index 00000000..f2ad19ed --- /dev/null +++ b/update.sh @@ -0,0 +1,23 @@ +# Update LLS source +[ ! -d "lua-language-server" ] && git clone --recurse-submodules -j8 https://github.com/LuaLS/lua-language-server.git +cd lua-language-server || exit +git pull + +# Build LLS +./make.sh + +# Update love-api +git submodule update --remote 3rd/love-api + +# Build 3rd meta +./bin/lua-language-server ./tools/build-3rd-meta.lua + +# Copy 3rd meta to addon +cd .. || exit +rm -r library +cp -r lua-language-server/meta/3rd/love2d/library/ library + +# Commit changes +git add library +git commit -m "Updated meta files" +git push \ No newline at end of file From a2f6d18fed15488bd63463c11e5f15a6d0f201c4 Mon Sep 17 00:00:00 2001 From: Luke100000 Date: Tue, 3 Dec 2024 18:34:26 +0100 Subject: [PATCH 2/4] Updated meta files --- library/love/audio.lua | 14 +++++----- library/love/filesystem.lua | 6 ++--- library/love/graphics.lua | 51 +++++++++++++++---------------------- library/love/math.lua | 24 +++-------------- library/love/mouse.lua | 4 +-- library/love/physics.lua | 32 +++++++++++------------ library/love/thread.lua | 3 +-- library/love/window.lua | 6 ++--- 8 files changed, 55 insertions(+), 85 deletions(-) diff --git a/library/love/audio.lua b/library/love/audio.lua index 1978e63e..8043ac05 100644 --- a/library/love/audio.lua +++ b/library/love/audio.lua @@ -79,12 +79,12 @@ function love.audio.getMaxSourceEffects() end --- ---[Open in Browser](https://love2d.org/wiki/love.audio.getOrientation) --- ----@return number fx # Forward vector of the listener orientation. ----@return number fy # Forward vector of the listener orientation. ----@return number fz # Forward vector of the listener orientation. ----@return number ux # Up vector of the listener orientation. ----@return number uy # Up vector of the listener orientation. ----@return number uz # Up vector of the listener orientation. +---@return number fx # Forward x of the listener orientation. +---@return number fy # Forward y of the listener orientation. +---@return number fz # Forward z of the listener orientation. +---@return number ux # Up x of the listener orientation. +---@return number uy # Up y of the listener orientation. +---@return number uz # Up z of the listener orientation. function love.audio.getOrientation() end --- @@ -750,7 +750,7 @@ function Source:setPosition(x, y, z) end --- ---Sets whether the Source's position, velocity, direction, and cone angles are relative to the listener, or absolute. --- ----By default, all sources are absolute and therefore relative to the origin of love's coordinate system 0, 0. Only absolute sources are affected by the position of the listener. Please note that positional audio only works for mono (i.e. non-stereo) sources. +---By default, all sources are absolute and therefore relative to the origin of love's coordinate system 0, 0. Only absolute sources are affected by the position of the listener. Please note that positional audio only works for mono (i.e. non-stereo) sources. --- --- ---[Open in Browser](https://love2d.org/wiki/Source:setRelative) diff --git a/library/love/filesystem.lua b/library/love/filesystem.lua index 945352df..093f3322 100644 --- a/library/love/filesystem.lua +++ b/library/love/filesystem.lua @@ -80,7 +80,7 @@ function love.filesystem.getCRequirePath() end function love.filesystem.getDirectoryItems(dir) end --- ----Gets the write directory name for your game. +---Gets the write directory name for your game. --- ---Note that this only returns the name of the folder to store your files in, not the full path. --- @@ -239,7 +239,7 @@ function love.filesystem.load(name) end function love.filesystem.mount(archive, mountpoint, appendToPath) end --- ----Creates a new File object. +---Creates a new File object. --- ---It needs to be opened before it can be accessed. --- @@ -303,7 +303,7 @@ function love.filesystem.remove(name) end function love.filesystem.setCRequirePath(paths) end --- ----Sets the write directory for your game. +---Sets the write directory for your game. --- ---Note that you can only set the name of the folder to store your files in, not the location. --- diff --git a/library/love/graphics.lua b/library/love/graphics.lua index e428b96c..ffc78418 100644 --- a/library/love/graphics.lua +++ b/library/love/graphics.lua @@ -107,7 +107,7 @@ function love.graphics.discard(discardcolor, discardstencil) end --- ---Objects are drawn relative to their local coordinate system. The origin is by default located at the top left corner of Image and Canvas. All scaling, shearing, and rotation arguments transform the object relative to that point. Also, the position of the origin can be specified on the screen coordinate system. --- ----It's possible to rotate an object about its center by offsetting the origin to the center. Angles must be given in radians for rotation. One can also use a negative scaling factor to flip about its centerline. +---It's possible to rotate an object about its center by offsetting the origin to the center. Angles must be given in radians for rotation. One can also use a negative scaling factor to flip about its centerline. --- ---Note that the offsets are applied before rotation, scaling, or shearing; scaling and shearing are applied before rotation. --- @@ -455,7 +455,7 @@ function love.graphics.getPointSize() end --- ---@return string name # The name of the renderer, e.g. 'OpenGL' or 'OpenGL ES'. ---@return string version # The version of the renderer with some extra driver-dependent version info, e.g. '2.1 INTEL-8.10.44'. ----@return string vendor # The name of the graphics card vendor, e.g. 'Intel Inc'. +---@return string vendor # The name of the graphics card vendor, e.g. 'Intel Inc'. ---@return string device # The name of the graphics card, e.g. 'Intel HD Graphics 3000 OpenGL Engine'. function love.graphics.getRendererInfo() end @@ -490,7 +490,7 @@ function love.graphics.getShader() end function love.graphics.getStackDepth() end --- ----Gets performance-related rendering statistics. +---Gets performance-related rendering statistics. --- --- ---[Open in Browser](https://love2d.org/wiki/love.graphics.getStats) @@ -945,14 +945,12 @@ function love.graphics.present() end --- ---[Open in Browser](https://love2d.org/wiki/love.graphics.print) --- ----@overload fun(text: string, transform: love.Transform) ----@overload fun(text: string, font: love.Font, transform: love.Transform) ----@overload fun(text: number, transform: love.Transform) ----@overload fun(test: number, font: love.Font, transform: love.Transform) ---@overload fun(coloredtext: table, x?: number, y?: number, angle?: number, sx?: number, sy?: number, ox?: number, oy?: number, kx?: number, ky?: number) +---@overload fun(text: string, transform: love.Transform) ---@overload fun(coloredtext: table, transform: love.Transform) +---@overload fun(text: string, font: love.Font, transform: love.Transform) ---@overload fun(coloredtext: table, font: love.Font, transform: love.Transform) ----@param text string|number # The text to draw. +---@param text string # The text to draw. ---@param x? number # The position to draw the object (x-axis). ---@param y? number # The position to draw the object (y-axis). ---@param r? number # Orientation (radians). @@ -981,14 +979,11 @@ function love.graphics.print(text, x, y, r, sx, sy, ox, oy, kx, ky) end ---@overload fun(text: string, font: love.Font, x: number, y: number, limit: number, align?: love.AlignMode, r?: number, sx?: number, sy?: number, ox?: number, oy?: number, kx?: number, ky?: number) ---@overload fun(text: string, transform: love.Transform, limit: number, align?: love.AlignMode) ---@overload fun(text: string, font: love.Font, transform: love.Transform, limit: number, align?: love.AlignMode) ----@overload fun(text: number, font: love.Font, x: number, y: number, limit: number, align?: love.AlignMode, r?: number, sx?: number, sy?: number, ox?: number, oy?: number, kx?: number, ky?: number) ----@overload fun(text: number, transform: love.Transform, limit: number, align?: love.AlignMode) ----@overload fun(text: number, font: love.Font, transform: love.Transform, limit: number, align?: love.AlignMode) ---@overload fun(coloredtext: table, x: number, y: number, limit: number, align: love.AlignMode, angle?: number, sx?: number, sy?: number, ox?: number, oy?: number, kx?: number, ky?: number) ---@overload fun(coloredtext: table, font: love.Font, x: number, y: number, limit: number, align?: love.AlignMode, angle?: number, sx?: number, sy?: number, ox?: number, oy?: number, kx?: number, ky?: number) ---@overload fun(coloredtext: table, transform: love.Transform, limit: number, align?: love.AlignMode) ---@overload fun(coloredtext: table, font: love.Font, transform: love.Transform, limit: number, align?: love.AlignMode) ----@param text string|number # A text string. +---@param text string # A text string. ---@param x number # The position on the x-axis. ---@param y number # The position on the y-axis. ---@param limit number # Wrap the line after this many horizontal pixels. @@ -1252,7 +1247,7 @@ function love.graphics.setPointSize(size) end --- ---Sets or disables scissor. --- ----The scissor limits the drawing area to a specified rectangle. This affects all graphics calls, including love.graphics.clear. +---The scissor limits the drawing area to a specified rectangle. This affects all graphics calls, including love.graphics.clear. --- ---The dimensions of the scissor is unaffected by graphical transformations (translate, scale, ...). --- @@ -1341,7 +1336,7 @@ function love.graphics.transformPoint(globalX, globalY) end --- ---Translates the coordinate system in two dimensions. --- ----When this function is called with two numbers, dx, and dy, all the following drawing operations take effect as if their x and y coordinates were x+dx and y+dy. +---When this function is called with two numbers, dx, and dy, all the following drawing operations take effect as if their x and y coordinates were x+dx and y+dy. --- ---Scale and translate are not commutative operations, therefore, calling them in different orders will change the outcome. --- @@ -1443,7 +1438,8 @@ function Canvas:newImageData() end ---[Open in Browser](https://love2d.org/wiki/Canvas:renderTo) --- ---@param func function # A function performing drawing operations. -function Canvas:renderTo(func) end +---@vararg any # Additional arguments to call the function with. +function Canvas:renderTo(func, ...) end --- ---Superclass for all things that can be drawn on screen. This is an abstract type that can't be created directly. @@ -1562,7 +1558,7 @@ function Font:getLineHeight() end --- ---[Open in Browser](https://love2d.org/wiki/Font:getWidth) --- ----@param text string|number # A string or number. +---@param text string # A string. ---@return number width # The width of the text. function Font:getWidth(text) end @@ -2264,20 +2260,13 @@ function ParticleSystem:setBufferSize(size) end --- ---[Open in Browser](https://love2d.org/wiki/ParticleSystem:setColors) --- ----@overload fun(self: love.ParticleSystem, rgba1: table, rgba2: table, rgba8: table) +---@overload fun(self: love.ParticleSystem, rgba1: table, ...) ---@param r1 number # First color, red component (0-1). ---@param g1 number # First color, green component (0-1). ---@param b1 number # First color, blue component (0-1). ---@param a1? number # First color, alpha component (0-1). ----@param r2? number # Second color, red component (0-1). ----@param g2? number # Second color, green component (0-1). ----@param b2? number # Second color, blue component (0-1). ----@param a2? number # Second color, alpha component (0-1). ----@param r8? number # Eighth color, red component (0-1). ----@param g8? number # Eighth color, green component (0-1). ----@param b8? number # Eighth color, blue component (0-1). ----@param a8? number # Eighth color, alpha component (0-1). -function ParticleSystem:setColors(r1, g1, b1, a1, r2, g2, b2, a2, r8, g8, b8, a8) end +---@vararg number # Additional colors. +function ParticleSystem:setColors(r1, g1, b1, a1, ...) end --- ---Sets the direction the particles will be emitted in. @@ -2392,8 +2381,8 @@ function ParticleSystem:setPosition(x, y) end --- ---@overload fun(self: love.ParticleSystem, quads: table) ---@param quad1 love.Quad # The first Quad to use. ----@param quad2 love.Quad # The second Quad to use. -function ParticleSystem:setQuads(quad1, quad2) end +---@vararg love.Quad # Additional Quads to use. +function ParticleSystem:setQuads(quad1, ...) end --- ---Set the radial acceleration (away from the emitter). @@ -2571,8 +2560,8 @@ function Quad:getViewport() end ---@param y number # The top-left corner along the y-axis. ---@param w number # The width of the viewport. ---@param h number # The height of the viewport. ----@param sw number # The reference width, the width of the Image. (Must be greater than 0.) ----@param sh number # The reference height, the height of the Image. (Must be greater than 0.) +---@param sw? number # Optional new reference width, the width of the Texture. Must be greater than 0 if set. +---@param sh? number # Optional new reference height, the height of the Texture. Must be greater than 0 if set. function Quad:setViewport(x, y, w, h, sw, sh) end --- @@ -3834,7 +3823,7 @@ function Video:tell() end --- ---@alias love.SpriteBatchUsage --- ----The object's data will change occasionally during its lifetime. +---The object's data will change occasionally during its lifetime. --- ---| "dynamic" --- diff --git a/library/love/math.lua b/library/love/math.lua index 48a444e7..28c4e8bd 100644 --- a/library/love/math.lua +++ b/library/love/math.lua @@ -92,7 +92,7 @@ function love.math.getRandomState() end --- ---[Open in Browser](https://love2d.org/wiki/love.math.isConvex) --- ----@overload fun(x1: number, y1: number, x2: number, y2: number, x3: number, y3: number):boolean +---@overload fun(x1: number, y1: number, x2: number, y2: number, ...):boolean ---@param vertices table # The vertices of the polygon as a table in the form of {x1, y1, x2, y2, x3, y3, ...}. ---@return boolean convex # Whether the given polygon is convex. function love.math.isConvex(vertices) end @@ -127,7 +127,7 @@ function love.math.linearToGamma(lr, lg, lb) end --- ---[Open in Browser](https://love2d.org/wiki/love.math.newBezierCurve) --- ----@overload fun(x1: number, y1: number, x2: number, y2: number, x3: number, y3: number):love.BezierCurve +---@overload fun(x1: number, y1: number, x2: number, y2: number, ...):love.BezierCurve ---@param vertices table # The vertices of the control polygon as a table in the form of {x1, y1, x2, y2, x3, y3, ...}. ---@return love.BezierCurve curve # A Bézier curve object. function love.math.newBezierCurve(vertices) end @@ -613,25 +613,7 @@ function Transform:scale(sx, sy) end ---@param e4_3 number # The third column of the fourth row of the matrix. ---@param e4_4 number # The fourth column of the fourth row of the matrix. ---@return love.Transform transform # The Transform object the method was called on. Allows easily chaining Transform methods. -function Transform:setMatrix( - e1_1, - e1_2, - e1_3, - e1_4, - e2_1, - e2_2, - e2_3, - e2_4, - e3_1, - e3_2, - e3_3, - e3_4, - e4_1, - e4_2, - e4_3, - e4_4 -) -end +function Transform:setMatrix(e1_1, e1_2, e1_3, e1_4, e2_1, e2_2, e2_3, e2_4, e3_1, e3_2, e3_3, e3_4, e4_1, e4_2, e4_3, e4_4) end --- ---Resets the Transform to the specified transformation parameters. diff --git a/library/love/mouse.lua b/library/love/mouse.lua index 97df5ac2..5e5ff60b 100644 --- a/library/love/mouse.lua +++ b/library/love/mouse.lua @@ -49,7 +49,7 @@ function love.mouse.getRelativeMode() end --- ---[Open in Browser](https://love2d.org/wiki/love.mouse.getSystemCursor) --- ----@param ctype love.CursorType # The type of system cursor to get. +---@param ctype love.CursorType # The type of system cursor to get. ---@return love.Cursor cursor # The Cursor object representing the system cursor type. function love.mouse.getSystemCursor(ctype) end @@ -85,7 +85,7 @@ function love.mouse.isCursorSupported() end --- ---Checks whether a certain mouse button is down. --- ----This function does not detect mouse wheel scrolling; you must use the love.wheelmoved (or love.mousepressed in version 0.9.2 and older) callback for that. +---This function does not detect mouse wheel scrolling; you must use the love.wheelmoved (or love.mousepressed in version 0.9.2 and older) callback for that. --- --- ---[Open in Browser](https://love2d.org/wiki/love.mouse.isDown) diff --git a/library/love/physics.lua b/library/love/physics.lua index a2eebd2f..0c3d9f92 100644 --- a/library/love/physics.lua +++ b/library/love/physics.lua @@ -40,11 +40,11 @@ function love.physics.getMeter() end --- ---Creates a new body. --- ----There are three types of bodies. +---There are three types of bodies. --- ----* Static bodies do not move, have a infinite mass, and can be used for level boundaries. +---* Static bodies do not move, have a infinite mass, and can be used for level boundaries. --- ----* Dynamic bodies are the main actors in the simulation, they collide with everything. +---* Dynamic bodies are the main actors in the simulation, they collide with everything. --- ---* Kinematic bodies do not react to forces and only collide with dynamic bodies. --- @@ -184,7 +184,7 @@ function love.physics.newMotorJoint(body1, body2, correctionFactor) end --- ---This joint actually connects the body to a fixed point in the world. To make it follow the mouse, the fixed point must be updated every timestep (example below). --- ----The advantage of using a MouseJoint instead of just changing a body position directly is that collisions and reactions to other joints are handled by the physics engine. +---The advantage of using a MouseJoint instead of just changing a body position directly is that collisions and reactions to other joints are handled by the physics engine. --- --- ---[Open in Browser](https://love2d.org/wiki/love.physics.newMouseJoint) @@ -260,7 +260,7 @@ function love.physics.newPrismaticJoint(body1, body2, x, y, ax, ay, collideConne function love.physics.newPulleyJoint(body1, body2, gx1, gy1, gx2, gy2, x1, y1, x2, y2, ratio, collideConnected) end --- ----Shorthand for creating rectangular PolygonShapes. +---Shorthand for creating rectangular PolygonShapes. --- ---By default, the local origin is located at the '''center''' of the rectangle as opposed to the top left for graphics. --- @@ -409,7 +409,7 @@ function Body:applyForce(fx, fy) end --- ---An impulse pushes a body in a direction. A body with with a larger mass will react less. The reaction does '''not''' depend on the timestep, and is equivalent to applying a force continuously for 1 second. Impulses are best used to give a single push to a body. For a continuous push to a body it is better to use Body:applyForce. --- ----If the position to apply the impulse is not given, it will act on the center of mass of the body. The part of the impulse not directed towards the center of mass will cause the body to spin (and depends on the rotational inertia). +---If the position to apply the impulse is not given, it will act on the center of mass of the body. The part of the impulse not directed towards the center of mass will cause the body to spin (and depends on the rotational inertia). --- ---Note that the impulse components and position must be given in world coordinates. --- @@ -897,7 +897,7 @@ function Body:setActive(active) end --- ---A value of 0 radians will mean 'looking to the right'. Although radians increase counter-clockwise, the y axis points down so it becomes ''clockwise'' from our point of view. --- ----It is possible to cause a collision with another body by changing its angle. +---It is possible to cause a collision with another body by changing its angle. --- --- ---[Open in Browser](https://love2d.org/wiki/Body:setAngle) @@ -923,7 +923,7 @@ function Body:setAngularDamping(damping) end --- ---The angular velocity is the ''rate of change of angle over time''. --- ----This function will not accumulate anything; any impulses previously applied since the last call to World:update will be lost. +---This function will not accumulate anything; any impulses previously applied since the last call to World:update will be lost. --- --- ---[Open in Browser](https://love2d.org/wiki/Body:setAngularVelocity) @@ -962,7 +962,7 @@ function Body:setBullet(status) end --- ---Set whether a body has fixed rotation. --- ----Bodies with fixed rotation don't vary the speed at which they rotate. Calling this function causes the mass to be reset. +---Bodies with fixed rotation don't vary the speed at which they rotate. Calling this function causes the mass to be reset. --- --- ---[Open in Browser](https://love2d.org/wiki/Body:setFixedRotation) @@ -1095,7 +1095,7 @@ function Body:setUserData(value) end --- ---Set the x position of the body. --- ----This function cannot wake up the body. +---This function cannot wake up the body. --- --- ---[Open in Browser](https://love2d.org/wiki/Body:setX) @@ -1106,7 +1106,7 @@ function Body:setX(x) end --- ---Set the y position of the body. --- ----This function cannot wake up the body. +---This function cannot wake up the body. --- --- ---[Open in Browser](https://love2d.org/wiki/Body:setY) @@ -1916,7 +1916,7 @@ local Joint = {} --- ---Explicitly destroys the Joint. An error will occur if you attempt to use the object after calling this function. --- ----In 0.7.2, when you don't have time to wait for garbage collection, this function +---In 0.7.2, when you don't have time to wait for garbage collection, this function --- ---may be used to free the object immediately. --- @@ -2663,7 +2663,7 @@ function RopeJoint:setMaxLength(maxLength) end --- ---Shapes are solid 2d geometrical objects which handle the mass and collision of a Body in love.physics. --- ----Shapes are attached to a Body via a Fixture. The Shape object is copied when this happens. +---Shapes are attached to a Body via a Fixture. The Shape object is copied when this happens. --- ---The Shape's position is relative to the position of the Body it has been attached to. --- @@ -2974,7 +2974,7 @@ function WheelJoint:setSpringFrequency(freq) end local World = {} --- ----Destroys the world, taking all bodies, joints, fixtures and their shapes with it. +---Destroys the world, taking all bodies, joints, fixtures and their shapes with it. --- ---An error will occur if you attempt to use any of the destroyed objects after calling this function. --- @@ -3111,7 +3111,7 @@ function World:isSleepingAllowed() end function World:queryBoundingBox(topLeftX, topLeftY, bottomRightX, bottomRightY, callback) end --- ----Casts a ray and calls a function for each fixtures it intersects. +---Casts a ray and calls a function for each fixtures it intersects. --- --- ---[Open in Browser](https://love2d.org/wiki/World:rayCast) @@ -3193,7 +3193,7 @@ function World:translateOrigin(x, y) end function World:update(dt, velocityiterations, positioniterations) end --- ----The types of a Body. +---The types of a Body. --- --- ---[Open in Browser](https://love2d.org/wiki/BodyType) diff --git a/library/love/thread.lua b/library/love/thread.lua index 0b903080..523f593b 100644 --- a/library/love/thread.lua +++ b/library/love/thread.lua @@ -118,10 +118,9 @@ function Channel:peek() end ---[Open in Browser](https://love2d.org/wiki/Channel:performAtomic) --- ---@param func function # The function to call, the form of function(channel, arg1, arg2, ...) end. The Channel is passed as the first argument to the function when it is called. ----@param arg1 any # Additional arguments that the given function will receive when it is called. ---@vararg any # Additional arguments that the given function will receive when it is called. ---@return any ret1 # The first return value of the given function (if any.) -function Channel:performAtomic(func, arg1, ...) end +function Channel:performAtomic(func, ...) end --- ---Retrieves the value of a Channel message and removes it from the message queue. diff --git a/library/love/window.lua b/library/love/window.lua index fa72a2a4..740385b2 100644 --- a/library/love/window.lua +++ b/library/love/window.lua @@ -106,7 +106,7 @@ function love.window.getFullscreen() end ---[Open in Browser](https://love2d.org/wiki/love.window.getFullscreenModes) --- ---@param displayindex? number # The index of the display, if multiple monitors are available. ----@return table modes # A table of width/height pairs. (Note that this may not be in order.) +---@return {width: number, height: number} modes # A table of width/height pairs. (Note that this may not be in order.) function love.window.getFullscreenModes(displayindex) end --- @@ -313,7 +313,7 @@ function love.window.setIcon(imagedata) end --- ---Sets the display mode and properties of the window. --- ----If width or height is 0, setMode will use the width and height of the desktop. +---If width or height is 0, setMode will use the width and height of the desktop. --- ---Changing the display mode may have side effects: for example, canvases will be cleared and values sent to shaders with canvases beforehand or re-draw to them afterward if you need to. --- @@ -391,7 +391,7 @@ function love.window.toPixels(value) end --- ---Sets the display mode and properties of the window, without modifying unspecified properties. --- ----If width or height is 0, updateMode will use the width and height of the desktop. +---If width or height is 0, updateMode will use the width and height of the desktop. --- ---Changing the display mode may have side effects: for example, canvases will be cleared. Make sure to save the contents of canvases beforehand or re-draw to them afterward if you need to. --- From 4f433d0d0ab678af39fe8116ea8cce33a1947b66 Mon Sep 17 00:00:00 2001 From: Luke100000 Date: Tue, 3 Dec 2024 18:35:48 +0100 Subject: [PATCH 3/4] Updated meta files --- library/love/audio.lua | 8 ++++---- library/love/filesystem.lua | 2 +- library/love/graphics.lua | 10 +++++----- library/love/joystick.lua | 2 +- library/love/math.lua | 8 ++++---- library/love/physics.lua | 12 ++++++------ library/love/touch.lua | 2 +- 7 files changed, 22 insertions(+), 22 deletions(-) diff --git a/library/love/audio.lua b/library/love/audio.lua index 8043ac05..dce97898 100644 --- a/library/love/audio.lua +++ b/library/love/audio.lua @@ -15,7 +15,7 @@ love.audio = {} --- ---[Open in Browser](https://love2d.org/wiki/love.audio.getActiveEffects) --- ----@return table effects # The list of the names of the currently enabled effects. +---@return string[] effects # The list of the names of the currently enabled effects. function love.audio.getActiveEffects() end --- @@ -108,7 +108,7 @@ function love.audio.getPosition() end --- ---[Open in Browser](https://love2d.org/wiki/love.audio.getRecordingDevices) --- ----@return table devices # The list of connected recording devices. +---@return love.RecordingDevice[] devices # The list of connected recording devices. function love.audio.getRecordingDevices() end --- @@ -178,7 +178,7 @@ function love.audio.newSource(filename, type) end --- ---@overload fun(source: love.Source, ...) ---@overload fun(sources: table) ----@return table Sources # A table containing a list of Sources that were paused by this call. +---@return love.Source[] Sources # A table containing a list of Sources that were paused by this call. function love.audio.pause() end --- @@ -416,7 +416,7 @@ function Source:clone() end --- ---[Open in Browser](https://love2d.org/wiki/Source:getActiveEffects) --- ----@return table effects # A list of the source's active effect names. +---@return string[] effects # A list of the source's active effect names. function Source:getActiveEffects() end --- diff --git a/library/love/filesystem.lua b/library/love/filesystem.lua index 093f3322..8d6c7c44 100644 --- a/library/love/filesystem.lua +++ b/library/love/filesystem.lua @@ -76,7 +76,7 @@ function love.filesystem.getCRequirePath() end --- ---@overload fun(dir: string, callback: function):table ---@param dir string # The directory. ----@return table files # A sequence with the names of all files and subdirectories as strings. +---@return string[] files # A sequence with the names of all files and subdirectories as strings. function love.filesystem.getDirectoryItems(dir) end --- diff --git a/library/love/graphics.lua b/library/love/graphics.lua index ffc78418..87cd644c 100644 --- a/library/love/graphics.lua +++ b/library/love/graphics.lua @@ -1573,7 +1573,7 @@ function Font:getWidth(text) end ---@param text string # The text that will be wrapped. ---@param wraplimit number # The maximum width in pixels of each line that ''text'' is allowed before wrapping. ---@return number width # The maximum width of the wrapped text. ----@return table wrappedtext # A sequence containing each line of text that was wrapped. +---@return string[] wrappedtext # A sequence containing each line of text that was wrapped. function Font:getWrap(text, wraplimit) end --- @@ -1788,7 +1788,7 @@ function Mesh:getVertexFormat() end --- ---[Open in Browser](https://love2d.org/wiki/Mesh:getVertexMap) --- ----@return table map # A table containing the list of vertex indices used when drawing. +---@return number[] map # A table containing the list of vertex indices used when drawing. function Mesh:getVertexMap() end --- @@ -2078,7 +2078,7 @@ function ParticleSystem:getPosition() end --- ---[Open in Browser](https://love2d.org/wiki/ParticleSystem:getQuads) --- ----@return table quads # A table containing the Quads used. +---@return love.Quad[] quads # A table containing the Quads used. function ParticleSystem:getQuads() end --- @@ -2652,8 +2652,8 @@ function Shader:send(name, number, ...) end ---[Open in Browser](https://love2d.org/wiki/Shader:sendColor) --- ---@param name string # The name of the color extern variable to send to in the shader. ----@param color table # A table with red, green, blue, and optional alpha color components in the range of 1 to send to the extern as a vector. ----@vararg table # Additional colors to send in case the extern is an array. All colors need to be of the same size (e.g. only vec3's). +---@param color number[] # A table with red, green, blue, and optional alpha color components in the range of 1 to send to the extern as a vector. +---@vararg number[] # Additional colors to send in case the extern is an array. All colors need to be of the same size (e.g. only vec3's). function Shader:sendColor(name, color, ...) end --- diff --git a/library/love/joystick.lua b/library/love/joystick.lua index 039674f1..9bdd8a97 100644 --- a/library/love/joystick.lua +++ b/library/love/joystick.lua @@ -36,7 +36,7 @@ function love.joystick.getJoystickCount() end --- ---[Open in Browser](https://love2d.org/wiki/love.joystick.getJoysticks) --- ----@return table joysticks # The list of currently connected Joysticks. +---@return love.Joystick[] joysticks # The list of currently connected Joysticks. function love.joystick.getJoysticks() end --- diff --git a/library/love/math.lua b/library/love/math.lua index 28c4e8bd..d0c594a3 100644 --- a/library/love/math.lua +++ b/library/love/math.lua @@ -93,7 +93,7 @@ function love.math.getRandomState() end ---[Open in Browser](https://love2d.org/wiki/love.math.isConvex) --- ---@overload fun(x1: number, y1: number, x2: number, y2: number, ...):boolean ----@param vertices table # The vertices of the polygon as a table in the form of {x1, y1, x2, y2, x3, y3, ...}. +---@param vertices number[] # The vertices of the polygon as a table in the form of {x1, y1, x2, y2, x3, y3, ...}. ---@return boolean convex # Whether the given polygon is convex. function love.math.isConvex(vertices) end @@ -128,7 +128,7 @@ function love.math.linearToGamma(lr, lg, lb) end ---[Open in Browser](https://love2d.org/wiki/love.math.newBezierCurve) --- ---@overload fun(x1: number, y1: number, x2: number, y2: number, ...):love.BezierCurve ----@param vertices table # The vertices of the control polygon as a table in the form of {x1, y1, x2, y2, x3, y3, ...}. +---@param vertices number[] # The vertices of the control polygon as a table in the form of {x1, y1, x2, y2, x3, y3, ...}. ---@return love.BezierCurve curve # A Bézier curve object. function love.math.newBezierCurve(vertices) end @@ -330,7 +330,7 @@ function BezierCurve:removeControlPoint(index) end ---[Open in Browser](https://love2d.org/wiki/BezierCurve:render) --- ---@param depth? number # Number of recursive subdivision steps. ----@return table coordinates # List of x,y-coordinate pairs of points on the curve. +---@return number[] coordinates # List of x,y-coordinate pairs of points on the curve. function BezierCurve:render(depth) end --- @@ -346,7 +346,7 @@ function BezierCurve:render(depth) end ---@param startpoint number # The starting point along the curve. Must be between 0 and 1. ---@param endpoint number # The end of the segment to render. Must be between 0 and 1. ---@param depth? number # Number of recursive subdivision steps. ----@return table coordinates # List of x,y-coordinate pairs of points on the specified part of the curve. +---@return number[] coordinates # List of x,y-coordinate pairs of points on the specified part of the curve. function BezierCurve:renderSegment(startpoint, endpoint, depth) end --- diff --git a/library/love/physics.lua b/library/love/physics.lua index 0c3d9f92..10990f25 100644 --- a/library/love/physics.lua +++ b/library/love/physics.lua @@ -491,7 +491,7 @@ function Body:getAngularVelocity() end --- ---[Open in Browser](https://love2d.org/wiki/Body:getContacts) --- ----@return table contacts # A list with all contacts associated with the Body. +---@return love.Contact[] contacts # A list with all contacts associated with the Body. function Body:getContacts() end --- @@ -500,7 +500,7 @@ function Body:getContacts() end --- ---[Open in Browser](https://love2d.org/wiki/Body:getFixtures) --- ----@return table fixtures # A sequence with all fixtures. +---@return love.Fixture[] fixtures # A sequence with all fixtures. function Body:getFixtures() end --- @@ -529,7 +529,7 @@ function Body:getInertia() end --- ---[Open in Browser](https://love2d.org/wiki/Body:getJoints) --- ----@return table joints # A sequence with the Joints attached to the Body. +---@return love.Joint[] joints # A sequence with the Joints attached to the Body. function Body:getJoints() end --- @@ -2989,7 +2989,7 @@ function World:destroy() end --- ---[Open in Browser](https://love2d.org/wiki/World:getBodies) --- ----@return table bodies # A sequence with all bodies. +---@return love.Body[] bodies # A sequence with all bodies. function World:getBodies() end --- @@ -3037,7 +3037,7 @@ function World:getContactFilter() end --- ---[Open in Browser](https://love2d.org/wiki/World:getContacts) --- ----@return table contacts # A sequence with all Contacts. +---@return love.Contact[] contacts # A sequence with all Contacts. function World:getContacts() end --- @@ -3065,7 +3065,7 @@ function World:getJointCount() end --- ---[Open in Browser](https://love2d.org/wiki/World:getJoints) --- ----@return table joints # A sequence with all joints. +---@return love.Joint[] joints # A sequence with all joints. function World:getJoints() end --- diff --git a/library/love/touch.lua b/library/love/touch.lua index bacf8e30..a1501bcd 100644 --- a/library/love/touch.lua +++ b/library/love/touch.lua @@ -36,5 +36,5 @@ function love.touch.getPressure(id) end --- ---[Open in Browser](https://love2d.org/wiki/love.touch.getTouches) --- ----@return table touches # A list of active touch-press id values, which can be used with love.touch.getPosition. +---@return lightuserdata[] touches # A list of active touch-press id values, which can be used with love.touch.getPosition. function love.touch.getTouches() end From 50aa8549286ac2a274f6cd5fc4a682d595769f74 Mon Sep 17 00:00:00 2001 From: Luke100000 Date: Tue, 3 Dec 2024 18:54:31 +0100 Subject: [PATCH 4/4] Added stylua --- library/love/audio.lua | 2 +- library/love/filesystem.lua | 6 +++--- library/love/graphics.lua | 12 ++++++------ library/love/math.lua | 20 +++++++++++++++++++- library/love/mouse.lua | 4 ++-- library/love/physics.lua | 32 ++++++++++++++++---------------- library/love/window.lua | 4 ++-- update.sh | 5 +++++ 8 files changed, 54 insertions(+), 31 deletions(-) diff --git a/library/love/audio.lua b/library/love/audio.lua index dce97898..13a08f02 100644 --- a/library/love/audio.lua +++ b/library/love/audio.lua @@ -750,7 +750,7 @@ function Source:setPosition(x, y, z) end --- ---Sets whether the Source's position, velocity, direction, and cone angles are relative to the listener, or absolute. --- ----By default, all sources are absolute and therefore relative to the origin of love's coordinate system 0, 0. Only absolute sources are affected by the position of the listener. Please note that positional audio only works for mono (i.e. non-stereo) sources. +---By default, all sources are absolute and therefore relative to the origin of love's coordinate system 0, 0. Only absolute sources are affected by the position of the listener. Please note that positional audio only works for mono (i.e. non-stereo) sources. --- --- ---[Open in Browser](https://love2d.org/wiki/Source:setRelative) diff --git a/library/love/filesystem.lua b/library/love/filesystem.lua index 8d6c7c44..94bfd488 100644 --- a/library/love/filesystem.lua +++ b/library/love/filesystem.lua @@ -80,7 +80,7 @@ function love.filesystem.getCRequirePath() end function love.filesystem.getDirectoryItems(dir) end --- ----Gets the write directory name for your game. +---Gets the write directory name for your game. --- ---Note that this only returns the name of the folder to store your files in, not the full path. --- @@ -239,7 +239,7 @@ function love.filesystem.load(name) end function love.filesystem.mount(archive, mountpoint, appendToPath) end --- ----Creates a new File object. +---Creates a new File object. --- ---It needs to be opened before it can be accessed. --- @@ -303,7 +303,7 @@ function love.filesystem.remove(name) end function love.filesystem.setCRequirePath(paths) end --- ----Sets the write directory for your game. +---Sets the write directory for your game. --- ---Note that you can only set the name of the folder to store your files in, not the location. --- diff --git a/library/love/graphics.lua b/library/love/graphics.lua index 87cd644c..3ac2545d 100644 --- a/library/love/graphics.lua +++ b/library/love/graphics.lua @@ -107,7 +107,7 @@ function love.graphics.discard(discardcolor, discardstencil) end --- ---Objects are drawn relative to their local coordinate system. The origin is by default located at the top left corner of Image and Canvas. All scaling, shearing, and rotation arguments transform the object relative to that point. Also, the position of the origin can be specified on the screen coordinate system. --- ----It's possible to rotate an object about its center by offsetting the origin to the center. Angles must be given in radians for rotation. One can also use a negative scaling factor to flip about its centerline. +---It's possible to rotate an object about its center by offsetting the origin to the center. Angles must be given in radians for rotation. One can also use a negative scaling factor to flip about its centerline. --- ---Note that the offsets are applied before rotation, scaling, or shearing; scaling and shearing are applied before rotation. --- @@ -455,7 +455,7 @@ function love.graphics.getPointSize() end --- ---@return string name # The name of the renderer, e.g. 'OpenGL' or 'OpenGL ES'. ---@return string version # The version of the renderer with some extra driver-dependent version info, e.g. '2.1 INTEL-8.10.44'. ----@return string vendor # The name of the graphics card vendor, e.g. 'Intel Inc'. +---@return string vendor # The name of the graphics card vendor, e.g. 'Intel Inc'. ---@return string device # The name of the graphics card, e.g. 'Intel HD Graphics 3000 OpenGL Engine'. function love.graphics.getRendererInfo() end @@ -490,7 +490,7 @@ function love.graphics.getShader() end function love.graphics.getStackDepth() end --- ----Gets performance-related rendering statistics. +---Gets performance-related rendering statistics. --- --- ---[Open in Browser](https://love2d.org/wiki/love.graphics.getStats) @@ -1247,7 +1247,7 @@ function love.graphics.setPointSize(size) end --- ---Sets or disables scissor. --- ----The scissor limits the drawing area to a specified rectangle. This affects all graphics calls, including love.graphics.clear. +---The scissor limits the drawing area to a specified rectangle. This affects all graphics calls, including love.graphics.clear. --- ---The dimensions of the scissor is unaffected by graphical transformations (translate, scale, ...). --- @@ -1336,7 +1336,7 @@ function love.graphics.transformPoint(globalX, globalY) end --- ---Translates the coordinate system in two dimensions. --- ----When this function is called with two numbers, dx, and dy, all the following drawing operations take effect as if their x and y coordinates were x+dx and y+dy. +---When this function is called with two numbers, dx, and dy, all the following drawing operations take effect as if their x and y coordinates were x+dx and y+dy. --- ---Scale and translate are not commutative operations, therefore, calling them in different orders will change the outcome. --- @@ -3823,7 +3823,7 @@ function Video:tell() end --- ---@alias love.SpriteBatchUsage --- ----The object's data will change occasionally during its lifetime. +---The object's data will change occasionally during its lifetime. --- ---| "dynamic" --- diff --git a/library/love/math.lua b/library/love/math.lua index d0c594a3..8fd90c98 100644 --- a/library/love/math.lua +++ b/library/love/math.lua @@ -613,7 +613,25 @@ function Transform:scale(sx, sy) end ---@param e4_3 number # The third column of the fourth row of the matrix. ---@param e4_4 number # The fourth column of the fourth row of the matrix. ---@return love.Transform transform # The Transform object the method was called on. Allows easily chaining Transform methods. -function Transform:setMatrix(e1_1, e1_2, e1_3, e1_4, e2_1, e2_2, e2_3, e2_4, e3_1, e3_2, e3_3, e3_4, e4_1, e4_2, e4_3, e4_4) end +function Transform:setMatrix( + e1_1, + e1_2, + e1_3, + e1_4, + e2_1, + e2_2, + e2_3, + e2_4, + e3_1, + e3_2, + e3_3, + e3_4, + e4_1, + e4_2, + e4_3, + e4_4 +) +end --- ---Resets the Transform to the specified transformation parameters. diff --git a/library/love/mouse.lua b/library/love/mouse.lua index 5e5ff60b..97df5ac2 100644 --- a/library/love/mouse.lua +++ b/library/love/mouse.lua @@ -49,7 +49,7 @@ function love.mouse.getRelativeMode() end --- ---[Open in Browser](https://love2d.org/wiki/love.mouse.getSystemCursor) --- ----@param ctype love.CursorType # The type of system cursor to get. +---@param ctype love.CursorType # The type of system cursor to get. ---@return love.Cursor cursor # The Cursor object representing the system cursor type. function love.mouse.getSystemCursor(ctype) end @@ -85,7 +85,7 @@ function love.mouse.isCursorSupported() end --- ---Checks whether a certain mouse button is down. --- ----This function does not detect mouse wheel scrolling; you must use the love.wheelmoved (or love.mousepressed in version 0.9.2 and older) callback for that. +---This function does not detect mouse wheel scrolling; you must use the love.wheelmoved (or love.mousepressed in version 0.9.2 and older) callback for that. --- --- ---[Open in Browser](https://love2d.org/wiki/love.mouse.isDown) diff --git a/library/love/physics.lua b/library/love/physics.lua index 10990f25..e9118142 100644 --- a/library/love/physics.lua +++ b/library/love/physics.lua @@ -40,11 +40,11 @@ function love.physics.getMeter() end --- ---Creates a new body. --- ----There are three types of bodies. +---There are three types of bodies. --- ----* Static bodies do not move, have a infinite mass, and can be used for level boundaries. +---* Static bodies do not move, have a infinite mass, and can be used for level boundaries. --- ----* Dynamic bodies are the main actors in the simulation, they collide with everything. +---* Dynamic bodies are the main actors in the simulation, they collide with everything. --- ---* Kinematic bodies do not react to forces and only collide with dynamic bodies. --- @@ -184,7 +184,7 @@ function love.physics.newMotorJoint(body1, body2, correctionFactor) end --- ---This joint actually connects the body to a fixed point in the world. To make it follow the mouse, the fixed point must be updated every timestep (example below). --- ----The advantage of using a MouseJoint instead of just changing a body position directly is that collisions and reactions to other joints are handled by the physics engine. +---The advantage of using a MouseJoint instead of just changing a body position directly is that collisions and reactions to other joints are handled by the physics engine. --- --- ---[Open in Browser](https://love2d.org/wiki/love.physics.newMouseJoint) @@ -260,7 +260,7 @@ function love.physics.newPrismaticJoint(body1, body2, x, y, ax, ay, collideConne function love.physics.newPulleyJoint(body1, body2, gx1, gy1, gx2, gy2, x1, y1, x2, y2, ratio, collideConnected) end --- ----Shorthand for creating rectangular PolygonShapes. +---Shorthand for creating rectangular PolygonShapes. --- ---By default, the local origin is located at the '''center''' of the rectangle as opposed to the top left for graphics. --- @@ -409,7 +409,7 @@ function Body:applyForce(fx, fy) end --- ---An impulse pushes a body in a direction. A body with with a larger mass will react less. The reaction does '''not''' depend on the timestep, and is equivalent to applying a force continuously for 1 second. Impulses are best used to give a single push to a body. For a continuous push to a body it is better to use Body:applyForce. --- ----If the position to apply the impulse is not given, it will act on the center of mass of the body. The part of the impulse not directed towards the center of mass will cause the body to spin (and depends on the rotational inertia). +---If the position to apply the impulse is not given, it will act on the center of mass of the body. The part of the impulse not directed towards the center of mass will cause the body to spin (and depends on the rotational inertia). --- ---Note that the impulse components and position must be given in world coordinates. --- @@ -897,7 +897,7 @@ function Body:setActive(active) end --- ---A value of 0 radians will mean 'looking to the right'. Although radians increase counter-clockwise, the y axis points down so it becomes ''clockwise'' from our point of view. --- ----It is possible to cause a collision with another body by changing its angle. +---It is possible to cause a collision with another body by changing its angle. --- --- ---[Open in Browser](https://love2d.org/wiki/Body:setAngle) @@ -923,7 +923,7 @@ function Body:setAngularDamping(damping) end --- ---The angular velocity is the ''rate of change of angle over time''. --- ----This function will not accumulate anything; any impulses previously applied since the last call to World:update will be lost. +---This function will not accumulate anything; any impulses previously applied since the last call to World:update will be lost. --- --- ---[Open in Browser](https://love2d.org/wiki/Body:setAngularVelocity) @@ -962,7 +962,7 @@ function Body:setBullet(status) end --- ---Set whether a body has fixed rotation. --- ----Bodies with fixed rotation don't vary the speed at which they rotate. Calling this function causes the mass to be reset. +---Bodies with fixed rotation don't vary the speed at which they rotate. Calling this function causes the mass to be reset. --- --- ---[Open in Browser](https://love2d.org/wiki/Body:setFixedRotation) @@ -1095,7 +1095,7 @@ function Body:setUserData(value) end --- ---Set the x position of the body. --- ----This function cannot wake up the body. +---This function cannot wake up the body. --- --- ---[Open in Browser](https://love2d.org/wiki/Body:setX) @@ -1106,7 +1106,7 @@ function Body:setX(x) end --- ---Set the y position of the body. --- ----This function cannot wake up the body. +---This function cannot wake up the body. --- --- ---[Open in Browser](https://love2d.org/wiki/Body:setY) @@ -1916,7 +1916,7 @@ local Joint = {} --- ---Explicitly destroys the Joint. An error will occur if you attempt to use the object after calling this function. --- ----In 0.7.2, when you don't have time to wait for garbage collection, this function +---In 0.7.2, when you don't have time to wait for garbage collection, this function --- ---may be used to free the object immediately. --- @@ -2663,7 +2663,7 @@ function RopeJoint:setMaxLength(maxLength) end --- ---Shapes are solid 2d geometrical objects which handle the mass and collision of a Body in love.physics. --- ----Shapes are attached to a Body via a Fixture. The Shape object is copied when this happens. +---Shapes are attached to a Body via a Fixture. The Shape object is copied when this happens. --- ---The Shape's position is relative to the position of the Body it has been attached to. --- @@ -2974,7 +2974,7 @@ function WheelJoint:setSpringFrequency(freq) end local World = {} --- ----Destroys the world, taking all bodies, joints, fixtures and their shapes with it. +---Destroys the world, taking all bodies, joints, fixtures and their shapes with it. --- ---An error will occur if you attempt to use any of the destroyed objects after calling this function. --- @@ -3111,7 +3111,7 @@ function World:isSleepingAllowed() end function World:queryBoundingBox(topLeftX, topLeftY, bottomRightX, bottomRightY, callback) end --- ----Casts a ray and calls a function for each fixtures it intersects. +---Casts a ray and calls a function for each fixtures it intersects. --- --- ---[Open in Browser](https://love2d.org/wiki/World:rayCast) @@ -3193,7 +3193,7 @@ function World:translateOrigin(x, y) end function World:update(dt, velocityiterations, positioniterations) end --- ----The types of a Body. +---The types of a Body. --- --- ---[Open in Browser](https://love2d.org/wiki/BodyType) diff --git a/library/love/window.lua b/library/love/window.lua index 740385b2..79d9758a 100644 --- a/library/love/window.lua +++ b/library/love/window.lua @@ -313,7 +313,7 @@ function love.window.setIcon(imagedata) end --- ---Sets the display mode and properties of the window. --- ----If width or height is 0, setMode will use the width and height of the desktop. +---If width or height is 0, setMode will use the width and height of the desktop. --- ---Changing the display mode may have side effects: for example, canvases will be cleared and values sent to shaders with canvases beforehand or re-draw to them afterward if you need to. --- @@ -391,7 +391,7 @@ function love.window.toPixels(value) end --- ---Sets the display mode and properties of the window, without modifying unspecified properties. --- ----If width or height is 0, updateMode will use the width and height of the desktop. +---If width or height is 0, updateMode will use the width and height of the desktop. --- ---Changing the display mode may have side effects: for example, canvases will be cleared. Make sure to save the contents of canvases beforehand or re-draw to them afterward if you need to. --- diff --git a/update.sh b/update.sh index f2ad19ed..564d122b 100755 --- a/update.sh +++ b/update.sh @@ -17,6 +17,11 @@ cd .. || exit rm -r library cp -r lua-language-server/meta/3rd/love2d/library/ library +# Install and run formatter +cargo install stylua --features luajit +export PATH="~/.cargo/bin:$PATH" +stylua library + # Commit changes git add library git commit -m "Updated meta files"