"There's that line from Newton about standing on the shoulders of giants. We're all standing on Dennis' shoulders."
-- Brian Kernighan
jfernandz / autocomplete-r Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
I'm not sure how simple this is, but I think it would be very cool if you could have package specific scoping of the autocompletions. For example:
dplyr::fil
Would give you an expansion of dplyr::filter
, dplyr::filter_
and not any other filter
functions.
In the completion JSON, Each keyword contains Text, prefix, rightLabel, etc. Some keywords contain an array of prefix, corresponding snippets, text, and type as in the R documentation: http://stat.ethz.ch/R-manual/R-patched/library/stats/html/Geometric.html. It would be very interesting to parse inside the array. For now, provider.coffee take only the first prefix.
I need also to understand the prefix algorithm.
[Enter steps to reproduce:]
Atom: 1.34.0 x64
Electron: 2.0.16
OS: Mac OS X 10.13.6
Thrown From: autocomplete-R package 0.6.0
Failed to activate the autocomplete-R package
At Arguments to CompositeDisposable.add must have a .dispose() method
TypeError: Arguments to CompositeDisposable.add must have a .dispose() method
at assertDisposable (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:1175864)
at CompositeDisposable.add (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:1176832)
at Object.consumeProvider (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:161712)
at Object.consumeProvider_2 (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:161410)
at Provider.t.exports.Provider.provide (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:14:1029702)
at ServiceHub.t.exports.ServiceHub.provide (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:2934590)
at Package.activateServices (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:2942776)
at Package.activateNow (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:2939831)
at measure (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:2939155)
at Package.measure (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:2936786)
at activationPromise.activationPromise.Promise (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:2939015)
at new Promise (<anonymous>)
at Package.activate (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:2938958)
at PackageManager.activatePackage (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:382643)
at /Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:899185
at r (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:11:893791)
at o (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:14:1032609)
at ChildProcess.n.process.on.e (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:14:1032815)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
-6:32.2.0 core:paste (input.hidden-input)
-6:30.4.0 core:move-up (input.hidden-input)
-6:29.3.0 editor:select-to-end-of-line (input.hidden-input)
-6:28.6.0 hydrogen:run (input.hidden-input)
-6:28.6.0 autocomplete-plus:cancel (atom-text-editor.editor.is-focused.has-selection)
-6:12.9.0 core:copy (input.hidden-input)
6x -3:52 datatip:toggle (input.hidden-input)
-3:45.9.0 hydrogen:restart-kernel (input.hidden-input)
-3:45.5.0 datatip:toggle (input.hidden-input)
-1:07.2.0 core:move-right (input.hidden-input)
-1:06.6.0 editor:select-to-first-character-of-line (input.hidden-input)
-1:05.5.0 hydrogen:run (input.hidden-input)
-1:05.5.0 autocomplete-plus:cancel (atom-text-editor.editor.is-focused.has-selection)
-0:51.3.0 hydrogen:restart-kernel (input.hidden-input)
-0:51.1.0 datatip:toggle (input.hidden-input)
-0:32.2.0 core:backspace (input.hidden-input)
atom-clock 0.1.16
atom-ide-ui 0.13.0
autocomplete-python 1.11.0
autocomplete-R 0.6.0
Hydrogen 2.7.0
hydrogen-launcher 1.2.2
ide-python 1.2.0
ide-r 0.1.8
kite 0.138.0
platformio-ide-terminal 2.8.4
rbox 0.5.0
This is a very cool project -- thanks for this!
One thing that would be cool is detecting package names.
I think this would be fairly simple as you can simply scan .libPaths() + '/library'
for a list of packages then expand on library(
. This would have similar behavior to autocomplete-python
when you start typing import package_name
.
I am happy to help in any way I can.
Best,
Harold
Thank you for providing autocomplete for R in atom.
I'm not fully understand the behavior however. Is there any autocomplete for packages other then base? I have tried with several packages like ggplot or dplyr but I just get suggestions for R base.
Thx
Eugene
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.