News for hackers. Stuff that matters.
Re:DevDocs API Documentation by rgrau on Thursday October 19, 2017 @10:41AM (#15508310)
If you live inside emacs, https://github.com/areina/helm-dash/ will use dash documentation and use emacs for the search and display of the docs.

Also, works on GNU/Linux and Windows. Also, free software. Also, I'm the co-author.

Re:DevDocs API Documentation by blaenk on Thursday October 19, 2017 @08:57PM (#15512816)
I saw this a while back and it seemed amazing but I was wondering if there's any way to open the actual live documentation page. So for example if you choose the documentation for `Array.prototype.map` then it'll pull up that page on MDN, rather than the locally cached Dash page.

I know the whole point of Dash is to have locally cached, offline documentation copies, but I was thinking it would be amazing to use that to feed Helm candidates, but actually open the real, live documentation page.

Re:DevDocs API Documentation by rgrau on Friday October 20, 2017 @07:23AM (#15514885)
you definitely can do it because the only thing that is in the docsets is a uri starting with https?:// or file:/// .

It seems there are some docsets already doing that[1]. Creating your own docsets is dead easy. just a simple sqlite3 file with a single table.

You can find an example I hacked myself here[2] (very hackish).

It's basically creating a table:

    create table searchIndex(id INTEGER PRIMARY KEY, name TEXT, type TEXT, path TEXT); 
    CREATE UNIQUE INDEX anchr  ON searchIndex (name, type, path);
And filling it with data:

    insert into searchIndex(name,type,path) VALUES ('foo','function','https://example.com')


[1]. https://github.com/areina/helm-dash/issues/65 .

[2]. https://github.com/kidd/AllegroLisp.docset

Re:DevDocs API Documentation by kornish on Thursday October 19, 2017 @01:22PM (#15509728)
This is awesome - thanks for sharing your work!
Re:DevDocs API Documentation by pagnol on Thursday October 19, 2017 @10:55AM (#15508436)
This is great, thank you very much!
Re:DevDocs API Documentation by kaushalmodi on Friday October 20, 2017 @07:55AM (#15515033)
But isn't Dash just for Mac?
Re:DevDocs API Documentation by rgrau on Friday October 20, 2017 @08:18AM (#15515150)
yup, "also" meaning "in addition". Dash is not free either, and I'm not its coauthor
Re:DevDocs API Documentation by kaushalmodi on Friday October 20, 2017 @08:38AM (#15515257)
Of course, "also" means "in addition". I was wondering what I'd do with helm-dash on GNU/Linux if Dash is only for Mac.

The helm-dash repo tagline on GitHub says "Browse Dash docsets inside emacs", so I quickly dismissed it as I don't use Mac.

Reading a bit further, now I see that it doesn't need Dash to be installed. So that's great! I'll see if an ivy/counsel version is out there.

Re:DevDocs API Documentation by rgrau on Friday October 20, 2017 @09:03AM (#15515406)
Ah yes, sorry, I missunderstood your question :).

Yep, helm-dash can download docsets from dash servers and use them without the need of Dash whatsoever.

https://github.com/nathankot/counsel-dash .

Enjoy!