Coder Social home page Coder Social logo

deerawan / vscode-dash Goto Github PK

View Code? Open in Web Editor NEW
277.0 10.0 23.0 2.74 MB

Dash, Zeal and Velocity documentation integration in Visual Studio Code πŸ”ŽπŸ“–

License: MIT License

TypeScript 100.00%
visual-studio-code visual-studio-code-extension dash zeal

vscode-dash's Introduction

Visual Studio Code Dash

Dash documentation integration for Visual Studio Code

Dash is an API Documentation Browser and Code Snippet Manager for MacOS

Also support Zeal and Velocity.

Build Status Coverage Status All Contributors

vscode dash

Installation

Type cmd + shift + p to launch command palette and choose Extensions: Install Extension. Search this package and install.

Usage

Get the text under your cursor or selected first:

  • Pressing ctrl + h. It will search for current specific documentation depends on language.
  • Pressing ctrl + alt + h. It will search for all documentation.

No need to select the text:

  • Pressing ctrl + shift + h. It will open dash with current file's docset.
  • Pressing alt + h. It will open dash with custom string and current file's docset.

Supported Docsets

This plugin supports almost all docset configuration based on Dash Mapping

Language to docset matching

This plugin supports language to docset mapping.

For other languages that are not supported by default in VS Code, you probably need to install language plugins first in order to allow VS Code to detect the language.

Language Dash Docset Keys Docset Setting Language Plugin
Ansible ansible dash.languageIdToDocsetMap.ansible, dash.languageIdToDocsetMap.ansible-advanced link
C++ cpp,net,boost,qt,cvcpp,cocos2dx,c,manpages dash.languageIdToDocsetMap.cpp link
C# net,mono,unity3d dash.languageIdToDocsetMap.csharp
Clojure clojure dash.languageIdToDocsetMap.clojure
Cmake cmake dash.languageIdToDocsetMap.cmake link
CoffeeScript coffee dash.languageIdToDocsetMap.coffee
CSS css,bootstrap,foundation,less,awesome,
cordova,phonegap
dash.languageIdToDocsetMap.css
Dart dartlang,polymerdart,angulardart dash.languageIdToDocsetMap.dart link
Elixir elixir dash.languageIdToDocsetMap.elixir link
Erlang erlang dash.languageIdToDocsetMap.erlang
Go go,godoc dash.languageIdToDocsetMap.go link
Gradle gradle dash.languageIdToDocsetMap.gradle link
Haskell haskell dash.languageIdToDocsetMap.haskell
Haml haml dash.languageIdToDocsetMap.haml link
Haxe haxe dash.languageIdToDocsetMap.haxe link
HTML 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
dash.languageIdToDocsetMap.html
Jade jade dash.languageIdToDocsetMap.jade
Java java,javafx,grails,groovy,playjava,spring,
cvj,processing
dash.languageIdToDocsetMap.java link
JavaScript javascript,jquery,jqueryui,jquerym,react,
angularjs,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
dash.languageIdToDocsetMap.javascript
Julia julia dash.languageIdToDocsetMap.julia link
Kotlin androidktx,kotlin dash.languageIdToDocsetMap.kotlin link
Latex latex dash.languageIdToDocsetMap.latex link
Less less dash.languageIdToDocsetMap.less
Lua lua,corona dash.languageIdToDocsetMap.lua link
Markdown markdown dash.languageIdToDocsetMap.markdown
Objective-C iphoneos,macosx,watchos,tvos,
appledoc,cocos2d,cocos3d,
kobold2d,sparrow,c,manpages
dash.languageIdToDocsetMap.objective-c
Perl perl,manpages dash.languageIdToDocsetMap.perl
PHP php,wordpress,drupal,zend,laravel,yii,joomla,ee,
codeigniter,cakephp,phpunit,symfony,typo3,
twig,smarty,craft,phpp,html,statamic,mysql,
sqlite,mongodb,psql,redis
dash.languageIdToDocsetMap.php
Processing processing dash.languageIdToDocsetMap.pde link
Puppet puppet dash.languageIdToDocsetMap.puppet link
Python python,django,twisted,sphinx,flask,tornado,
sqlalchemy,numpy,scipy,salt,pandas,matplotlib,cvp
dash.languageIdToDocsetMap.python link
R r dash.languageIdToDocsetMap.r
Ruby ruby,rubygems,rails dash.languageIdToDocsetMap.ruby link
Rust rust dash.languageIdToDocsetMap.rust link
Sass sass,compass,bourbon,neat,susy,css dash.languageIdToDocsetMap.sass
Scala scala,akka,playscala dash.languageIdToDocsetMap.scala
Shell Scripts bash,manpages dash.languageIdToDocsetMap.shellscript
SQL mysql,sqlite,psql dash.languageIdToDocsetMap.sql
Stylus stylus dash.languageIdToDocsetMap.stylus link
Swift swift,iphoneos,macosx,watchos,tvos,appledoc dash.languageIdToDocsetMap.swift link
Tcl tcl dash.languageIdToDocsetMap.tcl link
Terraform terraform dash.languageIdToDocsetMap.terraform link
TypeScript typescript dash.languageIdToDocsetMap.typescript
YAML chef,ansible dash.languageIdToDocsetMap.yaml

Added docset in this plugin

Language Dash Docset Keys Docset Setting Language Plugin
Elm elm dash.languageIdToDocsetMap.elm link
React react dash.languageIdToDocsetMap.javascriptreact link

File name to docset matching

This plugin also supports file name matching to docset, this is useful to target docset for any specific file name such as docker.yml or vagrantfile.

NOTE: You can use glob pattern to define the file name

File Name Dash Docset Keys Docset Setting
[dD]ocker* docker dash.fileNameToDocsetMap["docker.yml"]
vagrantfile vagrant dash.fileNameToDocsetMap["vagrantfile"]
gruntfile.js grunt dash.fileNameToDocsetMap["gruntfile.js"]
gulpfile.js gulp dash.fileNameToDocsetMap["gulpfile.js"]
*.ino arduino dash.fileNameToDocsetMap["*.ino"]

What is Dash Docset Keys?

You can find dash docset key in Dash application.

dash docset key

Change Docset Configuration

You can change docset in settings.json or pressing cmd + ,. Every configuration start with dash.docset. See Docset Setting column in Supported Docset table above.

Example Case:

Based on default docset configuration, if we search in typescript files (.ts), it will search in typescript docset. But now we want to make it able to search in javascript docset too.

Type cmd + , then we change typescript docset by adding new dash docset key "javascript". So, whenever we search from typescript files, it will search in typescript and javascript docset.

The result will look like below:

// settings.json, add lines below
"dash.languageIdToDocsetMap": {
  ...,
  "typescript": [
    "typescript",
    "javascript" // we add new dash docset key here
  ]
  ...
}

Change Keyboard Shortcut

You can bind default shortcut to another shortcut keys

Choose in top menu Code -> Preferences -> Keyboard Shortcuts or using shortcuts cmd + K, cmd + S

Add one or two lines below

{ "key": "your_shortcut", "command": "extension.dash.specific" }, // search selection in corresponding docset
{ "key": "your_shortcut", "command": "extension.dash.all" } // search in all docset
{ "key": "your_shortcut", "command": "extension.dash.emptySyntax" } // open dash with current file's docset open
{ "key": "your_shortcut", "command": "extension.dash.searchSyntax" } // open dash with custom string and current file's docset

Contributors

Thank you for these awesome contributors

Budi Irawan
Budi Irawan

πŸ’» πŸ“–
Dima Granetchi
Dima Granetchi

πŸ’» πŸ“–
Logan Saso
Logan Saso

πŸ’» πŸ“–
Zhongren Shao
Zhongren Shao

πŸ’» πŸ“–
dingweifeng
dingweifeng

πŸ“–
Seth Bromberger
Seth Bromberger

πŸ’» πŸ“–
br1anchen
br1anchen

πŸ’»
Won Kim
Won Kim

πŸ’»
Cuyler Stuwe
Cuyler Stuwe

πŸ’»
Cahya Pribadi
Cahya Pribadi

πŸ’»
Marko Kajzer
Marko Kajzer

πŸ’»
akdir
akdir

πŸ’»

License

MIT Β© Budi Irawan

vscode-dash's People

Contributors

akdir avatar br1anchen avatar cmygray avatar cuylerstuwe avatar deerawan avatar dependabot[bot] avatar loganintech avatar markokajzer avatar ozylog avatar profelis avatar sbromberger avatar snyk-bot avatar szhongren avatar weifding avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vscode-dash's Issues

Add support for Zeal installed as Flatpak

I switched to using Zeal as a flatpak and now vscode-dash no longer works when I press ctrl-h.

It needs to be called with flatpak run org.zealdocs.Zeal/x86_64/stable

Cheers!

Extension not passing query data through to zeal unless zeal is already opened

System info:
OS:
Windows 10
Vs info:
Version: 1.27.1 (user setup)
Commit: 5944e81f3c46a3938a82c701f96d7a59b074cfdc
Date: 2018-09-06T09:21:18.328Z
Electron: 2.0.7
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
Architecture: x64

Steps to reproduce:

  1. Open visual studio code;
  2. Open an editor with javascript text
  3. Select any js code that would appear in the language docs (e.g. "Number.isInteger()" )
  4. Make sure Zeal is not currently open
  5. push any of the four key maps for extension

Result:
Zeal should open, but not actually search any docs
N.B.
if you push the same keymap whilst zeal is opened, the query should send perfectly

vscode-dash doesn't detect React as Javascript

If I am inside a .js file and I call ctrl+h it correctly searches in Javascript.
If I am inside a .jsx file and I call ctrl+h it searches dash as a whole rather than specifically Javascript.

Does not detect language currently in use

Hi,

I was using Zeal in Sublime Text 3 before, and when I hit F1, it automatically searched for the syntax in the programming language set for the document. For example:
I will be coding in a Ruby (.rb) document, and hit F1 on "class". This pulls up ruby:class documentation automatically. When I switched to a Python document, it does so for this automatically as well.
Does your extension have a feature that does this? For now, in VBC, when I hit Shift-F1 on "class", it will search for all docs containing "class".

Am I doing something wrong? I know I can set a specific hotkey for searching Ruby syntax and Python syntax specifically, but I'd like to avoid that. Thank you.

I'm currently using Ubuntu 16.04.2 LTS 64-bit

[Request] Publish extension on open-vsx.org

Hi there!

I'm reaching out to you because we currently have your extension manually added to our extension gallery at Coder for code-server, and we're currently working on a migration to open-vsx, which is also used by other community VSCode forks (including, but not limited to Arch Linux's Code-OSS builds and VSCodium).

We (and other open source VSCode forks) cannot use Microsoft's extension gallery, as MS' terms of service allows only the proprietary MS products to interact with the official gallery.

We'd really appreciate it if you can add your extension to open-vsx! A simple guide on publishing extensions to Open-VSX is available here.

mistake title description

In Package.json

{
"command": "extension.dash.emptySyntax",
"title": "Search in Dash for current language documentation"
},
I think it should be "Open Dash for current language documentation"
When press F1,and text "dash" in command input box, this decription confused me....

Add support for Dash 5

The extension does not seem to work with the new version of Dash (5.0). The app opens, but the search field is empty.

Add portable edition support

I am using a portable zeal and find it unable to search docs. A configuration of portable zeal(dash) path would be helpful.

Doesn't work at all on my macbook

Hey deerawan,

For some reason Dash doesn't work at all on my Macbook Pro (Sierra 10.12.1) for whatever reason..
Im on VSCode version 1.7.2, when I press ctrl + h or ctrl + alt + H nothing pops up.

Im using it together with the following extensions:
Babel ES6/ES7
ESLint
generate-react-component
jsx
Material-theme
React Redux ES6 Snippets
react-beautify
vscode-icons

I tried using it in JS, CSS and HTML files without success.

If you want more information let me know!
Jordy.

Ctrl + H opens Zeal without requested query (Ctrl+Alt+H works)

I'm working on Visual Studio Code 1.38.1 in Ubuntu 18.04.3 LTS. Here is a screenshot of the problem:

pic

Looks like the problem is connected with this area.
problem

If I delete all exact: prefixes, it works fine.
possSolution
pic1

So, are there any way to remove those exact: prefixes without me having to manually delete them?

how to work with Velocity

I have download velocity,and it work fine on my computer ,but when I use this vscode-dash,it show that can not find program

Add compile in pre-push

Add compile command in pre-push git hook.

"husky": {
    "hooks": {
       ....,
       "pre-push": "vscode:prepublish"
    }
  },

`dash.docset.` settings do not work

I added this to my settings.js file:

  "dash.docset.typescript": [
    "typescript",
    "javascript"
  ],

Assuming that it will only search these two docsets when you run the Dash hotkey in .ts files but that did nothing. It still searches through all these docsets:

2018-08-02 at 14 45

Is this a bug? Or I did something wrong?

Doesn't work with VS Code Vim plugin

I tried using ctrl + h to trigger dash search, it didn't do anything.

Is there any way to fix this? I would also like to remap this hotkey for searching. How can I do that?

Thank you for making this great extension.

Mark vscode-dash as 'ui' extension

I've started using the VSCode remote extensions for WSL/Docker/SSH, which allow VSCode to run on the developer's computer, but target remote systems and execute certain extensions on the remote system.

It seems to me that Dash is probably one extension that should always be run on the computer running VScode. According to this page, this can be achieved by setting the extensionKind property in vscode-dash's package.json:

"extensionKind": "ui"

Note to other users: as a workaround, you can mark vscode-dash as a ui plugin in your settings.json:

  "remote.extensionKind": {
    "deerawan.vscode-dash": "ui"
  },

Ctrl+h doesn't do anything

All the keybindings seem to work as advertised, but ctrl+h doesn't do anything at all. That seems like the best feature too :-)

Trying the the shortcut in ruby and javascript files with the same results.

vscode-dash 2.4.0, VSCode 1.44.2, Dash 5.1.4

Support to lookup Angular built-in directives

When looking for an Angular directive, the search goes about the tag as it would be an html tag. However, it would be nice if this could recognize that its an Angular directive and lookup as such.

For: <router-outlet></router-outlet>

Result: 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:router-outlet

Expected: routeroutlet

Enable support for Zeal on macOS

On a Mac with Zeal installed (but not Dash), Ctrl+H has no effect. This is because of "dash.js" only supporting Dash on macOS. To invoke "Zeal" on macOS, one needs the same options as on Linux, e.g.

const OSOptions = {
    darwin: 'zeal',  # Was "open -g"
    linux: 'zeal',
   ...
};

Suggestion: Detect dynamically whether Dash or Zeal is installed, invoke one of them. Or have a setting to choose between them.

Ctrl + H Fails to Work for Java File

My environment is VSC 1.24.1 on macOS 10.13.5, with the Java Language Support extension installed.

Pressing ctrl + h has no response, but ctrl + alt + h, ctrl + shift + h, and alt + h do work as descripted in the document.

Searches everything possible instead of in the correct language using latest Zeal and Vscode

Hello,

I am using the latest Zeal 0.40 and Vscode 1.16.1.

When I am editing in Javascript language, I put the cursor over a keyword, for example var, and press ctrl-h , and this appears in the Zeal search box:

javascript,jquery,jqueryui,jquerym,react,angularjs,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:var

I want to only search in Javascript, it should say:

javascript:var

The instructions say:

Pressing ctrl + h. It will search for current specific documentation depends on language.

Is this a massive bug, or am i making a simple mistake? Exact same thing in HTML as well as JS. Really hope this can be fixed, thanks!

[Feature - Easy] Zeal Search: "language:searchword"

Windows + Zeal.

Zeal has a nice feature, try write "javascript:" in the search field, this will show only results from javascript and not from other languages.

In the extension, can you please detect what language the file is using, and send it to zeal?

Example:
in vscode editing a "user.js" file, and highlights/select a "document" word in the file, and executing this extension, will result in a search in zeal, that looks like "javascript:document"

then it wont be mixed togheter with all the other languages :D

image

Custom file formats

I use gdscript language. Please add a way to register custom file extensions. Something like:

"dash.docset.other": {
  "gd" :  [
        "godot"
    ],
}

Edge case for Zeal on Windows

When calling the extension from within VS Code and it's the first time starting Zeal after a fresh start of Windows, the same problem that was fixed with the start dash-plugin:// && ... occurs again. Not really sure how to go about dealing with this, but I'll start trying to figure it out. I think it's something on Zeal's end.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.