Giter Site home page Giter Site logo

Comments (8)

edzhelyov avatar edzhelyov commented on May 30, 2024 1

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.

pechorin avatar pechorin commented on May 30, 2024

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.

glepnir avatar glepnir commented on May 30, 2024

@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.

pechorin avatar pechorin commented on May 30, 2024

@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.

glepnir avatar glepnir commented on May 30, 2024

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.

pechorin avatar pechorin commented on May 30, 2024

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.

glepnir avatar glepnir commented on May 30, 2024

@pechorin Ok, i saw it.

from any-jump.vim.

pechorin avatar pechorin commented on May 30, 2024

@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)

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.