mirror of
https://github.com/pesde-pkg/tooling.git
synced 2025-04-21 12:23:56 +01:00
chore(bins): sync luau-lsp
README
This commit is contained in:
parent
0846ddf9d3
commit
d48dbdc6d5
1 changed files with 18 additions and 6 deletions
|
@ -10,15 +10,19 @@ Install the extension from the VSCode Marketplace or OpenVSX Registry:
|
|||
- OpenVSX Registry: https://open-vsx.org/extension/JohnnyMorganz/luau-lsp
|
||||
|
||||
Alternatively, check out [Getting Started for Language Server Clients](https://github.com/JohnnyMorganz/luau-lsp/blob/main/editors/README.md)
|
||||
to setup your own client for a different editor
|
||||
to setup your own client for a different editor.
|
||||
|
||||
A [Nightly Release](https://github.com/JohnnyMorganz/luau-lsp/actions/workflows/nightly.yml) runs every day with the latest changes on main.
|
||||
You can download the relevant release for your platform and manually install the `.vsix`.
|
||||
The nightly release builds with debug symbols and profiling instrumentation for debugging.
|
||||
|
||||
### For General Users
|
||||
|
||||
The language server should be immediately usable for general Luau code after installation.
|
||||
String require support is provided for module paths, using `require("module")`.
|
||||
The language server will start working immediately for general Luau code. There is built-in support
|
||||
for Luau's generalised [require-by-string semantics](https://rfcs.luau.org/new-require-by-string-semantics.html), using `require("./module")`.
|
||||
|
||||
Type definitions can be provided by configuring `luau-lsp.types.definitionFiles`, with corresponding
|
||||
documentation added using `luau-lsp.types.documentationFiles`.
|
||||
To provide global type definitions for a custom environment, specify `luau-lsp.types.definitionFiles`.
|
||||
Corresponding documentation is configured using `luau-lsp.types.documentationFiles`.
|
||||
|
||||
If you use Luau in a different environment and are interested in using the language server, or
|
||||
looking for any specific features, please get in touch!
|
||||
|
@ -42,7 +46,8 @@ The following settings are configurable for sourcemap generation:
|
|||
- `luau-lsp.sourcemap.sourcemapFile`: What sourcemap file to use (default: `sourcemap.json`)
|
||||
|
||||
If you do not use Rojo, you can still use the Luau Language Server, you just need to manually generate a `sourcemap.json`
|
||||
file for your particular project layout.
|
||||
file for your particular project layout. You can configure `luau-lsp.sourcemap.generatorCommand` to run a custom generator.
|
||||
If your generator does not support file watching, enable `luau-lsp.sourcemap.useVSCodeWatcher`.
|
||||
|
||||
> Note: in the diagnostics type checker, the types for DataModel (DM) instances will resolve to `any`. This is a current limitation to reduce false positives.
|
||||
> However, autocomplete and hover intellisense will correctly resolve the DM type.
|
||||
|
@ -58,6 +63,13 @@ The entry point for the analysis tool is `luau-lsp analyze`.
|
|||
|
||||
Install the binary and run `luau-lsp --help` for more information.
|
||||
|
||||
## Configuration
|
||||
|
||||
There are 2 types of configuration styles for the language server. General configuration is provided by `.luaurc` files,
|
||||
which allow you to configure language strictness, lints, and require aliases. More information is available in Luau's [RFC documentation](https://rfcs.luau.org/config-luaurc.html).
|
||||
|
||||
The second configuration style is specific to the language server. See `luau-lsp` in your editor's settings for more details.
|
||||
|
||||
## Supported Features
|
||||
|
||||
- [x] Diagnostics (incl. type errors)
|
||||
|
|
Loading…
Add table
Reference in a new issue