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

Fix --configpath not load #3011

Closed
wants to merge 1 commit into from
Closed

Fix --configpath not load #3011

wants to merge 1 commit into from

Conversation

Mc-GrowlR
Copy link

Info

Follow-up on my issue #3008 .Screenshots of some of the effects can also be found in the issue.
This commit is intended to fix a bug where exporting a document via the command line could not read the configuration file specified with the '--configpath' option.

ENV

.luarc.json file

from: #2997
.luarc.doc.json

command

./bin/lua-language-server.exe --configpath ./.luarc.doc.json --doc ./test/main.lua --doc_out_path ./test/

test lua file

M = {}

result

output json doc file:

doc.json

Add the terminal output of the print statement

root uri        file:///e%3A/luals/old/test/main.lua
Config All Path:        E:/luals/old/.luarc.doc.json
configName:     .luarc.doc.json
parent: E:/luals/old
------
uri type:       string  file:///e%3A/luals/old
CONFIGPATH      ./.luarc.doc.json
aaa     .luarc.doc.json

==================
loadLocalConfig Test Begins
folderPath      E:\luals\old
after :         E:\luals\old\.luarc.doc.json
loadLocalConfig Test end
 ================

path:   E:\luals\old\.luarc.doc.json
 buf    string  {
  "$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json",
  "runtime.version": "Lua 5.1",
  "runtime.builtin": {
    "basic": "disable",
    "bit": "disable",
    "bit32": "disable",
    "builtin": "disable",
    "coroutine": "disable",
    "debug": "disable",
    "ffi": "disable",
    "io": "disable",
    "jit": "disable",
    "math": "disable",
    "os": "disable",
    "package": "disable",
    "string": "disable",
    "table": "disable",
    "table.clear": "disable",
    "table.new": "disable",
    "utf8": "disable"
  }
}
Documentation exported:

test\doc.json
test\doc.md

Postscript

I believe that with the fix of this bug, you can use the document export function, no need to make changes to the source code, and only need the configuration file to filter out the standard libraries in the environment.
If I can help you, then my work is meaningful.

@Mc-GrowlR Mc-GrowlR closed this Dec 27, 2024
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.

1 participant