[Mlir-commits] [mlir] 17e2e7b - [mlir:PDLL] Don't append / for directory code completion
River Riddle
llvmlistbot at llvm.org
Wed May 18 00:24:09 PDT 2022
Author: River Riddle
Date: 2022-05-18T00:23:47-07:00
New Revision: 17e2e7b7885c0afe688bcd4d6b198aab6ea8f58a
URL: https://github.com/llvm/llvm-project/commit/17e2e7b7885c0afe688bcd4d6b198aab6ea8f58a
DIFF: https://github.com/llvm/llvm-project/commit/17e2e7b7885c0afe688bcd4d6b198aab6ea8f58a.diff
LOG: [mlir:PDLL] Don't append / for directory code completion
This allows for properly using / as a trigger character, i.e.
more easily allows chaining include directory completions.
Added:
Modified:
mlir/lib/Tools/mlir-pdll-lsp-server/PDLLServer.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Tools/mlir-pdll-lsp-server/PDLLServer.cpp b/mlir/lib/Tools/mlir-pdll-lsp-server/PDLLServer.cpp
index 18aa91fb9bf8..7ff7f8d8264d 100644
--- a/mlir/lib/Tools/mlir-pdll-lsp-server/PDLLServer.cpp
+++ b/mlir/lib/Tools/mlir-pdll-lsp-server/PDLLServer.cpp
@@ -916,7 +916,7 @@ class LSPCodeCompleteContext : public CodeCompleteContext {
// Functor used to add a single include completion item.
auto addIncludeCompletion = [&](StringRef path, bool isDirectory) {
lsp::CompletionItem item;
- item.label = (path + (isDirectory ? "/" : "")).str();
+ item.label = path.str();
item.kind = isDirectory ? lsp::CompletionItemKind::Folder
: lsp::CompletionItemKind::File;
if (seenResults.insert(item.label).second)
More information about the Mlir-commits
mailing list