Commit a9977495 authored by Leandro Melo's avatar Leandro Melo
Browse files

Snippets: Set auto-completers.

parent 212e39a9
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include "cpphighlighter.h" #include "cpphighlighter.h"
#include "cppeditor.h" #include "cppeditor.h"
#include "cppqtstyleindenter.h" #include "cppqtstyleindenter.h"
#include "cppautocompleter.h"
#include <texteditor/texteditorsettings.h> #include <texteditor/texteditorsettings.h>
#include <texteditor/fontsettings.h> #include <texteditor/fontsettings.h>
...@@ -62,6 +63,6 @@ void CppSnippetEditorDecorator::apply(TextEditor::SnippetEditor *editor) const ...@@ -62,6 +63,6 @@ void CppSnippetEditorDecorator::apply(TextEditor::SnippetEditor *editor) const
fs.toTextCharFormats(CPPEditor::highlighterFormatCategories()); fs.toTextCharFormats(CPPEditor::highlighterFormatCategories());
highlighter->setFormats(formats.constBegin(), formats.constEnd()); highlighter->setFormats(formats.constBegin(), formats.constEnd());
editor->installSyntaxHighlighter(highlighter); editor->installSyntaxHighlighter(highlighter);
editor->setIndenter(new CppQtStyleIndenter); editor->setIndenter(new CppQtStyleIndenter);
editor->setAutoCompleter(new CppAutoCompleter);
} }
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include "qmljshighlighter.h" #include "qmljshighlighter.h"
#include "qmljseditor.h" #include "qmljseditor.h"
#include "qmljsindenter.h" #include "qmljsindenter.h"
#include "qmljsautocompleter.h"
#include <texteditor/texteditorsettings.h> #include <texteditor/texteditorsettings.h>
#include <texteditor/fontsettings.h> #include <texteditor/fontsettings.h>
...@@ -60,6 +61,6 @@ void QmlJSSnippetEditorDecorator::apply(TextEditor::SnippetEditor *editor) const ...@@ -60,6 +61,6 @@ void QmlJSSnippetEditorDecorator::apply(TextEditor::SnippetEditor *editor) const
const TextEditor::FontSettings &fs = TextEditor::TextEditorSettings::instance()->fontSettings(); const TextEditor::FontSettings &fs = TextEditor::TextEditorSettings::instance()->fontSettings();
highlighter->setFormats(fs.toTextCharFormats(QmlJSTextEditor::highlighterFormatCategories())); highlighter->setFormats(fs.toTextCharFormats(QmlJSTextEditor::highlighterFormatCategories()));
editor->installSyntaxHighlighter(highlighter); editor->installSyntaxHighlighter(highlighter);
editor->setIndenter(new Indenter); editor->setIndenter(new Indenter);
editor->setAutoCompleter(new AutoCompleter);
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment