Highlight usages

Use matchaddpos to highlight usages in the current file.
This commit is contained in:
Dave Halter
2017-10-15 10:47:01 +02:00
parent 2bb7677b43
commit 84b8eeb954
3 changed files with 51 additions and 19 deletions

View File

@@ -270,7 +270,16 @@ function! jedi#goto_definitions() abort
endfunction
function! jedi#usages() abort
PythonJedi jedi_vim.goto(mode="related_name")
call jedi#remove_usages()
PythonJedi jedi_vim.usages()
endfunction
function! jedi#remove_usages() abort
for match in getmatches()
if stridx(match['group'], 'jediUsage') == 0
call matchdelete(match['id'])
endif
endfor
endfunction
function! jedi#rename(...) abort