Open wojciech-kulik opened 8 months ago
I believe https://github.com/LuaLS/lua-language-server/pull/2546 probably solves your problem (but ignoreDir not working is still a bug)
@emmericp thank you! Any advice on how can I quickly verify it? I see that there is no new release yet and I can't find any information how to build it.
./make.sh
This command requires some dependency:
./make.sh: line 7: ./3rd/luamake/luamake: No such file or directory
that indicates the previous step failed, it compiles luamake first, so you are missing part of the error. likely dependencies, which are only gcc and ninja-build
but since my patch is lua only you can just apply it to your existing installation
but since my patch is lua only you can just apply it to your existing installation
what did you mean by that? I installed LuaLS from Homebrew, so I've got only the binary file. I'm not sure how could I apply it?
I think I solved the problem by setting in .luarc.json
:
{
"workspace.library": ["${3rd}/luassert/library"],
"workspace.checkThirdParty": false,
"diagnostics.libraryFiles": "Disable",
}
Specifically:
"diagnostics.libraryFiles": "Disable",
workspace.library
Excuse me, I tried your method but it didn't work.
I want to disable Lua diagnostics for the whole folder ./xmake/templates
:
here is my .luarc.json:
"workspace.library": [
"xmake/templates"
],
"diagnostics.libraryFiles": "Disable"
For now, I can only disable the diagnosis of the entire project to workaround:
"diagnostics.disable": [
"unknown-symbol",
"exp-in-action"
]
thankyou so much!
Hi @TOMO-CAT, there seems to be some problems related to workspace.library
and "diagnostics.libraryFiles": "Disable"
when the library path is relative to the workspace root, as discussed here: https://github.com/LuaLS/lua-language-server/issues/2905
Unfortunately the cause of this issue is not identified yet 😕
How are you using the lua-language-server?
NeoVim
Which OS are you using?
MacOS
What is the issue affecting?
Diagnostics/Syntax Checking
Expected Behaviour
When I set
workspace.ignoreDir
in.luarc.json
it should exclude these folders from check when calling:Actual Behaviour
The tool still prints errors in 3rd party dir.
Reproduction steps
.luarc.json
and put:Additional Notes
No response
Log File
No response