Skip to content

Commit 32a2d8d

Browse files
committed
Add notification suggesting to use Luau LSP and update README.md
1 parent f147878 commit 32a2d8d

File tree

3 files changed

+50
-26
lines changed

3 files changed

+50
-26
lines changed

README.md

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -14,32 +14,33 @@ https://devforum.roblox.com/t/roblox-lsp-full-intellisense-for-roblox-and-luau/7
1414

1515
Roblox OS Community Discord Server: https://discord.gg/c4nPcZHwFU
1616

17+
## Alternatives
18+
This project doesn't support Luau static typing and never will, you should always prefer [Luau Language Server](https://marketplace.visualstudio.com/items?itemName=JohnnyMorganz.luau-lsp) for that.
1719

1820
## Features
1921

20-
- [x] Full Roblox Environment
21-
- [x] Support for Luau static typing
22-
- [x] Full support for [Rojo](https://github.com/Roblox/rojo)
23-
- [x] Support for Third-Party libraries like Roact, Rodux, Promise, TestEz, etc.
24-
- [x] Auto-completion for instances in Roblox Studio
25-
- [x] Auto-updatable API
26-
- [x] Inlay Hints
27-
- [x] Color3 Preview and Picker
28-
- [x] Goto Definition
29-
- [x] Find All References
30-
- [x] Hover
31-
- [x] Diagnostics
32-
- [x] Rename
33-
- [x] Auto Completion
34-
- [x] IntelliSense
35-
- [x] Signature Help
36-
- [x] Document Symbols
37-
- [x] Workspace Symbols
38-
- [x] Syntax Check
39-
- [x] Highlight
40-
- [x] Code Action
41-
- [x] Multi Workspace
42-
- [x] Semantic Tokens
22+
- Full Roblox Environment
23+
- Full support for [Rojo](https://github.com/Roblox/rojo)
24+
- Built-in support for Roact, Rodux, and TestEz.
25+
- Auto-completion for instances in Roblox Studio
26+
- Auto-updatable API
27+
- Color3 Preview and Picker
28+
- Module Auto-import
29+
- IntelliSense
30+
- Inlay Hints
31+
- Goto Definition
32+
- Find All References
33+
- Hover
34+
- Diagnostics
35+
- Rename
36+
- Signature Help
37+
- Document Symbols
38+
- Workspace Symbols
39+
- Syntax Check
40+
- Highlight
41+
- Code Action
42+
- Multi Workspace
43+
- Semantic Tokens
4344

4445
### Preview
4546

server/locale/en-us/script.lua

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,4 @@ Memory usage: {mem:.f}M
262262
]]
263263
WINDOW_APPLY_SETTING = 'Apply setting'
264264
WINDOW_CHECK_SEMANTIC = 'If you are using the color theme in the market, you may need to modify `editor.semanticHighlighting.enabled` to `true` to make semantic tokens take effect.'
265-
WINDOW_TELEMETRY_HINT = 'Please allow sending anonymous usage data and error reports to help us further improve this extension. Read our privacy policy [here](https://github.com/sumneko/lua-language-server/wiki/Privacy-Policy) .'
266-
WINDOW_TELEMETRY_ENABLE = 'Allow'
267-
WINDOW_TELEMETRY_DISABLE = 'Prohibit'
265+
WINDOW_CHECK_TYPECHECKING = 'Roblox LSP\'s type-checking is incomplete and obsolete. Using [Luau LSP](https://marketplace.visualstudio.com/items?itemName=JohnnyMorganz.luau-lsp) for static typing is always recommended.'

server/script/provider/provider.lua

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,31 @@ local function updateConfig(init)
103103
else
104104
proto.notify('$/status/hide')
105105
end
106+
107+
if client.isVSCode() and newConfig.typeChecking.mode ~= "Disabled" then
108+
proto.request('$/getState', {key = "typecheckWarning"}, function (value)
109+
if not value then
110+
proto.request('window/showMessageRequest', {
111+
type = define.MessageType.Warning,
112+
message = lang.script.WINDOW_CHECK_TYPECHECKING,
113+
actions = {
114+
{
115+
title = lang.script.WINDOW_DONT_SHOW_AGAIN,
116+
},
117+
}
118+
}, function (item)
119+
if item then
120+
if item.title == lang.script.WINDOW_DONT_SHOW_AGAIN then
121+
proto.notify('$/setState', {
122+
key = "typecheckWarning",
123+
value = true
124+
})
125+
end
126+
end
127+
end)
128+
end
129+
end)
130+
end
106131
end
107132

108133
proto.on('initialize', function (params)

0 commit comments

Comments
 (0)