jacktasia / dumb-jump Goto Github PK
View Code? Open in Web Editor NEWan Emacs "jump to definition" package for 50+ languages
License: GNU General Public License v3.0
an Emacs "jump to definition" package for 50+ languages
License: GNU General Public License v3.0
When trying to jump to a symbol with multiple options, I get a dropdown menu, and am unable to choose any of the options (RET
has no effect)...
Is this a known issue?
git grep should be faster than both ag and grep, when it is available.
Hello,
"C-M-p" is already used by (backward-list), a pretty useful command. Would it be possible to let the key-bindings to the user or at least make them customizable, so that (dumb-jump-back) could be bound somewhere else?
Anyhow, thank you for this great package!
i would love a dumb jump command that opens the definition in another window, just like find-file-other-window
and switch-to-buffer-other-window
.
otherwise, rock on. :)
A while ago I added faust to the supported languages.
Sometimes dumb-jump finds multiple definitions ( which is to be expected), without the correct one included.
Unfortunately, I have not yet been able to find out under which conditions this happens.
dumb-jump uses the first project root indicator file it finds to set the project root to its containing directory.
This approach does not work for complex projects in which multiple git checkouts are used:
php-typo3-project/
+ typo3conf/
| + ext/
| + extension/
| + .gitignore
| + extension2/
| + .gitignore
+ typo3_src/
+ .gitignore
When using dumb-jump
on a file in php-typo3-project/typo3conf/ext/extension/src/Foo.php
, it finds php-typo3-project/typo3conf/ext/extension/
as project root.
I'd rather want to have php-typo3-project
as root.
Hi there,
this is an amazing tool.
Would be great if there was also suppor for shell-script (i.e. bash).
Thanks!
Ben
Would use it if it had it.
it would be helpful to me to know why I should use dumb-jump instead of TAGS. Personally, I generated TAGS files but what was missing was I couldn't just jump to the definition of a Rails function or the class that I was using in a Node project.
It might be helpful for others to compare and contrast the difference between using TAGS and dumb-jump.
I'll often be investigating things inside an emacs shell. Either running tests or grepping around or whatever. From there I'd like to be able to put point on a symbol and invoke dumb-jump. But because the buffer is in shell-mode, it fails out. It'd be nice to be able to set a "default language" or something to let it at least attempt a jump.
❑ marks the cursor. ⬱ where it jumps. ⟵ where it should jump
from here:
if(_adaptive && !pixContribs.ProcessPixelDone())
{
_extrapolateRadianceValid(pixContribs,hit);
_process❑PixelOverlap(hit,hit.directIllum.data(),
1/*thrElevImage[idx]*/,pixContribs,GetOctree<TRecord>());
pixContribs.SetProcessPixelDone();
}
break;
to here:
// --------------------------------------------------------------------------
// CAdaptiveCaching::_processPixelOverlap() ⬱
// --------------------------------------------------------------------------
template<class TRecord,class TContribArray>
int
CAdaptiveCaching::_processPixelOverlap(const CHitInfoLite &hit, ⟵
const float *directIllum,
const float thresholdElevation,
TContribArray &carray,
CRCOctree<TRecord> *octree)
{
Hi @jacktasia
I'd like to try your package, but I don't really want to use package.el
.
I tried to just clone the repo and make install
but it doesn't seem to be working.
Could you please describe manual installation process?
Thanks!
Symbol's function definition is void: s-matched-positions-all
I'm getting this error when running dumb-jump-go
on a PHP function.
What does it mean?
ubuntu linux 16.04, emacs 24.5.1, dumb-jump 0.3.9
Just wondering why is this necessary. It's not very convenient.
Dumb jump currently wont find arrow function definitions or methods in javascript. Ideally it would be able to find funcName
when defined in a way below;
let funcName = (foo) => "bar";
const funcName = (foo) => "bar";
const funcName = (foo) => {
return "bar";
}
const obj = {
funcName: (foo) => {
return "bar";
}
}
const obj = {
funcName(foo) {
return "bar";
}
}
It would be great to have rust support
I use your dumb-jump and very happy with it!
But sometimes dumb-jump cannot find definitions, for example, functions defined by DSL.
In Emacs Lisp, dumb-jump cannot find dumb-jump-mode
because it is defined by define-minor-mode
.
;; Code in the dumb-jump repository.
(defun a ()
(dumb-jump-mode) ; NG
(dumb-jump-go)) ; ok
I propose that dumb-jump should fall back to symbol search if it cannot find definitions.
Although dumb-jump produces many candidates in popup-menu, but I think it is more happy than "not found" because it is rare case.
For me, I use find-function
to find definitions in Emacs Lisp.
This code is only an example.
This case can occur in Ruby and so on.
see title
GPL v3 license? or MIT or?
I am in the process of trying to add fortran support to dumb-jump.
The regular expressions in dumb-jump-parse-response-line
, i.e.
(s-split ":?[0-9]+:" resp-line)
(s-match ":?\\([0-9]+\\):" resp-line)
don't correctly handle the case when the filename ends in a number. Since the colon is optional, they confuse the file extension and the line number.
In this case, the value of resp-line looks like "/path/to/file.f90:1701: subroutine test(foo)"
Hello,
Thanks for developing dumb-jump.
This might rather be a issue with emac or meta-key mapping. I hope it is ok to ask this here.
I installed dumb-jump trough the package manager and everything works except for C-M-g.
(C-M-q works as expected, M-x dumb-jump-go works as expected)
When I use C-h k to check the mapping of C-M-g, then I get the mapping for C-g displayed. C-M-q however is displayed correctly.
Do you have any ideas why this could be and how to fix it? Could it have something to do with meta key mapping? I am working on a Linux cluster connected through ssh from Mac OSX using iterm. The meta-key mapping usually works for all other commands.
Many thanks,
Hannes
Currently I can jump from usage to definition, thanks to 7e25680 but can't go the other direction
class Foo {
function bar() {}
static function bar() {}
}
function bar() {}
$bar = $foo->bar();
$bar = Foo::bar();
$bar = bar();
If I am on a usage, I'd like to jump to the definition. e.g. possible regex:
/function\s+(bar)\s*\(/
If I have the cursor on the definition I'd like to jump to usages. e.g. possible regex:
/(?<!function\s)(bar)\s*\(/
Sometime you just want to look at the definition without jumping and automatically close after that. So, something like dumb-jump-quick-look
could open unfocused window which would be automatically closed after pressing any key.
Given the following scenario:
const instance = new MyCla|ss(3, 4);
Dumb jump will find the definition of MyClass
if it defined as follows:
function MyClass(a, b) {
this.a = a;
this.b = b;
}
But it will not find the definition of MyClass
if it defined using ES6 classes.
class MyClass {
constructor(a, b) {
this.a = a;
this.b = b;
}
}
I don't think jumping to the constructor
would be necessary but it would be nice. IMO, jumping to class MyClass {
would suffice.
There are now far better alternatives to searching with grep, that now about files to ignore like the .git
repository and how to find the root of a project.
So we can set which search program (ag
or grep
) the rule supports. Stopping the need for a rule to support grep
too, which often makes the regex way more complicated. Also opens the door to support other searchers like pt
in interesting ways.
I can make a PR for this but wanted to check if I was overlooking a design choice. When I jump to a definition, I find myself typing M-*
to jump back to my previous location. Is there a reason why you don't have (ring-insert find-tag-marker-ring (point-marker))
in the jump-go function?
via emacs subreddit
Hello,
how difficult would it be to support Ruby? maybe simply copy-paste adapt python support?
In the same (projectile) directory tree.
Would be great to jump to package_name.procedure_name
or package_name.function_name
, and package_name.constant_name
, where package_name
is usually a package_name.(prc|pks|sql)
file in the actual project directory tree.
Would be great if PHP support would be enabled for the following file extensions used by Drupal:
See https://github.com/arnested/drupal-mode/blob/b4a66092bddc471884b2746d69fd7e8853b4b79f/drupal-mode.el#L916 for reference
I don't know, but maybe it could include open parentheses and $
in regex (or whatever is used to search) to distinguish methods from variables?
Also searching for usage
vs definition
would be pretty cool.
e.g.
if the cursor is on fooBar() usage (i.e. ->fooBar(
) search for fooBar() definition (function fooBar(
) and if cursor is on the definition, search for usages?
Image -- cursor on method usage but getting variables as results:
Would love to try this plugin on C++!
First of all this is really an amazing job.
On javascript code it works really well also on medium/big repositories. One thing that do not work well however are React components. usually they are just exported as normal classes (or functions or variables...) and the only unusual thing is that they appear in jsx code (e.g. <Component .... />)
Do you think would be hard to make them works, what implementations problems there may be?
P.S. thanks again for the effort
it would be great if the jump options that dumb-jump
discovered could be selected using ivy
instead of the current pop-up. it would be great if it looks like a swiper
-style or counsel-ag
style selection.
perhaps @abo-abo would be so kind to leave a comment on how that is best achieved. does it need changes in dumb-jump
? would a counsel-dumb-jump
be a better option? if so, is dumb-jump
structured correctly to provide counsel
with the right information?
I installed from MEPLA (version 20160427
) and get this error when I try to dumb-jump-go
in some Go source code:
dumb-jump-fetch-results: Wrong number of arguments: #[(thing) "^HÂN\203^K^@^HÂN \207Ã^H!\211^Y\205^X^@ @ A{)\207" [thing bounds thing-at-point bounds-of-thing-at-point] 3 ("/usr/share/emacs/24.3/lisp/thingatpt.elc" . 2294)], 2
I'm using the emacs24-nox
package, version 24.3+1-2ubuntu1
and M-x version
says GNU Emacs 24.3.1 (x86_64-pc-linux-gnu) of 2014-03-07 on lamiak, modified by Debian
.
Hello,
I'm curious about why you call ag
directly instead of leveraging https://github.com/Wilfred/ag.el ?
Anyway, I suffer from the same bug as Wilfred/ag.el@cd89319
Namely that the default ag
installation on ubuntu doesn't support --vimgrep
.
Maybe it's too much work to rewrite using ag.el
, in which case I'll upgrade my ag installation but I thought you'd like to know.
dumb-jump-go
has an error Wrong type argument: stringp, nil
Does it need the latest version of ag?
I use version 0.29.1
I don't know if this is my fault or your fault, but I figured I'd ask.
Please add the extensions for commonly used variants of clojure: .cljs and .cljc.
Setting (setq dumb-limit-to-vcs-project t)
and "jumping" within a file would search back up the directory tree, looking within each parent directory successively for a VCS settings directory (e.g. .git
, .svn
, etc), until reaching the main project directory defined by dumb-jump-default-project
. If such a settings directory is found, this directory would be used as the "project" directory when performing searches.
For example:
code/ # `dumb-jump-default-project`
└── my-project/ # expected project dir
├── .git/ # VCS dir identifying expected project dir
├── my-defs.py # location of target definition
└── my-app.py # current buffer location
In this case, searching would be scoped to my-project
because it contains a .git
directory. Should the .git
directory be removed, scoping would fall back to code/
as set by dumb-jump-default-project
.
hi, does this package support searching java sources jar files in local mvn repo?
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.