This is an archive of the discontinued LLVM Phabricator instance.

[TableGen:LSP] Add hover support for records and recordvals
ClosedPublic

Authored by rriddle on Sep 20 2022, 1:11 AM.

Details

Summary

This provides hover information for classes, defs, fields, and template
arguments. Like PDLL, this pulls documentation from the source code
when hovering over fields and records.

Diff Detail

Event Timeline

rriddle created this revision.Sep 20 2022, 1:11 AM
rriddle requested review of this revision.Sep 20 2022, 1:11 AM

Screenshots from vscode:

jpienaar accepted this revision.Sep 25 2022, 6:08 AM

Nice, thanks

mlir/lib/Tools/lsp-server-support/SourceMgrUtils.cpp
103

Should we skip over lines with TODO and FIXME? I'm thinking of the case of comment describing function followed by TODO, where the latter normally doesn't add much doc info.

(Not required and there may not be enough of these to warrant extra complexity for now)

This revision is now accepted and ready to land.Sep 25 2022, 6:08 AM
rriddle marked an inline comment as done.Sep 27 2022, 8:05 PM
rriddle added inline comments.
mlir/lib/Tools/lsp-server-support/SourceMgrUtils.cpp
103

I don't think we should mostly given that clangd doesn't either. I've tried to model the same behavior there as much as possible, so that it's less surprising when you switch between languages.

This revision was automatically updated to reflect the committed changes.
rriddle marked an inline comment as done.