GitHub - pechorin/any-jump.nvim: Jump to any definition and usages 👁 IDE madness...
source link: https://github.com/pechorin/any-jump.nvim
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
README.md
any-jump
— IDE madness without overhead for 40+ languages
Nvim plugin for "jump to defitinition⚒" and "find usages🔬" feature through nice popup ui
nvim 0.4+ with popup windows required; vim support is planned for near releases
Based on syntax rules for 40 languages and fast regexp engines like ripgrep and ag. Required rg
or ag
to be installed. GNU grep support dropped for flavor of blazing perfomance (can be implemented in future releases).
- jump to symbol/class/const/variable definition with
<leader>j
- display and jump to symbol/class/const/variable usages inside current project
Jumping through source code of Discource app
Installation
via vim-plug:
Plug 'pechorin/any-jump.nvim'
Keybindings
Default global mappings for normal mode:
" Jump to definition under cursore nnoremap <leader>j :AnyJump<CR> " open previous opened file (after jump) nnoremap <leader>ab :AnyJumpBack<CR> " open last closed search window again nnoremap <leader>al :AnyJumpLastResults<CR>
To *disable default keybindings write:
let g:any_jump_disable_default_keybindings = v:true
Mappings for popup search window
au FileType any-jump nnoremap <buffer> o :call g:AnyJumpHandleOpen()<cr> au FileType any-jump nnoremap <buffer><CR> :call g:AnyJumpHandleOpen()<cr> au FileType any-jump nnoremap <buffer> p :call g:AnyJumpHandlePreview()<cr> au FileType any-jump nnoremap <buffer> <tab> :call g:AnyJumpHandlePreview()<cr> au FileType any-jump nnoremap <buffer> q :call g:AnyJumpHandleClose()<cr> au FileType any-jump nnoremap <buffer> <esc> :call g:AnyJumpHandleClose()<cr> au FileType any-jump nnoremap <buffer> u :call g:AnyJumpHandleUsages()<cr> au FileType any-jump nnoremap <buffer> U :call g:AnyJumpHandleUsages()<cr> au FileType any-jump nnoremap <buffer> b :call g:AnyJumpToFirstLink()<cr> au FileType any-jump nnoremap <buffer> T :call g:AnyJumpToggleGrouping()<cr> au FileType any-jump nnoremap <buffer> a :call g:AnyJumpToggleAllResults()<cr> au FileType any-jump nnoremap <buffer> A :call g:AnyJumpToggleAllResults()<cr>
Settings
" Show line numbers in search rusults let g:any_jump_list_numbers = v:true " Auto search usages let g:any_jump_usages_enabled = v:false " Auto group results by filename let g:any_jump_grouping_enabled = v:false " Amount of preview lines for each search result let g:any_jump_preview_lines_count = 5 " Max search results, other results can be opened via [a] let g:any_jump_max_search_results = 7 " Prefered search engine: rg or ag let g:any_jump_search_prefered_engine = 'rg' " Ungrouped results ui variants: " - 'filename_first' " - 'filename_last' let g:any_jump_results_ui_style = 'filename_first' "
Features
open definitions and usages list
preview definition with p
or tab
group results by file
search results without line numbers and different ui style
Supported languages
- ruby
- elixir
- crystal
- rust
- haskell
- java
- javascript
- typescript
- scala
- kotlin
- php
- protobuf
- scss
- fsharp
- c++
- coffeescript
- go
- lua
- nim
- scad
- elisp
- nix
- clojure
- coq
- systemverilog
- objc
- racket
- vhdl
- scheme
- r
- sql
- faust
- vala
- matlab
- python
- pascal
- tex
- swift
- shell
- perl
- csharp
- commonlisp
- ocaml
- erlang
- julia
- sml
- groovy
- dart
- fortran
Original idea
Comes from dumb-jump.el emacs package
Issues and contibutions
Please open issue on any question and problem
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK