mirror of
https://github.com/vale981/emacs-ipython-notebook
synced 2025-03-05 09:01:40 -05:00
New branch for company-mode backend development.
This commit is contained in:
parent
a752e45772
commit
db630250ac
3 changed files with 61 additions and 1 deletions
2
Makefile
2
Makefile
|
@ -1,6 +1,6 @@
|
|||
EMACS ?= emacs
|
||||
IPYTHON = env/ipy.$(IPY_VERSION)/bin/ipython
|
||||
IPY_VERSION = 2.2.0
|
||||
IPY_VERSION = 4.0.0
|
||||
TESTEIN = tools/testein.py
|
||||
TESTEIN_OPTS =
|
||||
PKG_INFO = \
|
||||
|
|
56
lisp/ein-company.el
Normal file
56
lisp/ein-company.el
Normal file
|
@ -0,0 +1,56 @@
|
|||
;;; ein-company.el --- Company extension
|
||||
|
||||
;; Copyright (C) 2016 - John M. Miller
|
||||
|
||||
;; Author: Takafumi Arakaki <aka.tkf at gmail.com>
|
||||
;; : John M. Miller <millejoh at mac.com>
|
||||
|
||||
;; This file is NOT part of GNU Emacs.
|
||||
|
||||
;; ein-company.el is free software: you can redistribute it and/or modify it
|
||||
;; under the terms of the GNU General Public License as published by the Free
|
||||
;; Software Foundation, either version 3 of the License, or (at your option) any
|
||||
;; later version.
|
||||
|
||||
;; ein-ac.el is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
;; WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
;; A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
;; You should have received a copy of the GNU General Public License along with
|
||||
;; ein-ac.el. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Provide backend company autocompletion.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(require cl-lib)
|
||||
(require ein-ac)
|
||||
|
||||
;; Same as ein:ac-chunk-regex.
|
||||
(defvar ein:company-chunk-regex
|
||||
(rx (group (| (syntax whitespace)
|
||||
(syntax open-parenthesis)
|
||||
(syntax close-parenthesis)
|
||||
(syntax string-quote) ; Complete files for `open("path/..`
|
||||
bol))
|
||||
(? (syntax punctuation)) ; to complete ``~/PATH/...``
|
||||
(* (+ (| (syntax word) (syntax symbol)))
|
||||
(syntax punctuation))
|
||||
(+ (| (syntax word) (syntax symbol)))
|
||||
(? (syntax punctuation))
|
||||
point)
|
||||
"A regexp that matches to a \"chunk\" containing words and dots.")
|
||||
|
||||
(defun ein:company-candidates (arg)
|
||||
)
|
||||
|
||||
(defun ein:company-backend (command &optional arg &rest ignored)
|
||||
(interactive (list 'interactive))
|
||||
(cl-case command
|
||||
(interactive (company-begin-backend 'ein:company-backend))
|
||||
(prefix (company-grab-symbol-cons ein:company-chunk-regex))
|
||||
(candidates (ein:ac-direct-get-matches))
|
||||
(annotation )
|
||||
(meta ac))
|
4
tools/requirement-ipy.4.0.0.txt
Normal file
4
tools/requirement-ipy.4.0.0.txt
Normal file
|
@ -0,0 +1,4 @@
|
|||
jupyter==1.0.0
|
||||
pyzmq
|
||||
tornado
|
||||
jsonschema
|
Loading…
Add table
Reference in a new issue