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

Implement language server #71

Open
flyinghermit opened this issue Jan 2, 2023 · 0 comments
Open

Implement language server #71

flyinghermit opened this issue Jan 2, 2023 · 0 comments

Comments

@flyinghermit
Copy link

What

Implement language server for predicate.

Why

The language server protocol (LSP), specified by VS Code team, promises uniform API to support multiple languages and code editors that support LSP. Implementing language server will let us implement integration with predicate linter for once and use the functionality (with minimal update) to support other code editors that support LSP besides VS Code.

@flyinghermit flyinghermit self-assigned this Jan 2, 2023
flyinghermit added a commit that referenced this issue Jan 30, 2023
Implements working integration of VS Code extension + Language Server + Predicate linter.

See #71 for more details on LSP servers. 

## Details:
### LSP server(`predicate-lsp-server`): 
- Implements LSP server with diagnostic API.
- Diagnostic data are populated using results from `$ predicate linter ...`. Node `child_process` is used to invoke 

### Predicate CLI.
- Works when policy file is opened or saved. 

### VS Code extension: 
- Implements LSP client.


Demo:
https://user-images.githubusercontent.com/10177602/211304158-b3646754-6082-45da-8163-ed8d307867be.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant