You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How can I get the list of all open documents? #10304
Struggling to find this in the API, or something I can reference in your own code (OpenEditorsView seems to get it from IFilesConfiguration? Can I get that?)
I can see window.visibleTextEditors but this is only the visible editors (eg. normally one, unless you have split views) and workspace.textDocuments but that says it's "All text documents currently known to the system").
I need a list to give to my language servers as priority files - it accepts the visible editors first and then any other open files.
Aha, thanks! The comment in the docs is a bit misleading "All text documents currently known to the system", I assumed it meant everything in the explorer view.
Activity
jrieken commentedon Aug 9, 2016
workspace.textDocumentsis what you want - it's those that not yet disposes/closed (shown in the 'Open Editor' section in the explorer)DanTup commentedon Aug 9, 2016
Aha, thanks! The comment in the docs is a bit misleading "All text documents currently known to the system", I assumed it meant everything in the explorer view.
jrieken commentedon Aug 10, 2016
It's a little fuzzy since we changes our document dispose story a few times ;-)