Hi, On Tue, Jan 26, 2021 at 6:35 PM Prabir Shrestha <[email protected]> wrote:
> For most large projects, one will have multiple sub projects. LSP calls it > workspaceFolders. > https://microsoft.github.io/language-server-protocol/specifications/specification-current/#workspace_workspaceFolders > > VSCode has something similar. > https://code.visualstudio.com/docs/editor/multi-root-workspaces. They > also have .code-workspace and one can load the file. > > { > "folders": [ > { > // Source code > "name": "Product", > "path": "vscode" > }, > { > // Docs and release notes > "name": "Documentation", > "path": "vscode-docs" > }, > { > // Yeoman extension generator > "name": "Extension generator", > "path": "vscode-generator-code" > } > ] > } > > Would it be possible to have this api so multiple plugins can work > together instead of each plugin having concept of workspace folder. Lot of > LSP servers are not interacting with workspace folders so would be good to > have this api. > Examples: > > - a mono repo where the lib may have different eslint settings and > test project may have different eslint settings. > - find/grep only inside a test project/folder and not the lib folder. > > We would need apis to open/close/add folder(s)/remove folder(s) along with > events so others can watch for changes. We don't need to support the > .code-workspace file as one can easily build a plugin based on this apis. > We could make this play nicely with cwd. > I agree. Having support for watching a directory tree for changes will be helpful for LSP plugins. But what will be the difference between an open folder API and an add folder API? Similarly between the close and the remove folder API? Will it suffice to support one API to watch a directory tree for changes and another API to stop watching the directory tree? Regards, Yegappan > I see that almost all LSP plugins have built their own standard concept of > workspace folders. > > One thing to also note is that some languages such as C# uses files for > projects instead of folders but new c# is moving to folders. we could call > it workspace items instead have an item be a folder or string. > > > -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/CAAW7x7kS59517A3P6uo2J3oYkbBVe1dbwFRQMrXZVZMES1jWXQ%40mail.gmail.com.
