forked from VimPlug/jedi-vim
cleaned up the mess in the Definition class
This commit is contained in:
7
jedi.vim
7
jedi.vim
@@ -109,7 +109,7 @@ if 1:
|
|||||||
vim.command('normal! K')
|
vim.command('normal! K')
|
||||||
vim.command('return')
|
vim.command('return')
|
||||||
else:
|
else:
|
||||||
docs = ['|Docstring for %s|\n%s' % (d, d.doc) if d.doc
|
docs = ['Docstring for %s\n%s\n%s' % (d.desc_with_module, '='*40, d.doc) if d.doc
|
||||||
else '|No Docstring for %s|' % d for d in definitions]
|
else '|No Docstring for %s|' % d for d in definitions]
|
||||||
text = ('\n' + '-' * 79 + '\n').join(docs)
|
text = ('\n' + '-' * 79 + '\n').join(docs)
|
||||||
vim.command('let l:doc = %s' % repr(PythonToVimStr(text)))
|
vim.command('let l:doc = %s' % repr(PythonToVimStr(text)))
|
||||||
@@ -130,6 +130,7 @@ PYTHONEOF
|
|||||||
silent normal! 1Gdd
|
silent normal! 1Gdd
|
||||||
setlocal nomodifiable
|
setlocal nomodifiable
|
||||||
setlocal nomodified
|
setlocal nomodified
|
||||||
|
setlocal filetype=rst
|
||||||
|
|
||||||
if l:doc_lines > 20 " max 20 lines for plugin
|
if l:doc_lines > 20 " max 20 lines for plugin
|
||||||
let l:doc_lines = 20
|
let l:doc_lines = 20
|
||||||
@@ -137,8 +138,8 @@ PYTHONEOF
|
|||||||
execute "resize ".l:doc_lines
|
execute "resize ".l:doc_lines
|
||||||
|
|
||||||
" TODO more highlightings
|
" TODO more highlightings
|
||||||
highlight jedi_doc ctermbg=green guibg=green
|
"highlight jedi_doc ctermbg=green guibg=green
|
||||||
match jedi_doc /^|.*|\n/
|
"match jedi_doc /^|.*|\n/
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" ------------------------------------------------------------------------
|
" ------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user