Comments (8)
Hey, I assume you already have an idea of how to approach it. But I got it working by adding bundle list --paths
to
fu! s:RunAgDefinitionSearch(language, patterns) abort
let ag_ft = s:GetAgFiletype(a:language)
let cmd = s:ag_base_cmd . ' --' . ag_ft
let cmd = cmd . s:GetAgIgnoreSpecifier()
let cmd = cmd . ' ' . a:patterns . ' `bundle list --paths`'
If you expose the search path as variable and allow that to be configurable per language it will solve the issue of how to find definitions. I think reference should stay only in the current project.
The problem I hit is that the file paths are really long and you can't see the actual definition, so that might require a refactoring. I couldn't find a way to render the paths without the .../.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/bundler/gems/
, but this path is basically the GEM_PATH, so it's possible to supply a function per language to format the displayed path.
from any-jump.vim.
Hello, thanks for issue. I think you looking for "search definitions in libraries paths". This feature is in my release plan, but currently i don't know how to implement libs paths detection for all kinds of languages. I think i will try provide integration with modern's package managers only (go mod, rubygems, etc)
from any-jump.vim.
@pechorin Thanks for your reply, I think the easiest way is to integrate with lsp to get the doc returned by the language server,Or refer to dump-jump in emacs, it does not use lsp but provides accurate jump.
from any-jump.vim.
@taigacute where you find libraries lookup feature in dumb-jump? i don't see any of this abilities in dump-jump.el sources :/
from any-jump.vim.
I did n’t take a look at its implementation, but it is very accurate in the definition of jumps,This emacs package may be useful to you, this is just my suggestion. Thank you.
from any-jump.vim.
dump-jump.el is the main inspiration point for me :) original idea and regexp rules are comes from dumb-jump.el :) https://github.com/pechorin/any-jump.vim/blob/master/autoload/lang_map.vim#L2
from any-jump.vim.
@pechorin Ok, i saw it.
from any-jump.vim.
@edzhelyov yeah, it's a very naive implementation without long paths names displaying.
But the problem is long gems/node-packages/any-other-package-manager directories lists - the searching execution time will be slow (async search is another big not-implemented story) so we should add:
- searching in all packages directories with some kind of
AnyJumpPackages
- searching in 1/N packages directories
AnyJumpPackage <package-name> <package-name-2>
i should check is it possible to implement N vim arguments (maybe with select list with data from bundle list --paths
or ls ./node-modules
)
from any-jump.vim.
Related Issues (20)
- road to 1.0
- TS and JS pattern definition causes error on RunXDefinitionSearch HOT 10
- E716: Key not present in Dictionary: "text" HOT 2
- autoload/search.vim not loaded when using Plug and Vim 9.0 HOT 2
- error E491 in C++ files
- feature request: prioritize current file
- Support custom key binds in results window
- set not modifiable when possible
- Dynamically extend the `grep`-bin scan paths? HOT 1
- Feature Request: consider adding support for adding lang_map definitions
- Last cursor position lost HOT 3
- Feature Request: Push results to quickfix list HOT 2
- go to definition support HOT 1
- I am feeling lucky command HOT 1
- Crash/Hang when Running from Large Directory HOT 1
- Unable to use any function in large respository HOT 1
- Haskell: jump not working HOT 2
- Customizable options to base rg and ag commands
- Move images in project root to this issue
- When i use the anyjump, The following error prompt appears HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from any-jump.vim.