9 #ifndef LIB_MLIR_TOOLS_TBLGENLSPSERVER_TABLEGENSERVER_H_
10 #define LIB_MLIR_TOOLS_TBLGENLSPSERVER_TABLEGENSERVER_H_
13 #include "llvm/ADT/StringRef.h"
26 struct TextDocumentContentChangeEvent;
36 const std::vector<std::string> &
extraDirs)
53 std::vector<Diagnostic> &diagnostics);
59 int64_t version, std::vector<Diagnostic> &diagnostics);
68 std::vector<Location> &locations);
72 std::vector<Location> &references);
76 std::vector<DocumentLink> &documentLinks);
85 std::unique_ptr<Impl>
impl;
static llvm::ManagedStatic< PassManagerOptions > options
This class implements all of the TableGen related functionality necessary for a language server.
std::optional< int64_t > removeDocument(const URIForFile &uri)
Remove the document with the given uri.
void updateDocument(const URIForFile &uri, ArrayRef< TextDocumentContentChangeEvent > changes, int64_t version, std::vector< Diagnostic > &diagnostics)
Update the document, with the provided version, at the given URI.
std::optional< Hover > findHover(const URIForFile &uri, const Position &hoverPos)
Find a hover description for the given hover position, or std::nullopt if one couldn't be found.
void getDocumentLinks(const URIForFile &uri, std::vector< DocumentLink > &documentLinks)
Return the document links referenced by the given file.
void addDocument(const URIForFile &uri, StringRef contents, int64_t version, std::vector< Diagnostic > &diagnostics)
Add the document, with the provided version, at the given URI.
void getLocationsOf(const URIForFile &uri, const Position &defPos, std::vector< Location > &locations)
Return the locations of the object pointed at by the given position.
TableGenServer(const Options &options)
void findReferencesOf(const URIForFile &uri, const Position &pos, std::vector< Location > &references)
Find all references of the object pointed at by the given position.
URI in "file" scheme for a file.
Include the generated interface declarations.
const std::vector< std::string > & compilationDatabases
The filenames for databases containing compilation commands for TableGen files passed to the server.
Options(const std::vector< std::string > &compilationDatabases, const std::vector< std::string > &extraDirs)
const std::vector< std::string > & extraDirs
Additional list of include directories to search.