blakeembrey / atom-dash Goto Github PK
View Code? Open in Web Editor NEWDash documentation integration with Atom
License: MIT License
Dash documentation integration with Atom
License: MIT License
On Windows 10 the plugin for Atom doesn't seem work. If you CTRL + h anything in a file you get an MS pop-up that says "You'll need a new app to open this dash-plugin." Then you are taken to the MS app store, which of course finds nothing.
Getting deprecated calls from atom-dash, please see:
atom/atom#6278
This package is very useful because OS X Services don't work in Atom and because of its syntax sensitive search. But this package's default keybindings conflict with the Atom's core keybindings below.
Is it possible to change atom-dash keybindings?
'atom-text-editor':
'ctrl-alt-h': 'editor:delete-to-beginning-of-subword'
'body .native-key-bindings':
'ctrl-h': 'native!'
'body':
'ctrl-h': 'core:backspace'
Thanks.
Here's a pretty good summary of the issue and how to remedy it: http://keepachangelog.com/
In keymaps/dash.cson: Use the atom-text-editor
tag instead of the editor
class.
Would it make sense to also add ruby
and rails
to haml
's grammar (https://github.com/blakeembrey/atom-dash/blob/master/lib/grammar-map.coffee#L154)? I often find myself looking for documentation of ruby related methods while working inside haml.
I know I could just clone atom-dash
and make changes locally but I'm guessing then I'd have to make this changes after each atom-dash update?
[Enter steps to reproduce below:]
Atom Version: 0.184.0
System: Mac OS X 10.10.2
Thrown From: dash package, v1.0.2
Uncaught TypeError: Cannot read property 'getSelection' of undefined
At /Users/raygerrard/.atom/packages/dash/lib/dash.coffee:16
TypeError: Cannot read property 'getSelection' of undefined
at atom-workspace.module.exports.shortcut (/Users/raygerrard/.atom/packages/dash/lib/dash.coffee:16:23)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:243:29)
at /Applications/Atom.app/Contents/Resources/app/src/command-registry.js:3:61
at CommandPaletteView.module.exports.CommandPaletteView.confirmed (/Applications/Atom.app/Contents/Resources/app/node_modules/command-palette/lib/command-palette-view.js:120:32)
at CommandPaletteView.module.exports.SelectListView.confirmSelection (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-space-pen-views/lib/select-list-view.js:338:21)
at space-pen-div.atom.commands.add.core:confirm (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-space-pen-views/lib/select-list-view.js:109:19)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:243:29)
at /Applications/Atom.app/Contents/Resources/app/src/command-registry.js:3:61
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:558:16)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:396:22)
at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:182:20)
-0:35.6 fuzzy-finder:toggle-file-finder (ul.list-inline.tab-bar.inset-panel)
4x -0:32.8 core:backspace (atom-text-editor.editor.mini)
-0:31.9 editor:consolidate-selections (atom-text-editor.editor.mini)
-0:31.9 core:cancel (atom-text-editor.editor.mini)
-0:06.0 command-palette:toggle (ul.list-inline.tab-bar.inset-panel)
-0:00.6 core:confirm (atom-text-editor.editor.mini)
-0:00.6 dash:shortcut (ul.list-inline.tab-bar.inset-panel)
{
"core": {
"themes": [
"atom-dark-ui",
"atom-dark-syntax"
]
}
}
# User
dash, v1.0.2
# Dev
No dev packages
I installed it and updated config.cson
file.
however i can't call out it when pressing ctrl-h
, ctrl-alt-h
or ctrl+shift+h
. It wasn't even bind to the key mappings.
my OS is macos, Did I miss something or does it work in macos? :)
Is it currently possible to add a config setting in Atom so that when I have a Gruntfile.js
open the Dash opens the Grunt documentation instead of the JavaScript one?
(Of course this could be applied to gulp.js as well for example)
Failed to open URI "dash-plugin:query=read" when cursor is on "read" word (or any other word) in bashscript. Is there a setting I need to adjust here somewhere? I have Atom installed in Debian.
The context menu CSON format has changed. Please see
https://atom.io/docs/api/latest/ContextMenuManager
atom.workspaceView is no longer available.
In most cases you will not need the view. See the Workspace docs for
alternatives: https://atom.io/docs/api/latest/Workspace.
If you do need the view, please use atom.views.getView(atom.workspace)
,
which returns an HTMLElement.
Atom.Object.defineProperty.get (/Applications/Atom.app/Contents/Resources/app/src/atom.js:55:11)
Object.activate (/Users/lmauldin/.atom/packages/dash/lib/dash.coffee:8:9)
Looks like this package is currently trying to resolve to an internal 192.x.x.x IP?
โ /scripts apm install dash Installing dash to /Users/bmo/.atom/packages Unable to download https://www.atom.io/api/packages/dash/versions/1.7.0/tarball: connect ETIMEDOUT 192.30.253.120:443
Thanks in advance of your help.
For regexp.MustCompile()
, with the cursor in the middle of MustCompile
, pressing ctrl-h
opens dash and searches for ustCompile(
. If I select MustCompile
entirely, then ctrl-h
, it works as expected.
In a .html
file, if cursor is placed between <
and the tag name (e.g. span
or div
), then the following query is passed to Zeal: html,svg,statamic,javascript,jquery,jqueryui,jquerym,react,nodejs,angularjs,backbone,marionette,meteor,moo,prototype,ember,lodash,underscore,sencha,extjs,titanium,knockout,zepto,cordova,phonegap,yui,unity3d,css,bootstrap,foundation,awesome,cordova,phonegap:<span
. <span
leads to no results. Moving cursor right fixes the problem.
atom-dash used to work; Since I had to re-image my laptop, it's throwing an error trying to spawn cmd.exe
. It knows about Zeal, no prob. Maybe Zeal recently added support for dash://
...? ::shrug::
Sorry I don't have time for a real patch right now, but
join_path = require('path').join
# snip
return join_path(process.env.SystemRoot, 'System32', 'cmd.exe') + ' /c start "" "' + uri + '"'
gets it working again.
Weirdly, path = require 'path'
and then path.join(etc.
does not work, but then again, I'm no JS genius.
Zeal now supports dash-plugin://
scheme, and registers itself as a protocol handler on Windows and Linux. The old --query
argument has been deprecated, and will be removed in 0.3.0
release.
I'll add support for &prevent_activation=true
as well. I had no idea about this parameter. Zeal simply ignores unknown parameters, so starting to pass &prevent_activation=true
immediately would not cause a problem.
I have just updated Zeal's website with a link to this nice plugin.
Say I have a rails model
class User < ActiveRecord::Base
end
And I want to look up the dash doc for the rails base model. The atom ruby scoping rules that are being used to look up the search term say that the string in the current scope is " < ActiveRecord::Base" which is fine for syntax highlighting but fails when used to lookup in Dash which means a lot of meaningful Rails documentation is harder to get to.
I'm curious, why was syntax lookup chosen? Does this provide anything extra? Shouldn't the word under the cursor be enough? I saw that issue #2 was the impetus behind this change but this issue could have been solved by simply removing the dash -
character from the nonWordCharacters
setting of the language-css package. (the same is true for ?
, !
and :
with ruby but that's a separate issue)
I'm genuinely curious what syntax lookups afford, if anything, beyond a route around the uninformed default non-word character sets for atom's various language packages.
Changing the grammar in language-ruby could fix this (and change highlighting and possibly other things as a side effect), but there could be other scopes that we haven't stumbled on yet that don't match up well with good dash search terms either. I think it makes more sense to go back to word lookups and make sure the nonWordCharacters
sets are accurate for the language you're working in.
This is by far the largest item in config.cson and I don't think I configured anything for it. Is there any way to have all of that be the default and only store what the user configures?
Please add support for VueJS :)
The context menu CSON format has changed. Please see
https://atom.io/docs/api/latest/ContextMenuManager
On Windows 7, Ctrl-h does not return from a scoped search of a custom docset. Instead, it simply opens the Zeal Browser. This does not happen in Linux. I doubt this is an issue in the code base, instead, I am probably doing something wrong. Has anyone else had this problem? Thanks!
Amazing add-on. It's already saved me tons of time.
In css if my cursor is on background-image and I look it up in Dash, it looks up "background" if it's under -image it looks up "image". Instead of "background-image".
it seems on linux the following will omit the first parameter when passed to zeal
xdg-open "dash-plugin:query=shared_ptr&keys=cpp,net,boost,qt,cvcpp,cocos2dx,c,manpages"
while the following works just fine
xdg-open "dash-plugin://query=shared_ptr&keys=cpp,net,boost,qt,cvcpp,cocos2dx,c,manpages"
According to https://kapeli.com/dash_plugins the dash-plugin format is dash-plugin://keys={keywords}&query={query} which matches my expectation for uri.
It seems in 137f5b3 you explicitly avoided this, but I'm not sure what the rational behind this was. Rolling back this change seems to fix the issue for me.
Zeal version 0.3.1
atom-dash 1.7.1
When executing dash:shortcut Zeal is started twice, but only once when it is already open. For some reason the shortcut function is called twice. But I'm too unfamiliar with Atom to understand the reason for that.
Is there a mechanism that retries to start Dash/Zeal again, if the first call failed?
Using Atom 1.7.0 and atom-dash 1.6.0 on Debian 8 Linux.
This isn't a huge deal. But I was just curious if there was a way to return focus after ctrl+h is pressed, to the atom window. When I use the HUD and alt+d to open dash and escape out it returns focus to atom, but with ctrl+h it doesn't. Not a big issue. Great Package!
[Enter steps to reproduce below:]
Atom Version: 0.209.0
System: Mac OS X 10.10.3
Thrown From: dash package, v1.2.0
Uncaught TypeError: Cannot read property 'start' of undefined
At /Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/range.js:35
TypeError: Cannot read property 'start' of undefined
at Function.module.exports.Range.fromObject (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/range.js:35:31)
at TextBuffer.module.exports.TextBuffer.getTextInRange (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:373:36)
at TextEditor.module.exports.TextEditor.getTextInBufferRange (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:619:26)
at atom-text-editor.module.exports.shortcut (/Users/roustem/.atom/packages/dash/lib/dash.coffee:41:21)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:238:29)
at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:520:16)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:355:22)
at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:177:20)
-0:49.6.0 editor:newline (atom-text-editor.editor.is-focused)
2x -0:49.2.0 core:save (atom-text-editor.editor.is-focused)
2x -0:21.3.0 core:select-up (atom-text-editor.editor.is-focused)
-0:20.8.0 editor:toggle-line-comments (atom-text-editor.editor.is-focused)
-0:20.5.0 core:save (atom-text-editor.editor.is-focused)
-0:10.4.0 dash:shortcut (atom-text-editor.editor.is-focused)
-0:06.8.0 core:move-left (atom-text-editor.editor.is-focused)
-0:06.4.0 editor:move-to-beginning-of-word (atom-text-editor.editor.is-focused)
-0:05.4.0 editor:delete-to-beginning-of-word (atom-text-editor.editor.is-focused)
-0:04.7.0 core:undo (atom-text-editor.editor.is-focused)
-0:03.4.0 dash:shortcut (atom-text-editor.editor.is-focused.autocomplete-active)
-0:02.5.0 autocomplete-plus:cancel (atom-text-editor.editor.is-focused.autocomplete-active)
-0:02.1.0 editor:consolidate-selections (atom-text-editor.editor.is-focused)
-0:02.1.0 core:cancel (atom-text-editor.editor.is-focused)
-0:01.3.0 core:move-right (atom-text-editor.editor.is-focused)
-0:00.6.0 dash:shortcut (atom-text-editor.editor.is-focused)
{
"core": {
"projectHome": "/Users/roustem/Projects",
"themes": [
"one-light-ui",
"one-light-syntax"
]
}
}
# User
.bin, vundefined
atom-typescript, v4.5.13
dash, v1.2.0
go-plus, v3.3.11
linter, v0.12.7
# Dev
No dev packages
In the default grammar config, the key for shell scripts should be 'Shell Script', not 'Shell Scripts'.
Hi.
Just as the title says, Atom does not return Atom-Dash when using the package search. I tried to use the terms dash and atom-dash.
Are you aware of this? I tried a few weeks ago as well with the same results.
Thanks,
Eric
I had to add this manually, but I think this is a very common javascript grammar in use today.
I am using Manjaro Linux (Arch), have Zeal installed, and not matter what I do, it will not open Zeal. I get errors that look like:
Malformed URL
Invalid hostname (character '%' not permitted); source was "query=const Router %3D Ember.Router.extend(%7B%0A location%3A config.locationType%0A%7D)%3B"; scheme = "dash-plugin", host = ""
Any way to add a toggle to keep or return the OS window focus to atom?
This works great for dual screens, but I'm cmd-tabbing after ctrl-h everytime.
First of all: thanks for making and sharing this! Love it :)
When I ctrl + h
on the text 'export' while in a .js file, the Ruby docs for the 'export' class open in dash. Is there a way to read the current filetype and tell dash that it should ignore results from irrelevant docs?
atom-dash calls Dash by opening a dash-plugin://
URL. The problem is that the system forces Dash to become active when this URL is opened.
Currently, this is not an issue. However, a future update of Dash will add support for iOS remotes. While an iOS remote is connected, extensions are redirected to it directly and Dash on OS X is not shown at all. Unfortunately there's no way for me to prevent the system from activating Dash when you open the dash-plugin://
URL.
You currently open Dash by running:
shell.openExternal(@createLink(string, language))
I have no idea what this does behind the scenes, but it should be the equivalent of this Terminal command:
open dash-plugin://query
Instead of that, you should perform the equivalent of this Terminal command:
open -g dash-plugin://query
The -g
causes Dash to not get activated if it does not want to and the user experience is a lot better as the active app (Atom) does not lose focus anymore. When you make the change, please make sure to test whether or not you need to escape special symbols (e.g. $
).
It is safe to make this change as soon as possible (no need to wait for a Dash update), as the current version of Dash already knows to activate itself if it needs to.
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.