[mlir:LSP] Add support for keyword code completions
authorRiver Riddle <riddleriver@gmail.com>
Wed, 6 Jul 2022 09:49:58 +0000 (02:49 -0700)
committerRiver Riddle <riddleriver@gmail.com>
Fri, 8 Jul 2022 23:24:55 +0000 (16:24 -0700)
commit2e41ea32472a2342f2563f57e2957a149bad5f3f
treefc6d2832571dd1aff5e6904d0e7cfa44c7c156cd
parentf9f8693be31c0489647c6425dd6f3feaecf72ef9
[mlir:LSP] Add support for keyword code completions

This commit adds code completion results to the MLIR LSP when
parsing keywords. Keyword support is currently limited to the
case where the expected keyword is provided, but a followup will
work on expanding the set of keyword cases we handle (e.g. to
allow capturing attribute/type mnemonics).

Differential Revision: https://reviews.llvm.org/D129184
mlir/include/mlir/IR/OpImplementation.h
mlir/include/mlir/Parser/CodeComplete.h
mlir/lib/Parser/AsmParserImpl.h
mlir/lib/Parser/Parser.cpp
mlir/lib/Parser/Parser.h
mlir/lib/Tools/mlir-lsp-server/MLIRServer.cpp
mlir/test/mlir-lsp-server/completion.test