<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0"></p>
<div>Hi,<br>
<br>
I've been thinking about how to implement the "symbols in document" feature. I think it would make a lot of sense to reuse the in-memory index for this. One problem is that there is no current way to do "file-major" queries, i.e. get all symbols within one
 file.<br>
<br>
I see a few options:<br>
1) Change the <span>YAML</span> format, in-memory model and index interface to allow file-major queries. This is the most work. On the other hand, I don't think it's worth investing a ton of effort in the YAML format.<br>
2) Change only the "in-memory" index and interface for file-major queries. Not sure how feasible that is, but perhaps a good solution.<br>
3) Run a new SymbolCollector every time on textDocument/documentSymbol, only on the needed file. That way there is a lot less symbol to filter out (only need the ones in the main file).<br>
4) Iterate through all symbols, keep only the ones in the correct file. This is basically workspace/symbol with another "file" parameter. This is likely the least amount of work.<br>
<br>
I tried #4 and it seems to work fine but is probably not the most scalable so I am not sure how acceptable that is as an interim implementation.<br>
<br>
Let me know what you think,<br>
Marc-André</div>
<p></p>
</div>
</body>
</html>