mirror of
https://github.com/ray-x/navigator.lua
synced 2024-11-17 15:26:03 +00:00
2e96dcd327
This is quite tricky to get right, because there are two ways for sumneko to search for files, namely: 1. Lua.runtime.path When using `require`, how to find the file based on the input name. Setting this config to `?/init.lua` means that when you enter `require 'myfile'`, `${workspace}/myfile/init.lua` will be searched from the loaded files. if `runtime.pathStrict` is `false`, `${workspace}/**/myfile/init.lua` will also be searched. If you want to load files outside the workspace, you need to set `Lua.workspace.library` first. 2. Lua.workspace.library In addition to the current workspace, which directories will load files from. The files in these directories will be treated as externally provided code libraries, and some features (such as renaming fields) will not modify these files. The crucial point is that `Lua.runtime.path` only applies to the *current* workspace. Thus it makes no sense to add any absolute directories here. Absolute directories must be added to workspace.library, which is already the case. The default value provided by sumneko is what you typically would expect, so I have switched to it. References: - |
||
---|---|---|
.. | ||
lspclient | ||
cclshierarchy.lua | ||
codeAction.lua | ||
codelens.lua | ||
debounce.lua | ||
definition.lua | ||
diagnostics.lua | ||
dochighlight.lua | ||
foldlsp.lua | ||
foldts.lua | ||
formatting.lua | ||
gui.lua | ||
hierarchy.lua | ||
implementation.lua | ||
lazyloader.lua | ||
lru.lua | ||
lspwrapper.lua | ||
protocal.txt | ||
reference.lua | ||
rename.lua | ||
render.lua | ||
signature.lua | ||
symbols.lua | ||
treesitter.lua | ||
util.lua | ||
workspace.lua |