forked from qt-creator/qt-creator
LanguageClient: add lsp based auto formatter
Change-Id: I2a7347961b4633868aa3b033c351a1e709c3597e Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -29,10 +29,11 @@
|
||||
#include "dynamiccapabilities.h"
|
||||
#include "languageclient_global.h"
|
||||
#include "languageclientcompletionassist.h"
|
||||
#include "languageclientformatter.h"
|
||||
#include "languageclientfunctionhint.h"
|
||||
#include "languageclienthoverhandler.h"
|
||||
#include "languageclientquickfix.h"
|
||||
#include "languageclientsettings.h"
|
||||
#include "languageclienthoverhandler.h"
|
||||
|
||||
#include <coreplugin/id.h>
|
||||
#include <coreplugin/messagemanager.h>
|
||||
@@ -100,7 +101,7 @@ public:
|
||||
void closeDocument(TextEditor::TextDocument *document);
|
||||
void activateDocument(TextEditor::TextDocument *document);
|
||||
void deactivateDocument(TextEditor::TextDocument *document);
|
||||
bool documentOpen(TextEditor::TextDocument *document) const;
|
||||
bool documentOpen(const TextEditor::TextDocument *document) const;
|
||||
void documentContentsSaved(TextEditor::TextDocument *document);
|
||||
void documentWillSave(Core::IDocument *document);
|
||||
void documentContentsChanged(TextEditor::TextDocument *document,
|
||||
@@ -120,6 +121,9 @@ public:
|
||||
const LanguageServerProtocol::DocumentUri &uri);
|
||||
void executeCommand(const LanguageServerProtocol::Command &command);
|
||||
|
||||
void formatFile(const TextEditor::TextDocument *document);
|
||||
void formatRange(const TextEditor::TextDocument *document, const QTextCursor &cursor);
|
||||
|
||||
// workspace control
|
||||
void setCurrentProject(ProjectExplorer::Project *project);
|
||||
const ProjectExplorer::Project *project() const;
|
||||
|
||||
Reference in New Issue
Block a user