Make workspace.checkThirdParty a string enum#2354
Conversation
|
To translate, please modify the file in the locale directory (only need to modify one language file), and then execute the locale and build-doc debugger tasks. |
There was a problem hiding this comment.
Do not modify the file format.
There was a problem hiding this comment.
Oops, sorry, I have my editor configured to format-on-save with stylua.
|
How do I execute the $ luajit tools/build-doc.lua
luajit: tools/build-doc.lua:3: module 'bee.filesystem' not found: |
1ab45a7 to
2b21dbe
Compare
|
Use |
|
Thanks! I ran the locale and debugger tasks. |
locale/pt-br/meta.lua
Outdated
| 'Retorna o valor máximo para um inteiro.' | ||
| math.min = | ||
| 'Retorna o argumento com o valor mínimo de acordo com o operador `<`.' | ||
| math.mixinteger['>5.3'] = |
There was a problem hiding this comment.
I think this was a typo, it was making the locale script crash.
There was a problem hiding this comment.
I have resolved it, please pull latest commits.
There was a problem hiding this comment.
Thanks! Rebased, the diff looks a lot cleaner now.
This lets you skip the "apply third party library to workspace configuration" prompt.
c0333c6 to
3bbc8dd
Compare
|
Thank you! |
…spam As suggested here: - https://smarttech101.com/nvim-lsp-configure-language-servers-shortcuts-highlights/ > If you don’t know what LÖVE/ Luv, and Luassert are, chances are you > don’t need them. So, disable them permanently Apparently they are a game engine and an assertion library, respectively. Note that lua-language-server only a few days ago changed `checkThirdParty` from a boolean to a string enum in: - LuaLS/lua-language-server#2354 but backwards compatibility is maintained (`false` should be equivalent to `"Disable"`), so I'm going with `false` to have this work in as many places as possible.
|
true/false not working |
Yeah. Should've kept it as backwards compatible instead of breaking current setups. |
|
@nfwyst @schardev Hmm, I intended to keep this backwards compatible: lua-language-server/script/library.lua Lines 611 to 617 in 3bbc8dd I think the issue is that the config value is now defined as a string: lua-language-server/script/config/template.lua Lines 320 to 325 in 5a763b0 So when the config is loaded as a boolean, it gets converted to a string: lua-language-server/script/config/template.lua Lines 81 to 85 in 5a763b0 |
I attempted to maintain backwards compatability in LuaLS#2354 but didn't fully understand the config type system.
|
Attempted fix in #2406 but I haven't tested it yet. |
I attempted to maintain backwards compatability in LuaLS#2354 and LuaLS#2406 but didn't fully understand the config type system. This approach uses `Type.Or` and I even tested it to confirm that it works! Thanks to @pysan3 for pointing out how a default would be used for invalid types and to @sumneko for pointing out `Type.Or`.
This lets you skip the "apply third party library to workspace configuration" prompt.
The value of
Lua.workspace.checkThirdPartycan now be one of:Ask(ask every time; this is equivalent totrue)Apply(always apply third-party libraries and set the workspaceconfiguration)
ApplyInMemory(always apply third-party libraries but don't set theworkspace configuration)
Disable(don't ask and don't apply; this is equivalent tofalse)Backwards compatibility with the old boolean configuration values is maintained;
trueis treated asAskandfalseis treated asDisable.I need some help translating the Taiwanese, Mandarin, and Portugese, but I copied the English in there as a standin -- presumably it's better to have some documentation in the wrong language which can be machine-translated than to have missing information.
I've built and tested this on my machine.