Open GitMensch opened 2 months ago
No this is not supported yet. This apparently requires some ability to precisely scan a whole workspace, which we anticipate to be a rather costly operation, and therefore needs to be designed with care on the LSP server's side to avoid too many noticeable impact on performance.
_Originally posted by @nberth in https://github.com/OCamlPro/superbol-studio-oss/pull/377#discussion_r1815254083_
The way to do that (best practice when spgennard added something similar) is to create a command for scanning the whole workspace. This can be executed manually. There should be a configuration to automatically run this once at startup.
The result would be put somewhere (similar as ctags would do it), possibly even one file per workspace file (the file date will be included so that if the file did not changed that db entry is not updated and the LSP does not need to scan it).
If a user opens a file (= the old results from the db can be used directly and then a scan for this background be done - so the general performance for opening big files would also increase) this database is always updated (so even without doing the global scan once the db will increase step by step - as files are opened).
The place to write this database should default to the workspace/extension storage, but be able to be configured for a different place which then also needs to be prepared for multi-user access [huge workspace with one shared db].
With the current released vsix the "symbols in editor" (starting with
@
in the omnibar) works as expected. But the "symbols in workspace" (starting with#
in the omnibar) shows that there are no symbols provided for that yet.I suggest to include the following:
PROGRAM-ID
s;FUNCTION-ID
s;METHOD-ID
sEXTERNAL
variable-names, maybe only level 01EXTERNAL
file-namesSECTION
names