Comments (4)
The assumption is usually that the LS can access the same resources as the client. Virtual filesystems or linked files make this assumption broken, so it's even not clear that language servers are supposed to work at all with them.
However, you can trick the filesystem consumers with symbolic link or linked files on the filesystem level (instead of client one). Is this something you can use?
from lsp4e.
Is the assumption that the LS can access the same resources as the client is something built into the LSP Specification (I could not find it) or rather something built-in LSP4e?
I see that the client includes the source text in the Json, request, so fetching the text of the source does not require that the server can access the source on the filesystem level. I also found in https://microsoft.github.io/language-server-protocol/specification#workspace_didChangeWatchedFiles that "Servers are allowed to run their own file system watching mechanism and not rely on clients to provide file system events. However this is not recommended", so I am not sure how to understand the assumption.
I am not sure what we would need to use symbolic link or linked files on the filesystem level but so far I did not detected any problem with the virtual file system. Yes, I needed to submit a couple of changes to the LSPEclipseUtils class, but so far the changes where not complex or cumbersome.
We have a highly customized eclipse and xtext setup already (I would not go into details), so even if I prefer that LSP4e works out of the box as much as possible, if we need to customize/extend it little LSP4e, it would not be a deal breaker for us. With this in mind calling LanguageServiceAccessor.getInitializedLanguageServers(file, x -> true); does not seem to be a big issue. Or do you know already about any problem with that?
from lsp4e.
If symbolic links can't work, then yes, you probably have to notify the LS about all the files existing an their content so it can re-emulate the filesystem on its end.
calling LanguageServiceAccessor.getInitializedLanguageServers(file, x -> true); does not seem to be a big issue. Or do you know already about any problem with that?
No, that's not a problem, some other LSP4E clients do it already.
from lsp4e.
Thanks for the quick answer, then I close the ticket and carry on with the call as in my first comment when opening the ticket.
from lsp4e.
Related Issues (20)
- adjustments to additionalTextEdits are slightly off when on different line (when applying a proposal) HOT 4
- BadLocationException when editing a target file
- Impossible to select an element in the C++ LSP Quick Outline view with a keyboard HOT 3
- Blank editor after formatting source code via LS
- Performance bottleneck in Ui Thread HOT 6
- Add support for text editor actions "go to next annotation" & "go to previous annotation" HOT 1
- LSP Folding strategy is not used HOT 1
- Files outside of workspace cannot be opened in Eclipse because of IllegalArgumentException in LSPEclipseUtils
- deadlock i think in lsp4e code for markers, (deadlock in the workspace lock) HOT 2
- Folding reconciler is not invoked when document changes
- Enable folding via preferences
- Exception in LSPEclipseUtils.applyEdits
- Master build broken due to failed unit test HOT 6
- Performance issue when formatting a large file
- Folding annotations gets removed on large files while editing
- SimRel Participation? HOT 13
- MicroProfileGenerateOpenAPIOperation code action breaks developer workflow HOT 1
- Add References to editor context menu HOT 3
- Support partial results for DocumentSymbol
- Add ID to menu to allow external contributions
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lsp4e.