[PATCH] D124077: [mlir][PDLL] Add document link and hover support to mlir-pdll-lsp-server

River Riddle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 21 14:04:25 PDT 2022


rriddle added inline comments.


================
Comment at: mlir/lib/Tools/mlir-pdll-lsp-server/PDLLServer.cpp:502
+    llvm::raw_string_ostream hoverOS(hover.contents.value);
+    hoverOS << "`" << llvm::sys::path::filename(include.uri.file())
+            << "`\n***\n"
----------------
jpienaar wrote:
> OOC does this enable linkage? Or would one need to write this in markdown formatting?
The `documentLink` automatically has linkage, that is what gets you the `ctrl+click` behavior. The hover here is just additional information about the include. I just modeled the info in the hover after what clangd provides.


================
Comment at: mlir/test/mlir-pdll-lsp-server/include/included.td:1
+
+include "mlir/IR/OpBase.td"
----------------
jpienaar wrote:
> Are the empty new lines at top on purpose? File heading missing?
Dropped the newlines at the top. I didn't add a file heading because no other tests I could find have them, and these files are not tested directly (thus no RUN lines), they are only used when testing other files.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D124077/new/

https://reviews.llvm.org/D124077



More information about the llvm-commits mailing list