diff --git a/src/components/layout/Footer.astro b/src/components/layout/Footer.astro index 2cd5477..aa0f780 100644 --- a/src/components/layout/Footer.astro +++ b/src/components/layout/Footer.astro @@ -20,13 +20,7 @@ const { class: className } = Astro.props;
  • - Development guide -
  • -
  • - Wiki -
  • -
  • - Translate + Contributing guide
  • I want to... + +- [Contribute features/fixes](#contributing-code) +- [Create LuaCATS annotations](#contributing-luacats-annotations) +- [Help translate to another language](/wiki/translations) +- [Improve this wiki](https://github.com/LuaLS/LuaLS.github.io/blob/main/docs/CONTRIBUTING.md) + +> Is there something else I can do? + +- [Star the repository](https://github.com/LuaLS/lua-language-server) if you find the project helpful +- Spread the word! +- You can [sponsor](https://github.com/LuaLS/lua-language-server/issues/484) the project + +## Contributing code + +If you're familiar with Lua, you can grab the [source code](https://github.com/LuaLS/lua-language-server) and dive in. There are additional wiki articles that go more in-depth on [building from source](/wiki/build) and [developing](/wiki/developing). An overview of the project's file structure can be found [on the developing page](/wiki/developing#file-structure). + +We don't have a strict git workflow that needs to be followed. When you have some changes ready to merge, [open a pull request](https://github.com/LuaLS/lua-language-server/pulls). If you need some help, feel free to open a draft pull request – although please be patient and keep in mind that the team is very small. + +When making changes to the language server, please make sure to add an entry to the project's [changelog](https://github.com/LuaLS/lua-language-server/blob/master/changelog.md) file, so it is documented and advertised to users. + +## Contributing LuaCATS Annotations + +The Lua Language Server implements a system for defining and documenting code called LuaCATS (Lua Comment And Type System). You can contribute to our ecosystem by writing [LuaCATS annotations](/wiki/annotations) for widely used Lua libraries. These can help give users out-of-the-box autocompletion and type checking for the library. This is done by creating [definition files](/wiki/definition-files) that can then be included in an [addon](/wiki/addons) and distributed using the [addon manager](/wiki/addons#addon-manager). + +You can browse annotations maintained by the community in the [LuaCATS organization](https://github.com/LuaCATS). diff --git a/src/content/wiki/developing.mdx b/src/content/wiki/developing.mdx index 03fc7f4..ca9133e 100644 --- a/src/content/wiki/developing.mdx +++ b/src/content/wiki/developing.mdx @@ -8,23 +8,50 @@ import Remark from "~/components/common/Remark.astro"; import Accordion from "~/components/common/Accordion.astro"; import FileTreeItem from "~/components/common/FileTreeItem.astro"; -import windowsImg from "~/assets/images/windows.svg" -import macImg from "~/assets/images/mac.svg" -import linuxImg from "~/assets/images/linux.svg" +import windowsImg from "~/assets/images/windows.svg"; +import macImg from "~/assets/images/mac.svg"; +import linuxImg from "~/assets/images/linux.svg"; Thank you for taking an interest in helping improve the language server! +## Overview + +The Lua Language Server is written, rather fittingly, in Lua. As a result of Lua being designed for embedding in other programs, its standard library is pretty basic. This means that in order for it to be run as a standalone program, with better io, threading, etc., it requires a runtime written in another language. The language server uses [bee.lua](https://github.com/actboy168/bee.lua) (C++) as its runtime. + +An advantage of Lua being an interpreted language is that the source files can be quickly edited and tested with no compile step needed, although hot-reloading is not supported (the server must be restarted). + ## Debugging -Debugging can be performed in a few ways. You can [do a quick `print()`](#quick-print), [write to the log file](#append-to-log-file), or [attach a debugger](#attach-debugger) to get all the info you need. +Debugging can be performed in a few ways: + +- [Print](#print) +- [Log](#append-to-log-file) +- [Debugger](#attach-debugger) -### Quick Print +### Print -You can quickly `print()` to the `OUTPUT` panel (Ctrl + Shift + U) in Visual Studio Code. +A quick call to the familiar `print()` will, as expected, write the given parameters out to `stdout`. When running the language server using Visual Studio Code, the output can be seen in the `OUTPUT` panel (Ctrl + Shift + U): ![outputPanel](https://user-images.githubusercontent.com/61925890/181308229-52b7e9b7-2893-429b-bca2-8386670df6b0.png) -Below is an example of how a [plugin](/wiki/plugins) can be debugged. +This allows for pretty quick and easy development entirely in VS Code by opening up the language server source: + + +
    + `%USERPROFILE%\.vscode\extensions\sumneko.lua-VERSION\server` +
    +
    `~/.vscode/extensions/sumneko.lua-VERSION/server`
    +
    `~/.vscode/extensions/sumneko.lua-VERSION/server`
    +
    + +A [plugin](/wiki/plugins) can also be debugged quickly this way: ```Lua local util = require 'utility' @@ -35,9 +62,9 @@ function OnSetText(uri, text) end ``` -### Append to Log File +### Log -You can add an entry to the [log file](/wiki/FAQ#where-can-i-find-the-log-file). Below is an example of how a [plugin](/wiki/plugins) can be debugged. +You can add an entry to the [log file](/wiki/FAQ#where-can-i-find-the-log-file) using the levels `trace`, `debug`, `info`, `warn`, `error`, and `fatal`. Below is an example of how a [plugin](/wiki/plugins) can be debugged. ```Lua local util = require 'utility' @@ -48,14 +75,14 @@ function OnSetText(uri, text) end ``` -### Attach Debugger +### Debugger This is the most advanced method, but provides all kinds of useful info and is the most "proper" way to debug the language server. You will need two Visual Studio Code instances open: 1. The **Debug Host** - - This instance has the language server open which can be found in one of these locations: + - This instance has the language server open, which can be found in one of these locations: -
    `%USERPROFILE%\.vscode\extensions\sumneko.lua-VERSION\server`
    -
    `~/.vscode/extensions/sumneko.lua-VERSION/server`
    -
    `~/.vscode/extensions/sumneko.lua-VERSION/server`
    +
    + `%USERPROFILE%\.vscode\extensions\sumneko.lua-VERSION\server` +
    +
    + `~/.vscode/extensions/sumneko.lua-VERSION/server` +
    +
    + `~/.vscode/extensions/sumneko.lua-VERSION/server` +
    2. The **Debug Target** - This instance is where you will test the language server. It should have a folder opened where you can write Lua to test the various features of the language server and use it as normal. diff --git a/src/scss/main.scss b/src/scss/main.scss index f3ccc30..0048994 100644 --- a/src/scss/main.scss +++ b/src/scss/main.scss @@ -106,6 +106,12 @@ hr { border: 0.05em solid white; } +blockquote { + border-left: var(--link-color) 0.3em solid; + padding-left: 0.5em; + margin-left: 1em; +} + button { &:hover { cursor: pointer;