summaryrefslogtreecommitdiff
path: root/src/word_db.hh
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2016-08-21 20:25:11 +0100
committerMaxime Coste <frrrwww@gmail.com>2016-08-24 23:47:09 +0100
commit3f0415c765699cbeefac68090f146ee80d03827d (patch)
tree2a6f2271fb900ef59783974f225395e74699b271 /src/word_db.hh
parent9124851029700026bc937c81da829fbadcc5b29d (diff)
Introduce the 'completion_extra_word_chars' option
This string option is used to get all the additional characters that should be considered as "word" character for the purpose of insert mode completion. Fixes #758
Diffstat (limited to 'src/word_db.hh')
-rw-r--r--src/word_db.hh9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/word_db.hh b/src/word_db.hh
index 3dcf455d..c23d266e 100644
--- a/src/word_db.hh
+++ b/src/word_db.hh
@@ -13,12 +13,13 @@ namespace Kakoune
using RankedMatchList = Vector<RankedMatch>;
// maintain a database of words available in a buffer
-class WordDB
+class WordDB : public OptionManagerWatcher
{
public:
WordDB(const Buffer& buffer);
+ ~WordDB();
WordDB(const WordDB&) = delete;
- WordDB(WordDB&&) = default;
+ WordDB(WordDB&&);
RankedMatchList find_matching(StringView str);
@@ -28,6 +29,10 @@ private:
void add_words(StringView line);
void remove_words(StringView line);
+ void rebuild_db();
+
+ void on_option_changed(const Option& option) override;
+
struct WordInfo
{
StringDataPtr word;