Browse Source

Can now use locale settings to set spellcheck language.

merge-requests/365/head
eidheim 10 years ago
parent
commit
4dbe858b16
  1. 2
      README.md
  2. 2
      src/files.h
  3. 3
      src/source.cc

2
README.md

@ -11,7 +11,7 @@ towards libclang with speed in mind.
* C++ warnings and errors on the fly * C++ warnings and errors on the fly
* Fast C++ autocomletion (even external libraries) * Fast C++ autocomletion (even external libraries)
* Tooltips showing type information and doxygen documentation * Tooltips showing type information and doxygen documentation
* Accurate refactoring across files * Refactoring across files
* Highlighting of similar types * Highlighting of similar types
* Spell checking depending on file context * Spell checking depending on file context
* Basic editor functionallity * Basic editor functionallity

2
src/files.h

@ -17,7 +17,7 @@ const std::string configjson =
#endif #endif
#endif #endif
"//Use \"\" for default font, and for instance \"Monospace 12\" to also set size.\n" "//Use \"\" for default font, and for instance \"Monospace 12\" to also set size.\n"
" \"spellcheck_language\": \"en_US\", \n" " \"spellcheck_language\": \"en_US\", //Use \"\" to set language from your locale settings\n"
" \"clang_types\": {\n" " \"clang_types\": {\n"
" \"8\": \"def:function\",\n" " \"8\": \"def:function\",\n"
" \"21\": \"def:function\",\n" " \"21\": \"def:function\",\n"

3
src/source.cc

@ -156,7 +156,8 @@ Source::View::View(const boost::filesystem::path &file_path): file_path(file_pat
if(spellcheck_config==NULL) { if(spellcheck_config==NULL) {
spellcheck_config=new_aspell_config(); spellcheck_config=new_aspell_config();
aspell_config_replace(spellcheck_config, "lang", Singleton::Config::source()->spellcheck_language.c_str()); if(Singleton::Config::source()->spellcheck_language.size()>0)
aspell_config_replace(spellcheck_config, "lang", Singleton::Config::source()->spellcheck_language.c_str());
} }
spellcheck_possible_err=new_aspell_speller(spellcheck_config); spellcheck_possible_err=new_aspell_speller(spellcheck_config);

Loading…
Cancel
Save