9 #ifndef LIB_MLIR_TOOLS_MLIRPDLLSPSERVER_SERVER_H_
10 #define LIB_MLIR_TOOLS_MLIRPDLLSPSERVER_SERVER_H_
13 #include "llvm/ADT/StringRef.h"
22 class CompilationDatabase;
23 struct PDLLViewOutputResult;
25 struct CompletionList;
27 struct DocumentSymbol;
34 struct TextDocumentContentChangeEvent;
44 const std::vector<std::string> &
extraDirs)
61 std::vector<Diagnostic> &diagnostics);
67 int64_t version, std::vector<Diagnostic> &diagnostics);
76 std::vector<Location> &locations);
80 std::vector<Location> &references);
84 std::vector<DocumentLink> &documentLinks);
93 std::vector<DocumentSymbol> &symbols);
105 std::vector<InlayHint> &inlayHints);
109 std::optional<PDLLViewOutputResult>
114 std::unique_ptr<Impl>
impl;
static llvm::ManagedStatic< PassManagerOptions > options
This class implements all of the PDLL related functionality necessary for a language server.
void getLocationsOf(const URIForFile &uri, const Position &defPos, std::vector< Location > &locations)
Return the locations of the object pointed at by the given position.
void getDocumentLinks(const URIForFile &uri, std::vector< DocumentLink > &documentLinks)
Return the document links referenced by the given file.
void getInlayHints(const URIForFile &uri, const Range &range, std::vector< InlayHint > &inlayHints)
Get the inlay hints for the range within 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 findReferencesOf(const URIForFile &uri, const Position &pos, std::vector< Location > &references)
Find all references of the object pointed at by the given position.
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 findDocumentSymbols(const URIForFile &uri, std::vector< DocumentSymbol > &symbols)
Find all of the document symbols within the given file.
std::optional< int64_t > removeDocument(const URIForFile &uri)
Remove the document with the given uri.
CompletionList getCodeCompletion(const URIForFile &uri, const Position &completePos)
Get the code completion list for the position within the given file.
SignatureHelp getSignatureHelp(const URIForFile &uri, const Position &helpPos)
Get the signature help for the position within the given file.
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.
PDLLServer(const Options &options)
std::optional< PDLLViewOutputResult > getPDLLViewOutput(const URIForFile &uri, PDLLViewOutputKind kind)
Get the output of the given PDLL file, or std::nullopt if there is no valid output.
URI in "file" scheme for a file.
PDLLViewOutputKind
The type of output to view from PDLL.
Include the generated interface declarations.
Represents a collection of completion items to be presented in the editor.
const std::vector< std::string > & extraDirs
Additional list of include directories to search.
Options(const std::vector< std::string > &compilationDatabases, const std::vector< std::string > &extraDirs)
const std::vector< std::string > & compilationDatabases
The filenames for databases containing compilation commands for PDLL files passed to the server.
Represents the signature of a callable.