Dash Plugin Development


This page provides instructions on how plugin developers can integrate Dash with other apps. This page is not meant for regular Dash users. If you're just looking for a way to integrate Dash with your favorite app, check out Dash's Preferences > Integration.

The Easy Way


You can trigger a search in Dash by opening a dash://{query} URL. For example, click here. For instructions on how to open custom URLs in Terminal, System Services or AppleScripts, check out Dash's Preferences > Integration.

The Better Way


Dash supports a lot of different docsets and it would be great if plugins would be able to tell Dash which docsets it should search exactly. This is usually determined based on the type of file the user currently has opened when he/she triggers a search.

The format is: dash-plugin://keys={keywords}&query={query}

Examples:

Mapping Between File Types and Keywords


The trick is which keywords to use given a file type. The general guideline is to use all the keywords that are relevant. If a user does not have a docset installed for a keyword, the keyword is simply ignored, so there's no harm if you send over too many keywords. For example, if the user triggers a search from a .php file, you shouldn't only send over the php keyword, but also keywords for all the PHP frameworks and even the HTML-related ones.

Recommended Mappings


This list is a work in progress. Please contact me if anything needs to be changed.

ActionScript (.as, .as3)
keys=actionscript
Android
keys=android
Boo (.boo)
keys=unity3d
C (.c, .h)
keys=c,glib,gl2,gl3,gl4,manpages
C++ (.cpp, .cc, .cp, .cxx, .c++, .C, .h, .hh, .hpp, .hxx, .h++, .inl, .ipp)
keys=cpp,net,boost,qt,cvcpp,cocos2dx,c,manpages
C# (.cs)
keys=net,mono,unity3d
Cappuccino / Objective-J (.j, .h)
keys=cappuccino
Clojure (.clj, .cljs, .cljc, .edn)
keys=clojure
CoffeeScript (.coffee)
keys=coffee
ColdFusion (.cfm, .cfml)
keys=cf
Config Files (.config)
keys=nginx
CSS (.css)
keys=css,bootstrap,foundation,less,awesome,cordova,phonegap
Dart (.dart)
keys=dartlang,polymerdart,angulardart
Elixir (.ex, .exs)
keys=elixir
Erlang (.erl, .hrl)
keys=erlang
Go (.go)
keys=go,godoc
Gradle (.gradle)
keys=gradle
Haskell (.hs, .lhs)
keys=haskell
Haml (.haml)
keys=haml
HTML (.html, .htm, .shtml, .xhtml, .phtml, .inc, .tmpl, .tpl, .ctp)
keys=html,svg,css,bootstrap,foundation,awesome,statamic,javascript,jquery,jqueryui,jquerym,angularjs,backbone,marionette,meteor,moo,prototype,ember,lodash,underscore,sencha,extjs,knockout,zepto,cordova,phonegap,yui
Jade (.jade)
keys=jade
Java (.java, .jsp, .bsh)
keys=java,javafx,grails,groovy,playjava,spring,cvj,processing
JavaScript (.js, .htc, .jsx)
keys=javascript,jquery,jqueryui,jquerym,angular,angularjs,react,vue,backbone,marionette,meteor,sproutcore,moo,prototype,bootstrap,foundation,lodash,underscore,ember,sencha,extjs,titanium,knockout,zepto,yui,d3,svg,dojo,coffee,nodejs,express,grunt,mongoose,moment,require,awsjs,jasmine,sails,sinon,chai,html,css,cordova,phonegap,unity3d
Julia (.jl)
keys=julia
Less (.less)
keys=less
Lisp (.lisp)
keys=lisp
Lua (.lua)
keys=lua,corona
Markdown (.md, .mdown, .markdown, .markdn)
keys=markdown
Objective-C (.m, .h)
keys=iphoneos,macosx,watchos,tvos,cocoapods,appledoc,cocos2d,cocos3d,kobold2d,sparrow,c,manpages
Objective-C++ (.mm, .M, .h)
keys=cpp,iphoneos,macosx,cocoapods,appledoc,cocos2dx,cocos2d,cocos3d,kobold2d,sparrow,c,manpages
Ocaml (.ml, .mli, .mll, .mly)
keys=ocaml
Perl (.pl, .pm, .pod, .t)
keys=perl,manpages
PHP (.php, .inc)
keys=php,wordpress,drupal,zend,laravel,yii,joomla,ee,codeigniter,cakephp,phpunit,symfony,typo3,twig,smarty,craft,phpp,html,statamic,mysql,sqlite,mongodb,psql,redis
Processing (.pde)
keys=processing
Pug (.pug)
keys=pug
Puppet (.pp)
keys=puppet
Python (.py, .rpy, .pyw, .cpy)
keys=python,django,twisted,sphinx,flask,tornado,sqlalchemy,numpy,scipy,salt,pandas,matplotlib,cvp
R (.r, .s, .rd, .Rprofile)
keys=r
Racket (.rkt, .ss, .scm, .sch)
keys=racket
Ruby (.rb, .rbx, .rjs, .Rakefile, .rake, .cgi, .fcgi, .gemspec, .irbrc, .capfile, .Gemfile)
keys=ruby,rubygems,rails
Rust (.rs, .rc)
keys=rust
Sass (.sass, .scss)
keys=sass,compass,bourbon,neat,susy,css
Scala (.scala)
keys=scala,akka,playscala
Shell Scripts (.sh)
keys=bash,manpages
SQL (.sql)
keys=mysql,sqlite,psql
Stylus (.styl, .stylus)
keys=stylus
Swift (.swift)
keys=swift,iphoneos,macosx,watchos,tvos,cocoapods,appledoc
Tcl (.tcl, .adp)
keys=tcl
TypeScript (.ts, .tsx)
keys=typescript
YAML (.yaml, .yml)
keys=chef,ansible