From 01fce1781ee96d75f8569061274d6be53a7412e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Lien=20Sell=C3=A6g?= Date: Mon, 23 May 2016 01:29:55 +0200 Subject: [PATCH 01/14] Add appveyor.yml and attempt of windows build --- .travis.yml | 2 +- appveyor.yml | 15 +++++++++++++++ ci/compile.sh | 11 ++++++++++- ci/execute.sh | 14 ++++++++++++++ ci/{update_travis.sh => update_ci.sh} | 12 ++++++++++++ 5 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 appveyor.yml rename ci/{update_travis.sh => update_ci.sh} (59%) diff --git a/.travis.yml b/.travis.yml index 1383c0e6..9f81098e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,7 @@ services: - docker before_install: - - ./ci/update_travis.sh + - ./ci/update_ci.sh script: - script=compile CXX=clang++ CC=clang ./ci/execute.sh diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 00000000..2e3274a9 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,15 @@ +platform: + - x86 + - x64 + +before_build: + - C:\msys64\usr\bin\pacman --noconfirm --sync --refresh --refresh pacman + - C:\msys64\usr\bin\pacman --noconfirm --sync --refresh --refresh git + - C:\msys64\usr\bin\pacman --noconfirm --sync --refresh --refresh --sysupgrade --sysupgrade + +build_script: + - C:\msys64\usr\bin\bash -lc "script=compile CXX=clang++ CC=clang $(cygpath ${APPVEYOR_BUILD_FOLDER})/ci/execute.sh" + - C:\msys64\usr\bin\bash -lc "script=clean $(cygpath ${APPVEYOR_BUILD_FOLDER})/ci/execute.sh" + - C:\msys64\usr\bin\bash -lc "script=compile $(cygpath ${APPVEYOR_BUILD_FOLDER})/ci/execute.sh" + - C:\msys64\usr\bin\bash -lc "script=static_analysis $(cygpath ${APPVEYOR_BUILD_FOLDER})/ci/execute.sh" + - C:\msys64\usr\bin\bash -lc "script=compile make_command=\"broadwayd & make test\" $(cygpath ${APPVEYOR_BUILD_FOLDER})/ci/execute.sh" diff --git a/ci/compile.sh b/ci/compile.sh index 9a072b0f..aac3547a 100755 --- a/ci/compile.sh +++ b/ci/compile.sh @@ -1,7 +1,16 @@ #!/bin/bash if [ "${cmake_command}" == "" ]; then - cmake_command="cmake -DENABLE_TESTING=1 -DCMAKE_CXX_FLAGS=-Werror .." + if [ $APPVEYOR ]; then + if [ "$PLATFORM" == "x64" ]; then + mingw="mingw64" + else + mingw="mingw32" + fi + cmake_command="cmake -G\"MSYS Makefiles\" -DCMAKE_INSTALL_PREFIX=/${mingw} .. -DENABLE_TESTING=1 -DCMAKE_CXX_FLAGS=-Werror .." + else + cmake_command="cmake -DENABLE_TESTING=1 -DCMAKE_CXX_FLAGS=-Werror .." + fi fi if [ "${make_command}" == "" ]; then diff --git a/ci/execute.sh b/ci/execute.sh index a90cee56..0cfdc760 100755 --- a/ci/execute.sh +++ b/ci/execute.sh @@ -22,4 +22,18 @@ function osx () { true } +function windows () { + cd "$(dirname "$0")" || exit + if [ "${script}" == "clean" ]; then + sudo rm ./build -rf + return 0 + fi + sh -c "./ci/${script}.sh" +} + + +if [ "$TRAVIS_OS_NAME" == "" ]; then + TRAVIS_OS_NAME=windows +fi + $TRAVIS_OS_NAME diff --git a/ci/update_travis.sh b/ci/update_ci.sh similarity index 59% rename from ci/update_travis.sh rename to ci/update_ci.sh index 8969baee..693b2c24 100755 --- a/ci/update_travis.sh +++ b/ci/update_ci.sh @@ -19,4 +19,16 @@ function osx () { brew install cmake pkg-config boost homebrew/x11/gtksourceviewmm3 aspell clang-format } +function windows () { + arch=x86_64 + if [ "$PLATFORM" == "x86" ]; then + arch=i686 + fi + sh -c "pacman -S git mingw-w64-${arch}-cmake make mingw-w64-${arch}-toolchain mingw-w64-${arch}-clang mingw-w64-${arch}-gtkmm3 mingw-w64-${arch}-gtksourceviewmm3 mingw-w64-${arch}-boost mingw-w64-${arch}-aspell mingw-w64-${arch}-aspell-en" +} + +if [ "$TRAVIS_OS_NAME" == "" ]; then + TRAVIS_OS_NAME=windows +fi + $TRAVIS_OS_NAME \ No newline at end of file From bb711f70d09bd04cac8d547274b0e33de6ae9538 Mon Sep 17 00:00:00 2001 From: eidheim Date: Thu, 26 May 2016 15:19:29 +0200 Subject: [PATCH 02/14] Add process_test, and fixits test in source_view_test --- src/CMakeLists.txt | 9 ++++--- src/source.h | 2 +- src/source_clang.cc | 31 +++-------------------- src/window.cc | 34 +++++++++++++++++++++++--- tests/CMakeLists.txt | 5 ++++ tests/process_test.cc | 50 ++++++++++++++++++++++++++++++++++++++ tests/source_clang_test.cc | 1 + 7 files changed, 96 insertions(+), 36 deletions(-) create mode 100644 tests/process_test.cc diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8e8e0b19..2539e967 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -36,6 +36,7 @@ set(global_libraries set(project_files config.cc dialogs.cc + dialogs_unix.cc directories.cc entrybox.cc info.cc @@ -47,8 +48,6 @@ set(project_files terminal.cc tooltips.cc window.cc - - ../tiny-process-library/process.cpp ) #Files used both in ../src and ../tests @@ -74,6 +73,8 @@ set(project_shared_files ../libclangmm/src/Tokens.cc ../libclangmm/src/TranslationUnit.cc ../libclangmm/src/Utility.cc + + ../tiny-process-library/process.cpp ) if(LIBLLDB_FOUND) @@ -81,9 +82,9 @@ if(LIBLLDB_FOUND) endif() if(MSYS) - list(APPEND project_files dialogs_unix.cc ../tiny-process-library/process_win.cpp) + list(APPEND project_shared_files ../tiny-process-library/process_win.cpp) else() - list(APPEND project_files dialogs_unix.cc ../tiny-process-library/process_unix.cpp) + list(APPEND project_shared_files ../tiny-process-library/process_unix.cpp) endif() include_directories(${global_includes}) diff --git a/src/source.h b/src/source.h index e29a22fa..5acfde1e 100644 --- a/src/source.h +++ b/src/source.h @@ -81,7 +81,7 @@ namespace Source { std::function get_token_spelling; std::function >(const std::vector &views, const std::string &text)> rename_similar_tokens; std::function goto_next_diagnostic; - std::function apply_fix_its; + std::function()> get_fix_its; std::unique_ptr autocomplete_dialog; std::unique_ptr selection_dialog; diff --git a/src/source_clang.cc b/src/source_clang.cc index c6e59009..23beff54 100644 --- a/src/source_clang.cc +++ b/src/source_clang.cc @@ -1275,37 +1275,12 @@ Source::ClangViewAutocomplete(file_path, language) { } }; - apply_fix_its=[this]() { + get_fix_its=[this]() { if(!parsed) { Info::get().print("Buffer is parsing"); - return; - } - std::vector, Glib::RefPtr > > fix_it_marks; - for(auto &fix_it: fix_its) { - auto start_iter=get_buffer()->get_iter_at_line_index(fix_it.offsets.first.line-1, fix_it.offsets.first.index-1); - auto end_iter=get_buffer()->get_iter_at_line_index(fix_it.offsets.second.line-1, fix_it.offsets.second.index-1); - fix_it_marks.emplace_back(get_buffer()->create_mark(start_iter), get_buffer()->create_mark(end_iter)); - } - size_t c=0; - get_buffer()->begin_user_action(); - for(auto &fix_it: fix_its) { - if(fix_it.type==FixIt::Type::INSERT) { - get_buffer()->insert(fix_it_marks[c].first->get_iter(), fix_it.source); - } - if(fix_it.type==FixIt::Type::REPLACE) { - get_buffer()->erase(fix_it_marks[c].first->get_iter(), fix_it_marks[c].second->get_iter()); - get_buffer()->insert(fix_it_marks[c].first->get_iter(), fix_it.source); - } - if(fix_it.type==FixIt::Type::ERASE) { - get_buffer()->erase(fix_it_marks[c].first->get_iter(), fix_it_marks[c].second->get_iter()); - } - c++; + return std::vector(); } - for(auto &mark_pair: fix_it_marks) { - get_buffer()->delete_mark(mark_pair.first); - get_buffer()->delete_mark(mark_pair.second); - } - get_buffer()->end_user_action(); + return fix_its; }; } diff --git a/src/window.cc b/src/window.cc index c459829c..dc0099c2 100644 --- a/src/window.cc +++ b/src/window.cc @@ -552,8 +552,36 @@ void Window::set_menu_actions() { }); menu.add_action("source_apply_fix_its", [this]() { if(notebook.get_current_page()!=-1) { - if(notebook.get_current_view()->apply_fix_its) { - notebook.get_current_view()->apply_fix_its(); + auto view=notebook.get_current_view(); + if(view->get_fix_its) { + auto buffer=view->get_buffer(); + auto fix_its=view->get_fix_its(); + std::vector, Glib::RefPtr > > fix_it_marks; + for(auto &fix_it: fix_its) { + auto start_iter=buffer->get_iter_at_line_index(fix_it.offsets.first.line-1, fix_it.offsets.first.index-1); + auto end_iter=buffer->get_iter_at_line_index(fix_it.offsets.second.line-1, fix_it.offsets.second.index-1); + fix_it_marks.emplace_back(buffer->create_mark(start_iter), buffer->create_mark(end_iter)); + } + size_t c=0; + buffer->begin_user_action(); + for(auto &fix_it: fix_its) { + if(fix_it.type==Source::FixIt::Type::INSERT) { + buffer->insert(fix_it_marks[c].first->get_iter(), fix_it.source); + } + if(fix_it.type==Source::FixIt::Type::REPLACE) { + buffer->erase(fix_it_marks[c].first->get_iter(), fix_it_marks[c].second->get_iter()); + buffer->insert(fix_it_marks[c].first->get_iter(), fix_it.source); + } + if(fix_it.type==Source::FixIt::Type::ERASE) { + buffer->erase(fix_it_marks[c].first->get_iter(), fix_it_marks[c].second->get_iter()); + } + c++; + } + for(auto &mark_pair: fix_it_marks) { + buffer->delete_mark(mark_pair.first); + buffer->delete_mark(mark_pair.second); + } + buffer->end_user_action(); } } }); @@ -810,7 +838,7 @@ void Window::activate_menu_items(bool activate) { menu.actions["source_goto_method"]->set_enabled(activate ? static_cast(notebook.get_current_view()->get_methods) : false); menu.actions["source_rename"]->set_enabled(activate ? static_cast(notebook.get_current_view()->rename_similar_tokens) : false); menu.actions["source_goto_next_diagnostic"]->set_enabled(activate ? static_cast(notebook.get_current_view()->goto_next_diagnostic) : false); - menu.actions["source_apply_fix_its"]->set_enabled(activate ? static_cast(notebook.get_current_view()->apply_fix_its) : false); + menu.actions["source_apply_fix_its"]->set_enabled(activate ? static_cast(notebook.get_current_view()->get_fix_its) : false); #ifdef JUCI_ENABLE_DEBUG if(notebook.get_current_page()!=-1) { auto view=notebook.get_current_view(); diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 7443bafc..31c8f4de 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -33,6 +33,11 @@ add_library(stubs OBJECT ${stub_files}) include_directories(${global_includes}) +add_executable(process_test process_test.cc + $ $) +target_link_libraries(process_test ${global_libraries}) +add_test(process_test process_test) + add_executable(cmake_build_test cmake_build_test.cc $ $) target_link_libraries(cmake_build_test ${global_libraries}) diff --git a/tests/process_test.cc b/tests/process_test.cc new file mode 100644 index 00000000..7cd9cb68 --- /dev/null +++ b/tests/process_test.cc @@ -0,0 +1,50 @@ +#include +#include "process.hpp" + +int main() { + auto output=std::make_shared(); + auto error=std::make_shared(); + { + Process process("echo Test", "", [output](const char *bytes, size_t n) { + *output+=std::string(bytes, n); + }); + g_assert(process.get_exit_status()==0); + g_assert(output->substr(0, 4)=="Test"); + output->clear(); + } + + { + Process process("echo Test && ls an_incorrect_path", "", [output](const char *bytes, size_t n) { + *output+=std::string(bytes, n); + }, [error](const char *bytes, size_t n) { + *error+=std::string(bytes, n); + }); + g_assert(process.get_exit_status()>0); + g_assert(output->substr(0, 4)=="Test"); + g_assert(!error->empty()); + output->clear(); + error->clear(); + } + + { + Process process("bash", "", [output](const char *bytes, size_t n) { + *output+=std::string(bytes, n); + }, nullptr, true); + process.write("echo Test\n"); + process.write("exit\n"); + g_assert(process.get_exit_status()==0); + g_assert(output->substr(0, 4)=="Test"); + output->clear(); + } + + { + Process process("cat", "", [output](const char *bytes, size_t n) { + *output+=std::string(bytes, n); + }, nullptr, true); + process.write("Test\n"); + process.close_stdin(); + g_assert(process.get_exit_status()==0); + g_assert(output->substr(0, 4)=="Test"); + output->clear(); + } +} diff --git a/tests/source_clang_test.cc b/tests/source_clang_test.cc index 52d02c1c..4ed2e8d9 100644 --- a/tests/source_clang_test.cc +++ b/tests/source_clang_test.cc @@ -73,6 +73,7 @@ int main() { while(!clang_view->parsed) flush_events(); g_assert_cmpuint(clang_view->diagnostics.size(), >, 0); + g_assert_cmpuint(clang_view->get_fix_its().size(), >, 0); clang_view->async_delete(); clang_view->delete_thread.join(); From 41760f606c296c231a35127a7ad12622ad18b437 Mon Sep 17 00:00:00 2001 From: eidheim Date: Fri, 27 May 2016 09:48:04 +0200 Subject: [PATCH 03/14] Added preference item tab_indents_line (default: true) fixes #226, and now uses raw string literals in src/files.h --- src/config.cc | 7 +- src/config.h | 1 + src/files.h | 639 +++++++++++++++++++++++++------------------------- src/source.cc | 9 +- 4 files changed, 337 insertions(+), 319 deletions(-) diff --git a/src/config.cc b/src/config.cc index e97df057..469a2f2d 100644 --- a/src/config.cc +++ b/src/config.cc @@ -49,7 +49,7 @@ void Config::load() { catch(const std::exception &e) { ::Terminal::get().print("Error: could not parse "+config_json+": "+e.what()+"\n", true); std::stringstream ss; - ss << configjson; + ss << default_config_file; boost::property_tree::read_json(ss, cfg); retrieve_config(); } @@ -63,7 +63,7 @@ void Config::find_or_create_config_files() { boost::filesystem::create_directories(config_dir); // io exp captured by calling method if (!boost::filesystem::exists(config_json)) - filesystem::write(config_json, configjson); + filesystem::write(config_json, default_config_file); auto juci_style_path = home/"styles"; boost::filesystem::create_directories(juci_style_path); // io exp captured by calling method @@ -160,7 +160,7 @@ void Config::update_config_file() { try { if(cfg.get("version")!=JUCI_VERSION) { std::stringstream ss; - ss << configjson; + ss << default_config_file; boost::property_tree::read_json(ss, default_cfg); cfg_ok=false; if(cfg.count("version")>0) @@ -196,6 +196,7 @@ void Config::get_source() { source.default_tab_char = source_json.get("default_tab_char"); source.default_tab_size = source_json.get("default_tab_size"); source.auto_tab_char_and_size = source_json.get("auto_tab_char_and_size"); + source.tab_indents_line = source_json.get("tab_indents_line"); source.wrap_lines = source_json.get("wrap_lines"); diff --git a/src/config.h b/src/config.h index 7212836e..60d318ee 100644 --- a/src/config.h +++ b/src/config.h @@ -64,6 +64,7 @@ class Config { bool auto_tab_char_and_size; char default_tab_char; unsigned default_tab_size; + bool tab_indents_line; bool wrap_lines; bool highlight_current_line; bool show_line_numbers; diff --git a/src/files.h b/src/files.h index 906c44c6..028e2e5f 100644 --- a/src/files.h +++ b/src/files.h @@ -2,331 +2,342 @@ #define JUCI_FILES_H_ #include -#define JUCI_VERSION "1.1.3-3" - -const std::string configjson = -"{\n" -" \"version\": \""+std::string(JUCI_VERSION)+"\",\n" -" \"default_window_size\": {\n" -" \"width\": 800,\n" -" \"height\": 600\n" -" },\n" -" \"gtk_theme\": {\n" -" \"name_comment\": \"Use \\\"\\\" for default theme, At least these two exist on all systems: Adwaita, Raleigh\",\n" -" \"name\": \"\",\n" -" \"variant_comment\": \"Use \\\"\\\" for default variant, and \\\"dark\\\" for dark theme variant. Note that not all themes support dark variant, but for instance Adwaita does\",\n" -" \"variant\": \"\"\n" -" },\n" -" \"terminal\": {\n" -" \"history_size\": 1000,\n" -" \"font_comment\": \"Use \\\"\\\" to use source.font with slightly smaller size\",\n" -" \"font\": \"\"\n" -" },\n" -" \"source\": {\n" -" \"style_comment\": \"Use \\\"\\\" for default style, and for instance juci-dark or juci-dark-blue together with dark gtk_theme variant. Styles from normal gtksourceview install: classic, cobalt, kate, oblivion, solarized-dark, solarized-light, tango\",\n" -" \"style\": \"juci-light\",\n" -" \"font_comment\": \"Use \\\"\\\" for default font, and for instance \\\"Monospace 12\\\" to also set size\",\n" +#define JUCI_VERSION "1.1.3-4" + +const std::string default_config_file = R"RAW({ + "version": ")RAW"+std::string(JUCI_VERSION)+R"RAW(", + "default_window_size": { + "width": 800, + "height": 600 + }, + "gtk_theme": { + "name_comment": "Use \"\" for default theme, At least these two exist on all systems: Adwaita, Raleigh", + "name": "", + "variant_comment": "Use \"\" for default variant, and \"dark\" for dark theme variant. Note that not all themes support dark variant, but for instance Adwaita does", + "variant": "" + }, + "terminal": { + "history_size": 1000, + "font_comment": "Use \"\" to use source.font with slightly smaller size", + "font": "" + }, + "source": { + "style_comment": "Use \"\" for default style, and for instance juci-dark or juci-dark-blue together with dark gtk_theme variant. Styles from normal gtksourceview install: classic, cobalt, kate, oblivion, solarized-dark, solarized-light, tango", + "style": "juci-light", + "font_comment": "Use \"\" for default font, and for instance \"Monospace 12\" to also set size",)RAW" #ifdef __APPLE__ -" \"font\": \"Menlo 11\",\n" +R"RAW( + "font": "Menlo 11",)RAW" #else #ifdef _WIN32 -" \"font\": \"Consolas\",\n" +R"RAW( + "font": "Consolas",)RAW" #else -" \"font\": \"Monospace\",\n" +R"RAW( + "font": "Monospace",)RAW" #endif #endif -" \"cleanup_whitespace_characters_comment\": \"Remove trailing whitespace characters on save, and add trailing newline if missing\",\n" -" \"cleanup_whitespace_characters\": false,\n" -" \"show_whitespace_characters_comment\": \"Determines what kind of whitespaces should be drawn. Use comma-separated list of: space, tab, newline, nbsp, leading, text, trailing or all\",\n" -" \"show_whitespace_characters\": \"\",\n" -" \"show_map\": true,\n" -" \"map_font_size\": \"1\",\n" -" \"spellcheck_language_comment\": \"Use \\\"\\\" to set language from your locale settings\",\n" -" \"spellcheck_language\": \"en_US\",\n" -" \"auto_tab_char_and_size_comment\": \"Use false to always use default tab char and size\",\n" -" \"auto_tab_char_and_size\": true,\n" -" \"default_tab_char_comment\": \"Use \\\"\\t\\\" for regular tab\",\n" -" \"default_tab_char\": \" \",\n" -" \"default_tab_size\": 2,\n" -" \"wrap_lines\": false,\n" -" \"highlight_current_line\": true,\n" -" \"show_line_numbers\": true,\n" -" \"clang_types\": {\n" -" \"8\": \"def:function\",\n" -" \"21\": \"def:function\",\n" -" \"22\": \"def:identifier\",\n" -" \"24\": \"def:function\",\n" -" \"25\": \"def:function\",\n" -" \"43\": \"def:type\",\n" -" \"44\": \"def:type\",\n" -" \"45\": \"def:type\",\n" -" \"46\": \"def:identifier\",\n" -" \"109\": \"def:string\",\n" -" \"702\": \"def:statement\",\n" -" \"705\": \"def:comment\"\n" -" },\n" -" \"clang_format_style_comment\": \"IndentWidth, AccessModifierOffset and UseTab are set automatically. See http://clang.llvm.org/docs/ClangFormatStyleOptions.html\",\n" -" \"clang_format_style\": \"ColumnLimit: 0, MaxEmptyLinesToKeep: 2\"\n" -" },\n" -" \"keybindings\": {\n" -" \"preferences\": \"comma\",\n" -" \"quit\": \"q\",\n" -" \"new_file\": \"n\",\n" -" \"new_folder\": \"n\",\n" -" \"open_file\": \"o\",\n" -" \"open_folder\": \"o\",\n" -" \"save\": \"s\",\n" -" \"save_as\": \"s\",\n" -" \"print\": \"p\",\n" -" \"edit_undo\": \"z\",\n" -" \"edit_redo\": \"z\",\n" -" \"edit_cut\": \"x\",\n" -" \"edit_copy\": \"c\",\n" -" \"edit_paste\": \"v\",\n" -" \"edit_find\": \"f\",\n" -" \"edit_set_tab\": \"\",\n" -" \"source_spellcheck\": \"\",\n" -" \"source_spellcheck_clear\": \"\",\n" -" \"source_spellcheck_next_error\": \"e\",\n" -" \"source_indentation_set_buffer_tab\": \"\",\n" -" \"source_indentation_auto_indent_buffer\": \"i\",\n" -" \"source_goto_line\": \"g\",\n" -" \"source_center_cursor\": \"l\",\n" -" \"source_find_documentation\": \"d\",\n" -" \"source_goto_declaration\": \"d\",\n" -" \"source_goto_implementation\": \"i\",\n" -" \"source_goto_usage\": \"u\",\n" -" \"source_goto_method\": \"m\",\n" -" \"source_rename\": \"r\",\n" -" \"source_goto_next_diagnostic\": \"e\",\n" -" \"source_apply_fix_its\": \"space\",\n" -" \"project_set_run_arguments\": \"\",\n" -" \"compile_and_run\": \"Return\",\n" -" \"compile\": \"Return\",\n" -" \"run_command\": \"Return\",\n" -" \"kill_last_running\": \"Escape\",\n" -" \"force_kill_last_running\": \"Escape\",\n" -" \"debug_set_run_arguments\": \"\",\n" -" \"debug_start_continue\": \"y\",\n" -" \"debug_stop\": \"y\",\n" -" \"debug_kill\": \"k\",\n" -" \"debug_step_over\": \"j\",\n" -" \"debug_step_into\": \"t\",\n" -" \"debug_step_out\": \"t\",\n" -" \"debug_backtrace\": \"j\",\n" -" \"debug_show_variables\": \"b\",\n" -" \"debug_run_command\": \"Return\",\n" -" \"debug_toggle_breakpoint\": \"b\",\n" -" \"debug_goto_stop\": \"l\",\n" +R"RAW( + "cleanup_whitespace_characters_comment": "Remove trailing whitespace characters on save, and add trailing newline if missing", + "cleanup_whitespace_characters": false, + "show_whitespace_characters_comment": "Determines what kind of whitespaces should be drawn. Use comma-separated list of: space, tab, newline, nbsp, leading, text, trailing or all", + "show_whitespace_characters": "", + "show_map": true, + "map_font_size": "1", + "spellcheck_language_comment": "Use \"\" to set language from your locale settings", + "spellcheck_language": "en_US", + "auto_tab_char_and_size_comment": "Use false to always use default tab char and size", + "auto_tab_char_and_size": true, + "default_tab_char_comment": "Use \"\t\" for regular tab", + "default_tab_char": " ", + "default_tab_size": 2, + "tab_indents_line": true, + "wrap_lines": false, + "highlight_current_line": true, + "show_line_numbers": true, + "clang_types": { + "8": "def:function", + "21": "def:function", + "22": "def:identifier", + "24": "def:function", + "25": "def:function", + "43": "def:type", + "44": "def:type", + "45": "def:type", + "46": "def:identifier", + "109": "def:string", + "702": "def:statement", + "705": "def:comment" + }, + "clang_format_style_comment": "IndentWidth, AccessModifierOffset and UseTab are set automatically. See http://clang.llvm.org/docs/ClangFormatStyleOptions.html", + "clang_format_style": "ColumnLimit: 0, MaxEmptyLinesToKeep: 2" + }, + "keybindings": { + "preferences": "comma", + "quit": "q", + "new_file": "n", + "new_folder": "n", + "open_file": "o", + "open_folder": "o", + "save": "s", + "save_as": "s", + "print": "p", + "edit_undo": "z", + "edit_redo": "z", + "edit_cut": "x", + "edit_copy": "c", + "edit_paste": "v", + "edit_find": "f", + "edit_set_tab": "", + "source_spellcheck": "", + "source_spellcheck_clear": "", + "source_spellcheck_next_error": "e", + "source_indentation_set_buffer_tab": "", + "source_indentation_auto_indent_buffer": "i", + "source_goto_line": "g", + "source_center_cursor": "l", + "source_find_documentation": "d", + "source_goto_declaration": "d", + "source_goto_implementation": "i", + "source_goto_usage": "u", + "source_goto_method": "m", + "source_rename": "r", + "source_goto_next_diagnostic": "e", + "source_apply_fix_its": "space", + "project_set_run_arguments": "", + "compile_and_run": "Return", + "compile": "Return", + "run_command": "Return", + "kill_last_running": "Escape", + "force_kill_last_running": "Escape", + "debug_set_run_arguments": "", + "debug_start_continue": "y", + "debug_stop": "y", + "debug_kill": "k", + "debug_step_over": "j", + "debug_step_into": "t", + "debug_step_out": "t", + "debug_backtrace": "j", + "debug_show_variables": "b", + "debug_run_command": "Return", + "debug_toggle_breakpoint": "b", + "debug_goto_stop": "l",)RAW" #ifdef __linux -" \"next_tab\": \"Tab\",\n" -" \"previous_tab\": \"Tab\",\n" +R"RAW( + "next_tab": "Tab", + "previous_tab": "Tab",)RAW" #else -" \"next_tab\": \"Right\",\n" -" \"previous_tab\": \"Left\",\n" +R"RAW( + "next_tab": "Right", + "previous_tab": "Left",)RAW" #endif -" \"close_tab\": \"w\"\n" -" },\n" -" \"project\": {\n" -" \"default_build_path_comment\": \"Use to insert the project top level directory name\",\n" -" \"default_build_path\": \"./build\",\n" -" \"debug_build_path_comment\": \"Use to insert the project top level directory name, and to insert your default_build_path setting.\",\n" -" \"debug_build_path\": \"/debug\",\n" +R"RAW( + "close_tab": "w" + }, + "project": { + "default_build_path_comment": "Use to insert the project top level directory name", + "default_build_path": "./build", + "debug_build_path_comment": "Use to insert the project top level directory name, and to insert your default_build_path setting.", + "debug_build_path": "/debug",)RAW" #ifdef _WIN32 -" \"cmake_command\": \"cmake -G\\\"MSYS Makefiles\\\"\",\n" +R"RAW( + "cmake_command": "cmake -G\"MSYS Makefiles\"",)RAW" #else -" \"cmake_command\": \"cmake\",\n" +R"RAW( + "cmake_command": "cmake",)RAW" #endif -" \"make_command\": \"cmake --build .\",\n" -" \"save_on_compile_or_run\": true,\n" -" \"clear_terminal_on_compile\": true\n" -" },\n" -" \"documentation_searches\": {\n" -" \"clang\": {\n" -" \"separator\": \"::\",\n" -" \"queries\": {\n" -" \"@empty\": \"https://www.google.com/search?btnI&q=c%2B%2B+\",\n" -" \"std\": \"https://www.google.com/search?btnI&q=site:http://www.cplusplus.com/reference/+\",\n" -" \"boost\": \"https://www.google.com/search?btnI&q=site:http://www.boost.org/doc/libs/1_59_0/+\",\n" -" \"Gtk\": \"https://www.google.com/search?btnI&q=site:https://developer.gnome.org/gtkmm/stable/+\",\n" -" \"@any\": \"https://www.google.com/search?btnI&q=\"\n" -" }\n" -" }\n" -" }\n" -"}\n"; - -const std::string juci_light_style = -"\n" -"\n" -"\n" -" juCi++ team\n" -" <_description>Default juCi++ style\n" -"\n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -" \n" -"\n" -"