diff options
Diffstat (limited to 'src/actions')
-rw-r--r-- | src/actions/completion.js | 22 | ||||
-rw-r--r-- | src/actions/index.js | 5 |
2 files changed, 27 insertions, 0 deletions
diff --git a/src/actions/completion.js b/src/actions/completion.js new file mode 100644 index 0000000..1ffb025 --- /dev/null +++ b/src/actions/completion.js @@ -0,0 +1,22 @@ +import actions from '../actions'; + +const setItems = (groups) => { + return { + type: actions.COMPLETION_SET_ITEMS, + groups, + }; +}; + +const selectNext = () => { + return { + type: actions.COMPLETION_SELECT_NEXT + }; +}; + +const selectPrev = () => { + return { + type: actions.COMPLETION_SELECT_PREV + }; +}; + +export { setItems, selectNext, selectPrev }; diff --git a/src/actions/index.js b/src/actions/index.js index 7b79864..2aa28fa 100644 --- a/src/actions/index.js +++ b/src/actions/index.js @@ -9,4 +9,9 @@ export default { INPUT_KEY_PRESS: 'input.key,press', INPUT_CLEAR_KEYS: 'input.clear.keys', INPUT_SET_KEYMAPS: 'input.set,keymaps', + + // Completion + COMPLETION_SET_ITEMS: 'completion.set.items', + COMPLETION_SELECT_NEXT: 'completions.select.next', + COMPLETION_SELECT_PREV: 'completions.select.prev' }; |