-
Notifications
You must be signed in to change notification settings - Fork 3
/
SwiftCompleter.hpp
42 lines (36 loc) · 1017 Bytes
/
SwiftCompleter.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#import "Logging.hpp"
#import <string>
#import <vector>
namespace ssvim {
/**
* An unsaved file.
*
* In practice, this file is in the users vim buffer
* and changes have been made to it, but they have not
* been written to disk yet
*/
class UnsavedFile {
public:
std::string contents;
std::string fileName;
};
/**
* Yield complitions in the form of json string.
*
* The completions match the API used within sourcekit
*/
class SwiftCompleter {
Logger _logger;
public:
SwiftCompleter(LogLevel logLevel);
~SwiftCompleter();
const std::string
CandidatesForLocationInFile(const std::string &filename, int line, int column,
const std::vector<UnsavedFile> &unsavedFiles,
const std::vector<std::string> &flags);
const std::string
DiagnosticsForFile(const std::string &filename,
const std::vector<UnsavedFile> &unsavedFiles,
const std::vector<std::string> &flags);
};
} // namespace ssvim