Skip to content

Update doc.json #2562

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

Merged
merged 5 commits into from
Mar 15, 2024
Merged

Update doc.json #2562

merged 5 commits into from
Mar 15, 2024

Conversation

AndreasMatthias
Copy link
Contributor

To update an existing doc.json file, one needs to remember the --doc argument with which it was originally created. This can be cumbersome and error-prone.

This pull requests add a new luals.config section to doc.json that stores this--doc argument:

{
    "DOC": "/path/to/my/lua/project/",
    "defines": [],
    "fields": [],
    "name": "LuaLS",
    "type": "luals.config"
}

If this section is available LuaLS can be called with --doc_update to update an existing doc.json.

$ lua-language-server --doc_update

Note: The fields defines and fields in the new JSON section are not necessary. However I've added them, because each and every section has these fields, which makes working with the JSON file a bit easier.

@sumneko sumneko merged commit 57451c8 into LuaLS:master Mar 15, 2024
@sumneko
Copy link
Collaborator

sumneko commented Mar 15, 2024

Thank you!

@AndreasMatthias AndreasMatthias deleted the doc-update branch February 12, 2025 19:54
AndreasMatthias added a commit to AndreasMatthias/lua-language-server that referenced this pull request Feb 12, 2025
Section luals.config was implemented in LuaLS#2562, but got lost
after a major refactoring in LuaLS#2821. This commit reimplements it.
See discussion LuaLS#2963.
AndreasMatthias added a commit to AndreasMatthias/lua-language-server that referenced this pull request Feb 12, 2025
Section luals.config was implemented in LuaLS#2562, but got lost
after a major refactoring in LuaLS#2821. This commit reimplements it.
See discussion LuaLS#2963.
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

Successfully merging this pull request may close these issues.

2 participants