mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-08-09 08:19:25 +03:00
syntax highlighting for PKGBUILD (SpartanJ/ecode#186)
Makefile detection improvement (SpartanJ/ecode#185) Open File improvement (SpartanJ/ecode#184)
This commit is contained in:
@@ -67,8 +67,7 @@ namespace EE { namespace UI { namespace Doc {
|
||||
SINGLETON_DECLARE_IMPLEMENTATION( SyntaxDefinitionManager )
|
||||
|
||||
static void addPlainText() {
|
||||
SyntaxDefinitionManager::instance()->add(
|
||||
{ "Plain Text", {}, {}, {}, "", {}, "plaintext" } );
|
||||
SyntaxDefinitionManager::instance()->add( { "Plain Text", {}, {}, {}, "", {}, "plaintext" } );
|
||||
}
|
||||
|
||||
static void addC() {
|
||||
@@ -333,7 +332,7 @@ static void addBash() {
|
||||
|
||||
{ "Shell script",
|
||||
{ "%.sh$", "%.bash$", "^%.bashrc$", "^%.bash_profile$", "^%.profile$", "%.zsh$",
|
||||
"%.fish$" },
|
||||
"%.fish$", "^PKGBUILD$" },
|
||||
{
|
||||
{ { "$[%a_@*#][%w_]*" }, "keyword2" },
|
||||
{ { "#.*\n" }, "comment" },
|
||||
@@ -663,21 +662,22 @@ static void addIni() {
|
||||
}
|
||||
|
||||
static void addMakefile() {
|
||||
SyntaxDefinitionManager::instance()->add( { "Makefile",
|
||||
{ "Makefile", "makefile", "%.mk$", "%.make$" },
|
||||
{
|
||||
{ { "#.*\n" }, "comment" },
|
||||
{ { "[[.]]}" }, "normal" },
|
||||
{ { "$[@^<%%?+|*]" }, "keyword2" },
|
||||
{ { "$%(", "%)" }, "keyword" },
|
||||
{ { "%f[%w_][%d%.]+%f[^%w_]" }, "number" },
|
||||
{ { "%..*:" }, "keyword2" },
|
||||
{ { ".*:=" }, "function" },
|
||||
{ { ".*+=" }, "function" },
|
||||
{ { ".*%s=" }, "function" },
|
||||
},
|
||||
{},
|
||||
"#" } );
|
||||
SyntaxDefinitionManager::instance()->add(
|
||||
{ "Makefile",
|
||||
{ "Makefile", "makefile", "%.mk$", "%.make$", "%.mak$" },
|
||||
{
|
||||
{ { "#.*\n" }, "comment" },
|
||||
{ { "[[.]]}" }, "normal" },
|
||||
{ { "$[@^<%%?+|*]" }, "keyword2" },
|
||||
{ { "$%(", "%)" }, "keyword" },
|
||||
{ { "%f[%w_][%d%.]+%f[^%w_]" }, "number" },
|
||||
{ { "%..*:" }, "keyword2" },
|
||||
{ { ".*:=" }, "function" },
|
||||
{ { ".*+=" }, "function" },
|
||||
{ { ".*%s=" }, "function" },
|
||||
},
|
||||
{},
|
||||
"#" } );
|
||||
}
|
||||
|
||||
static void addCSharp() {
|
||||
|
||||
@@ -202,8 +202,9 @@ void App::onDocumentModified( UICodeEditor* editor, TextDocument& ) {
|
||||
}
|
||||
|
||||
void App::openFileDialog() {
|
||||
UIFileDialog* dialog = UIFileDialog::New( UIFileDialog::DefaultFlags, "*",
|
||||
mLastFileFolder.empty() ? "." : mLastFileFolder );
|
||||
UIFileDialog* dialog =
|
||||
UIFileDialog::New( UIFileDialog::DefaultFlags, "*",
|
||||
mLastFileFolder.empty() ? getLastUsedFolder() : mLastFileFolder );
|
||||
dialog->setWindowFlags( UI_WIN_DEFAULT_FLAGS | UI_WIN_MAXIMIZE_BUTTON | UI_WIN_MODAL );
|
||||
dialog->setTitle( i18n( "open_file", "Open File" ) );
|
||||
dialog->setCloseShortcut( KEY_ESCAPE );
|
||||
|
||||
Reference in New Issue
Block a user