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

Sketch out next steps in language server features #1191

Merged
merged 1 commit into from
Feb 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions common/lsp/lsp-protocol.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ Range:
TextDocumentIdentifier:
uri: string

Location:
<: TextDocumentIdentifier
range: Range

TextDocumentItem:
<:TextDocumentIdentifier
text: string
Expand Down Expand Up @@ -126,3 +130,50 @@ DocumentHighlight: # response documentHighlight is [] of this.
DocumentFormattingParams:
textDocument: TextDocumentIdentifier
range?: Range # only used for textDocument/rangeFormatting

# -- textDocument/hover
# https://github.com/chipsalliance/verible/issues/1187
HoverParams:
<: TextDocumentPositionParams

MarkupContent:
kind: string = "markdown"
value: string

Hover:
contents: MarkupContent
range?: Range

# == The following are not yet implemented. Steps needed ==
# o need to be able to set up a project (knowing which files are relevant,
# which might require some sort of run through the build system.
# And convey that to the language server
# https://github.com/chipsalliance/verible/issues/1188
# o Use the symbol table with the above project (and fix all known bugs there)

# -- textDocument/definition (requires project + active symbol table #1189)
DefinitionParams:
<: TextDocumentPositionParams

# Response Location[]

# -- textDocument/declaration (requires project + active symbol table #1189)
DeclarationParams:
<: TextDocumentPositionParams

# Response: Location[]

# -- textDocument/references (requires project + active symbol table #1189)
ReferenceParams:
<: TextDocumentPositionParams

# Response: Location[]

# -- textDocument/documentLink (e.g. include files; requires project #1190)
DocumentLinkParams:
textDocument: TextDocumentIdentifier

# Response is a DocumentLink[]
DocumentLink:
range: Range
target?: string # DocumentUri
5 changes: 5 additions & 0 deletions verilog/tools/ls/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ progress
- [x] Provide formatting.
- [x] Highlight all the symbols that are the same as current under cursor.
- [ ] Take scope and type into account to only highlight _same_ symbols.
- [ ] Provide useful information on hover
([#1187](https://github.com/chipsalliance/verible/issues/1187))
- [ ] Find definition of symbol even if in another file.
([#1189](https://github.com/chipsalliance/verible/issues/1189))
- [ ] Provide Document Links (e.g. opening include files)
([#1190](https://github.com/chipsalliance/verible/issues/1190))
- [ ] Rename refactor a symbol

## Hooking up to editor
Expand Down