Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefer .luarc.json over VS Code-specific configuration #34

Open
denisdefreyne opened this issue Jun 27, 2024 · 0 comments
Open

Prefer .luarc.json over VS Code-specific configuration #34

denisdefreyne opened this issue Jun 27, 2024 · 0 comments

Comments

@denisdefreyne
Copy link

denisdefreyne commented Jun 27, 2024

The VS Code bonus chapter (book/bonus/vscode.md) says the following:

Press Ctrl + Shift + P and look for and open Preferences: Open Settings (JSON).

Add the following settings to the JSON:

While this is definitely correct (I’ve used it), I think it could be better to use a local Lua language server configuration that is editor-independent. For example, I can stick this in a .luarc.json file in my project:

{
  "runtime.version": "LuaJIT",
  "diagnostics.globals": ["love"],
  "workspace.library": ["${3rd}/love2d/library"],
  "workspace.checkThirdParty": false
}

The big advantage is that I now have the Lua language server working not just in VS Code, but also automatically in other editors (such as Zed).

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant