Skip to content

Latest commit

 

History

History
69 lines (48 loc) · 5.24 KB

FEATURES.md

File metadata and controls

69 lines (48 loc) · 5.24 KB

Features

The IntelliJ LSP API already enables a set of useful language features:

Feature API Support Server Support LSP Request Remarks
Syntax Highlighting ✔✔ (local, based on TextMate) TM Bundle is automatically registered on plugin installation (and disabled on uninstallation).
Code Completion ✔✔ textDocument/completion Completing with global identifiers supported with completionItem/resolve (2024.2)
Goto Definition ✔✔ textDocument/definition
Hover Documentation ✔✔ textDocument/hover
Document Formatting ✔✔ textDocument/formatting
Diagnostics ✔✔ textDocument/publishDiagnostics Problems (errors, warnings).
Quick Fixes ✔✔ textDocument/codeAction Translation support only in 2.x
Intention Actions ✔✔ textDocument/codeAction E.g. Refactoring or Organize Imports. No server support yet.
Find References ✔✔ textDocument/references
Semantic Tokens ✔✔ textDocument/semanticTokens Improved highlighting: server dynamically assigns token semantics.
Document Highlights etc. –✔ (various)
DocumentLinks –✔
AnalyzeDependencies –-
Commands –-
- Restart LSP –(✔) via short cut
CodeLens -✔
Outline ?✔ textDocument/symbols both flat and hierarchical

Known issues/open points:

  • Workspace Symbols: managed (common.cds) not shown in cap-cloud-samples repo
  • .cdsprettier.json schema registration needed to support code completion in text editor
  • Maintain translation quickfix works in principal, but properties file is not saved and thus LSP won't get updated and still suggest quickfix
  • User settings not yet available in Settings > Languages and Frameworks > CDS
  • Change serverId to cap-cds-language-server

Examples

Syntax Highlighting, Code Completion, Diagnostics

Demo of Syntax Highlighting, Code Completion, Diagnostics

Quick Fix

Demo of Quick Fix

Hover Documentation

Demo of Hover Documentation

Find References

Demo of Find References

Document Formatting: before…

Demo of Document Formatting (before)

… and after

Demo of Document Formatting (after)

Adjust the Code Style

Demo of Code Style Settings

Upcoming

Depending on the LSP4IJ development roadmap, we expect to see more features available in the near future. These will enable SAP CDS Language Support for IntelliJ to provide:

  • Type generation with CDS Typer on save
  • and more…