Commit graph

23 commits

Author SHA1 Message Date
dickmao
512658883b @sam-s says Requiring ESS is wrong because it forces people who do NOT use it to install it.
The standard way to avoid this problem is to use autoload instead of require.
This way ESS is not required to compile and run EIN and it is only loaded if the user actually uses it.
2018-10-15 12:19:30 -04:00
dickmao
bc10cea743 Normalize url-or-port
```
"http://localhost:8888"
"http://localhost:8888/"
"http://127.0.0.1:8888"
"http://127.0.0.1:8888/"
"8888"
8888
```

Ideally these should converge to the same thing.  Since many hash
tables are keyed off `url-or-port`, forgetting to
normalize `url-or-port` with `ein:url` leads to missed cache hits and
general malaise.  So we try to do that.

Address a FIXME: apply callbacks to `ein:notebook-list-login-and-open`.

Removed py3.5 from travis build matrix to reduce developer strain.
2018-10-12 21:55:33 -05:00
John Miller
8adc38ae8f Code cleanup.
Get rid of some unused variable warnings, add some lexical-binding definitions
and update some documentation.
2018-09-18 21:46:35 -05:00
John Miller
7320c16b47 ein-company: Function annotations via oinfo db
As ein builds completions for company it will build a database of object-info
data that can later be used for function annotations.
2018-09-03 16:06:15 -05:00
John Miller
8b7f26d668 Refactor object info for company annotations. 2018-09-02 23:24:21 -05:00
John Miller
91d78370d3 EIN, Company, Jedi, and connected buffers
Not sure if it is really doing anything, but ein:use-company-jedi-backend is now
a valid setting for ein:completion-backends.

More useful is that connected buffers now use ein's company completeion backend,
so completion should now work across all backends all across ein. Now let's get
something working in org!
2018-08-25 13:41:09 -04:00
John Miller
c65c21403e Improving ein-company
Code for getting matches uses deferred and calls to `ein:completer-complete',
avoiding the hacks needed with `ein:completer-finish-completing-company' (names
are shorter too!). Using deferred makes reading the code a bit easier, I think.

EIN will also try to prepare function annotations via the python oinfo object.
Performance is not ideal when the completion candidate list is long, so there is
a new customizable variable `ein:allow-company-annotations' to control this
behavior.
2018-08-25 12:45:50 -04:00
John Miller
9c2e6fe7c8 ein-company: Only check for punctation near completion point.
This will allow ein-company backend to complete in the middle of a line.
2017-10-23 19:39:00 -05:00
John Miller
3fa575bbf4 ein-company: Tweak punctation check.
Spaces should also not trigger completion.
2017-10-22 19:20:41 -05:00
Sam Steingold
05ba2e257a fix a typo in 34902e1 2017-10-20 14:32:53 -04:00
John Miller
d7e1aece02 ein-company: Make sure matches actually start with right text.
This should address the original problem described in #225.
2017-10-20 12:05:01 -05:00
John Miller
34902e104f ein-company: Avoid completing around punctuation.
For some reason this causes the IPython kernel to return a very large number of
potential matches.
2017-10-20 11:55:31 -05:00
Sam Steingold
d447c8cc15 typos 2017-07-11 14:32:00 -04:00
John Miller
5c2f34ceeb Implement company locate command.
ein company backend now dutifully looks for the file and line where an object is
defined when company so asks it. When ein fails in its duty it fails silently
and I am not sure yet if that is the correct behavior. For now it will stand,
until I think of something better.
2017-04-21 19:07:16 -05:00
John Miller
91b5f605ee Implementat company doc-buffer command.
ein company backend will now show results of inspect_request in a company
documentation buffer when company requests documentation via the doc-buffer
command.
2017-04-21 17:57:16 -05:00
John Miller
ab106032a8 Fixing bug in company backend.
The backend was working properly only when completing at the beginning of the
lines. For example, completing `import IPython.` would end up replacing the
import and moving IPython to the beginning of the line. EIN's company backend no
longer does this.
2017-04-20 19:55:00 -05:00
John Miller
3aac45257c Cosmetic tweaks to ein-company.el 2017-04-20 16:33:56 -05:00
John Miller
7ad1faf452 Fix completion issues with ein's company backend.
Also tweak names of buffers for editing non-notebook files.
2017-04-20 16:21:54 -05:00
John Miller
06269b72bb Update autoloads for ein-company.el 2017-04-19 10:57:19 -05:00
John Miller
d13e85b370 Minimally functional company-mode support.
There is now a company mode backend for ein. It generates completions by sending
complete_request to the running kernel so for the moment no jedi integration.

Configuring is maybe non-obvious - user should at minimum set
`ein:use-auto-complete` and `ein:use-auto-complete-superpack` to nil. Adding a
`(require 'ein-company)` probably should be done somewhere in the user's init
file. This could all be done better so I will attempt to address in later
commits.
2017-04-19 10:12:45 -05:00
John Miller
fdb20813cf Give another try at company-mode integration. 2017-03-04 21:25:21 -06:00
John Miller
45f415f134 Guessing how async completion might work.
Almost a direct copy and paste from ein-ac.el. Will have to
iterate on this more than a few times to figure out a good system
for generation completion candidates for company mode.
2016-03-10 15:15:44 -06:00
John Miller
db630250ac New branch for company-mode backend development. 2016-03-03 13:29:00 -06:00