summaryrefslogtreecommitdiff
path: root/src/insert_completer.cc
AgeCommit message (Collapse)Author
2018-03-23Support `%` in `path` option to mean current buffer directoryMaxime Coste
In the end, % is not that painful to work with as its only set seldomly, and we usually dont need to use expansion at the same time. Moreover, it just requires a single \ to be escaped. Fixes #1562
2018-02-28InsertCompleter: refactor line completer implementationMaxime Coste
2018-02-27Add support for line completion in all buffersDelapouite
- via completers option with line=all vs line=buffer - via <c-x> L mapping
2018-01-25Insert complete: Remove path info with one bufferaver-d
This change is useful when using `set scope completers word=buffer`, instead of the default word=all. If candidates all come from the same buffer, then the path/filename information is the same and therefore unnecessary. This change prevents the same path from being repeated, and the buffer's source code is less obscured. More generally, there could be an option to disable the path information entirely in all cases, but for now this change seems a reasonable solution until any such option exists.
2017-12-21Completion: Use a heap to gather the best matches instead of sortingMaxime Coste
Generalize the behaviour of `shell-candidates` to insert completion, gather the best 100 matches by using a heap and poping max a hundred times.
2017-12-09InsertCompleter: Respected ignored_filename option in filename completerMaxime Coste
2017-12-06InsertCompleter: only accept words matching the target buffer word definitionMaxime Coste
The words we store in the WordDB are dependent on the extra_word_chars options, which can be different for different buffers. When completing words in a buffer based on the WordDB from another buffer, some candidates might contains characters that are not considered word character for the target buffer, ignore those words.
2017-11-25Add an InsertCompletionSelect hookMaxime Coste
InsertCompletionSelect will be called whenever the selected insert completion changes. If the original text is selected back, the hook parameter will be empty. If another candidate is selected, the hook parameter will be its text content. Fixes #1676
2017-11-22Remove unused lambda capturesfsub
This eliminates some warnings emitted by clang++.
2017-10-24Add distinct w (curr buf) / W (all buf) word completion for <c-x>Delapouite
2017-10-02Add 'line' in completers option as a way to force explicit <c-x>fDelapouite
2017-06-26Use the extra_word_chars option in word based normal commandsMaxime Coste
the completion_extra_word_chars is now gone, superseeded by extra_word_chars that gets used both for completion and for normal mode. Fixes #1304
2017-06-26Change completion_extra_word_char to be a list of codepoints instead of a stringMaxime Coste
2017-06-09Fix bug in word completerMaxime Coste
A bug could be triggered in the word completer when a multiselection would trigger word completion with one selection being at buffer first character.
2017-06-09Proper linear time insert completion insertionMaxime Coste
The previous solution, ad9b090ddf362220e7879370538db0b5cd14fe34, was failing when completion was not replacing any text, as going through SelectionList was not permitting to replace empty ranges. Handle replacement as first a deletion then an insert to get fast update, as having a list of forward deletions and then a list for forwad insertion is much faster to update than a list of interleaved delete/insert.
2017-06-08Fix quadratic behaviour in when selecting an insert completionMaxime Coste
Use the fast, linear time SelectionList::insert algorithm instead of an ad-hoc one that needs to call SelectionList::update after each modification of the buffer. Fixes #1417
2017-06-07Use range based accumulate wrapper instead of std::accumulateMaxime Coste
2017-03-07Replace uses of UnorderedMap with HashMapMaxime Coste
2017-02-27Fix clang warnings about uninitialized timestamp fieldMaxime Coste
Closes #1241
2017-02-20Fix performance of word completion with many different selectionsMaxime Coste
Fixes #1228
2017-01-30Fix explicit insert completion menu/info not hidingMaxime Coste
Fixes #1168
2017-01-29Make StringView and unit types trivial typesMaxime Coste
2017-01-08Apply clang-tidy modernize to the codebaseMaxime Coste
2016-12-04Only hide menu/info if the insert completer did display itMaxime Coste
Avoid hiding info boxes opened by other places in the code.
2016-12-03Change ValueId to just be an enum class, it does not need any operatorsMaxime Coste
2016-11-29Clean up includes of user_interface.hhMaxime Coste
2016-10-01Support codepoints of variable widthMaxime Coste
Add a ColumnCount type and use it in place of CharCount whenever more appropriate, take column size of codepoints into account for vertical movements and docstring wrapping. Fixes #811
2016-09-21Add InsertCompletionShow/InsertCompletionHide hooksMaxime Coste
2016-08-24Introduce the 'completion_extra_word_chars' optionMaxime Coste
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
2016-05-19Reject '//' as a file completion prefix to avoid cygwin network hosts listingMaxime Coste
2016-04-09Fix is_word ambiguous overloadMaxime Coste
2016-04-09fix word completion taking the words being edited as candidatesMaxime Coste
2016-04-09Pass the selection list to insert mode completer functionsMaxime Coste
2016-04-04Use a specific option type completions for insert completionMaxime Coste
Fix escaping in jedi.kak as well
2016-03-16Use ByteCoords directly for buffer insert/erase/replaceMaxime Coste
2016-03-14Support ~/ in insert mode filename completionMaxime Coste
2016-03-14Code cleanupsMaxime Coste
2016-03-12Do not include the debug buffer in word completionMaxime Coste
2016-02-28Code cleanupMaxime Coste
2016-02-27Remove direct access to ui, go through clientMaxime Coste
Client can now update menu/info positions when the window move around.
2016-02-17Hide info box when selecting empty insert completionMaxime Coste
2016-02-04String usage cleanupsMaxime Coste
2015-12-28Cleanup InsertCompleter get rid of unneeded candidate vector copyMaxime Coste
2015-12-27Add a static_words str-list option always considered for word completionMaxime Coste
Fixes #313
2015-10-30Make word insert completion work better with unicode charMaxime Coste
2015-10-30Fix preservation of entered text in option insert completerMaxime Coste
2015-10-30Minor code cleanup in insert_completer.ccMaxime Coste
2015-10-29Use ranked matches for option completion as wellMaxime Coste
2015-10-27Move more logic into RankedMatchMaxime Coste
2015-10-22Extract WordDB::RankedWord as RankedMatch in its own fileMaxime Coste