Created
October 29, 2016 06:17
-
-
Save baongoc124/01ba9d65f9fadda3345687f65fe8d057 to your computer and use it in GitHub Desktop.
Webcomplete implementation for Emacs with Chrome/Chromium on Linux.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defvar ac-source-chrome-cache nil) | |
| (defvar ac-source-chrome-complete | |
| '((candidates . (ac-chrome-candidate)) | |
| (symbol . "w"))) | |
| (defun clear-chrome-cache () | |
| (setq ac-source-chrome-cache nil)) | |
| (add-hook 'focus-in-hook 'clear-chrome-cache) | |
| (defun ac-chrome-candidate () | |
| (or ac-source-chrome-cache | |
| (setq ac-source-chrome-cache (or (split-string (shell-command-to-string "chromecomplete.py")) | |
| '(""))))) | |
| (setq-default ac-sources (push 'ac-source-chrome-complete ac-sources)) |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Must be combined with this script https://gist.github.com/baongoc124/ab7fab56f9f95363c75ff79b19257b60
See the demo here https://youtu.be/z_X8Wvwmu1w
Original plugin here https://github.com/thalesmello/webcomplete.vim