Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make this vscode independent #3

Open
wz1000 opened this issue Jan 10, 2019 · 7 comments
Open

Make this vscode independent #3

wz1000 opened this issue Jan 10, 2019 · 7 comments
Assignees
Labels
feature request New feature or request
Milestone

Comments

@wz1000
Copy link

wz1000 commented Jan 10, 2019

Would it be possible to make this a vscode independent language server, so that any editor supporting LSP could take advantage of it?

@dbaeumer
Copy link
Member

The server should actually work with other clients. Have you experienced problems with it?

@mpickering
Copy link

I tried using the server with another client and it worked fine, apart from it only started when the extension of the file was .js. Could this check be removed perhaps?

mpickering added a commit to mpickering/vscode-lsif-extension that referenced this issue Feb 17, 2019
@dbaeumer
Copy link
Member

@mpickering could you be a little bit more specific which check you mean.

The thing that we need to generalize is the language registration in the document selector to make this work for languages different than JS / TS

		let documentSelector: DocumentSelector = [
			{ scheme: 'file', language: 'typescript', exclusive: true } as any,
			{ scheme: 'file', language: 'javascript', exclusive: true } as any
		];

@dbaeumer dbaeumer added the info-needed Issue requires more information from poster label Feb 18, 2019
@mpickering
Copy link

I don't know the precise way to achieve this but it seems the server should start when there is a lsif.json file regardless of the language? So I had to modify the two places you indicated and also the activationEvents attribute.

mpickering@82f4352

@dbaeumer dbaeumer added feature request New feature or request and removed info-needed Issue requires more information from poster labels Feb 19, 2019
@dbaeumer dbaeumer added this to the On Deck milestone Feb 19, 2019
@dbaeumer
Copy link
Member

I see your point. One way to achieve this is to bundle the source code as well and use a FS provider to serve them.

@arjunattam
Copy link

I tried a couple of changes to generalize the language registration, and it works in a proof-of-concept:

  • Use workspaceContains activation event to look for an lsif.json file
  • Register documentSelector for * language

Would be great to have this as other language servers add support for LSIF, and use this extension to test their changes.

The commit is available for a review here: arjunattam@4000275

@dbaeumer
Copy link
Member

I worked on a new extension model which basically does the following:

  • the dump will contain the file content as well
  • the extensions servers the file content from the dump
  • will add its own file schema (lsif). This has the big advantage that the extension is full language agnositic and will work wth dumps for every language (C#, TS, ...) out of the box.

I will push the changes in the next couple of days. Still need to do some cleanup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants