Skip to content

Commit db5c500

Browse files
committed
Update README
1 parent bbebd99 commit db5c500

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

README.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,12 @@ Install the extension from the VSCode Marketplace or OpenVSX Registry:
1313

1414
The language server should be immediately usable for general Luau code after installation.
1515
String require support is provided for module paths, using `require("module")`.
16-
Note that the file is searched **relative to the workspace root** (equivalent to the [command-line REPL](https://github.com/Roblox/luau#usage) `luau`).
16+
There are two options for resolving requires, which can be configured using `luau-lsp.require.mode`:
17+
`relativeToWorkspaceRoot` (the default - equivalent to the [command-line REPL](https://github.com/Roblox/luau#usage) `luau`)
18+
or `relativeToFile`.
1719

18-
Type definitions can be provided by configuring `luau-lsp.types.definitionFiles`.
20+
Type definitions can be provided by configuring `luau-lsp.types.definitionFiles`, with corresponding
21+
documentation added using `luau-lsp.types.documentationFiles`.
1922

2023
If there are specific features you require in the language server for your use case, feel free to open an issue.
2124

@@ -24,7 +27,7 @@ If there are specific features you require in the language server for your use c
2427
Rojo instance tree and requiring support is provided by default, and the language server should be able to directly emulate Studio.
2528
The extension will automatically populate the latest API types and documentation (which can be disabled by configuring `luau-lsp.types.roblox`).
2629

27-
To resolve your instance tree and provide module resolution, the language server uses Rojo sourcemaps.
30+
To resolve your instance tree and provide module resolution, the language server uses Rojo-style sourcemaps.
2831
The language server will automatically create a `sourcemap.json` in your workspace root on startup and whenever files are added/created/renamed.
2932

3033
It does this by running the `rojo sourcemap` command, hence Rojo 7.1.0+ must be available to execute in your workspace root.
@@ -34,10 +37,15 @@ Note, if you are using the VSCode extension on macOS, you need to configure the
3437

3538
By default we generate a sourcemap for a `default.project.json` project file. The name can be changed in extension settings, as well as whether non-script instances are included in the sourcemap (included by default). Autogeneration of sourcemaps can also be toggled completely on/off in settings - the server will instead just listen to manual changes to `sourcemap.json` files.
3639

40+
If you do not use Rojo, you can still use the Luau Language Server, you just need to manually generate a `sourcemap.json`
41+
file for your particular project layout.
42+
3743
> 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.
38-
> However, autocomplete and hover intellisense will correctly resolve the DM type. [Read more](https://github.com/JohnnyMorganz/luau-lsp/issues/83#issuecomment-1192865024)
44+
> However, autocomplete and hover intellisense will correctly resolve the DM type.
45+
> To enable this mode for diagnostics, set `luau-lsp.diagnostics.strictDatamodelTypes` (off by default).
46+
> [Read more](https://github.com/JohnnyMorganz/luau-lsp/issues/83#issuecomment-1192865024).
3947
40-
#### A companion Studio plugin is available to provide DataModel information for Instances which are not part of your Rojo build / filetree: [Plugin Marketplace](https://www.roblox.com/library/10913122509/Luau-Language-Server-Companion)
48+
**A companion Studio plugin is available to provide DataModel information for Instances which are not part of your Rojo build / filetree: [Plugin Marketplace](https://www.roblox.com/library/10913122509/Luau-Language-Server-Companion)**
4149

4250
## Standalone
4351

@@ -69,9 +77,10 @@ If you use Luau in a different environment and are interested in using the langu
6977
- [x] Document Symbol
7078
- [x] Color Provider
7179
- [x] Rename
72-
- [ ] Call Hierarchy
7380
- [x] Semantic Tokens
7481
- [x] Inlay Hints
82+
- [x] Documentation Comments ([Moonwave Style](https://github.com/evaera/moonwave) - supporting both `--- comment` and `--[=[ comment ]=]`, but must be next to statement)
83+
- [ ] Call Hierarchy
7584
- [ ] Workspace Symbols
7685

7786
The following are extra features defined in the LSP specification, but most likely do not apply to Luau or are not necessary.

0 commit comments

Comments
 (0)