forked from VimPlug/jedi-vim
Compare commits
19 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a33071af6b | |||
| 89a2122ab0 | |||
| eebf7d2863 | |||
| c3f9b751f3 | |||
| 9679051ad4 | |||
| 0efafede57 | |||
| 7c331a1b64 | |||
| f4e0dbc183 | |||
| 344814c214 | |||
| a06395549f | |||
| 9c2f9c63d3 | |||
| 382d8a48d0 | |||
| 4ad1f2fc3d | |||
| 130ce7fb79 | |||
| 907b6837a9 | |||
| 9bd79ee41a | |||
| 2c188fea29 | |||
| b82da7d2b5 | |||
| c87947e760 |
@@ -3,10 +3,10 @@ on: [push, pull_request]
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
tests:
|
tests:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
@@ -20,44 +20,3 @@ jobs:
|
|||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: 'make test'
|
run: 'make test'
|
||||||
|
|
||||||
code-quality:
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
|
|
||||||
- name: Run tests
|
|
||||||
run: |
|
|
||||||
vim --version
|
|
||||||
make check
|
|
||||||
|
|
||||||
coverage:
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
sudo add-apt-repository ppa:neovim-ppa/stable -y
|
|
||||||
sudo apt-get update -q
|
|
||||||
sudo apt-get install neovim -y
|
|
||||||
|
|
||||||
sudo pip install pynvim pytest-cov
|
|
||||||
sudo pip list
|
|
||||||
nvim --version
|
|
||||||
|
|
||||||
- name: Run tests
|
|
||||||
run: |
|
|
||||||
make --keep-going test_coverage BUILD_VIRTUAL_ENV=$VIRTUAL_ENV
|
|
||||||
|
|
||||||
- name: Upload coverage data
|
|
||||||
run: |
|
|
||||||
coverage xml
|
|
||||||
bash <(curl -s https://codecov.io/bash) -X fix -f coverage.xml -F py${TRAVIS_PYTHON_VERSION//./}
|
|
||||||
|
|||||||
+8
-2
@@ -73,10 +73,16 @@ Installation
|
|||||||
|
|
||||||
Requirements
|
Requirements
|
||||||
------------
|
------------
|
||||||
You need a VIM version that was compiled with Python 3 or later
|
- **Vim**: You need a VIM version that was compiled with Python 3 or later
|
||||||
(``+python3``). You can check this from within VIM using
|
(``+python3``). You can check this from within VIM using
|
||||||
``:python3 import sys; print(sys.version)``.
|
``:python3 import sys; print(sys.version)``.
|
||||||
|
|
||||||
|
- **Neovim**: You need a python environment with ``pynvim`` installed:
|
||||||
|
``pip install pynvim``
|
||||||
|
|
||||||
|
then check your environment is correctly setup from within Neovim using
|
||||||
|
``:checkhealth provider.python``
|
||||||
|
|
||||||
Manual installation
|
Manual installation
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
@@ -108,7 +114,7 @@ Installation with your distribution
|
|||||||
-----------------------------------
|
-----------------------------------
|
||||||
|
|
||||||
On Arch Linux, you can also install jedi-vim from official repositories as
|
On Arch Linux, you can also install jedi-vim from official repositories as
|
||||||
`vim-jedi <https://www.archlinux.org/packages/community/any/vim-jedi/>`__.
|
`vim-jedi <https://archlinux.org/packages/extra/any/vim-jedi/>`__.
|
||||||
It is also available on
|
It is also available on
|
||||||
`Debian (≥8) <https://packages.debian.org/vim-python-jedi>`__ and
|
`Debian (≥8) <https://packages.debian.org/vim-python-jedi>`__ and
|
||||||
`Ubuntu (≥14.04) <http://packages.ubuntu.com/vim-python-jedi>`__ as
|
`Ubuntu (≥14.04) <http://packages.ubuntu.com/vim-python-jedi>`__ as
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
function! health#jedi#check() abort
|
function! health#jedi#check() abort
|
||||||
call health#report_start('jedi')
|
call v:lua.vim.health.start('jedi')
|
||||||
silent call jedi#debug_info()
|
silent call jedi#debug_info()
|
||||||
endfunction
|
endfunction
|
||||||
|
|||||||
+1
-1
Submodule pythonx/jedi updated: 51f4a99a1e...3102215478
+1
-1
Submodule pythonx/parso updated: ee5edaf22f...bfe3058441
@@ -52,19 +52,6 @@ describe 'completions'
|
|||||||
Expect getline('.') == 'IndentationError().filename'
|
Expect getline('.') == 'IndentationError().filename'
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'multi complete'
|
|
||||||
" NOTE: nvim results in "importErr()" here with completeopt+=longest,
|
|
||||||
" but Vim is fine.
|
|
||||||
" This is due to `pumvisible()` in jedi#complete_opened being true
|
|
||||||
" with nvim still, but it is 0 with Vim, i.e. Vim appears to close
|
|
||||||
" the pum already (with the tests).
|
|
||||||
"
|
|
||||||
" This might be a misunderstanding though, since the test might not
|
|
||||||
" expect the "import" keyword to be offered for completion?!
|
|
||||||
normal oImpXErrX()
|
|
||||||
Expect getline('.') == 'ImportError()'
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'cycling through entries popup_select_first=0'
|
it 'cycling through entries popup_select_first=0'
|
||||||
set completeopt+=longest
|
set completeopt+=longest
|
||||||
let g:jedi#popup_select_first = 0
|
let g:jedi#popup_select_first = 0
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ describe 'signatures'
|
|||||||
doautocmd CursorHoldI
|
doautocmd CursorHoldI
|
||||||
noautocmd normal istaticmethod()
|
noautocmd normal istaticmethod()
|
||||||
doautocmd CursorHoldI
|
doautocmd CursorHoldI
|
||||||
Expect getline(1) == '?!?jedi=0, ?!? (*_*f: Callable[..., Any]*_*) ?!?jedi?!?'
|
Expect getline(1) == '?!?jedi=0, ?!? (*_*f: Callable[_P, _R_co]*_*) ?!?jedi?!?'
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'highlights correct argument'
|
it 'highlights correct argument'
|
||||||
@@ -51,11 +51,11 @@ describe 'signatures'
|
|||||||
" Move to x - highlights "x".
|
" Move to x - highlights "x".
|
||||||
noautocmd normal 2h
|
noautocmd normal 2h
|
||||||
doautocmd CursorHoldI
|
doautocmd CursorHoldI
|
||||||
Expect getline(1) == '?!?jedi=0, ?!? (value: object, *_*format_spec: str=...*_*) ?!?jedi?!?'
|
Expect getline(1) == '?!?jedi=0, ?!? (value: object, *_*format_spec: str=""*_*) ?!?jedi?!?'
|
||||||
" Move left to 42 - hightlights first argument ("value").
|
" Move left to 42 - hightlights first argument ("value").
|
||||||
noautocmd normal 4h
|
noautocmd normal 4h
|
||||||
doautocmd CursorHoldI
|
doautocmd CursorHoldI
|
||||||
Expect getline(1) == '?!?jedi=0, ?!? (*_*value: object*_*, format_spec: str=...) ?!?jedi?!?'
|
Expect getline(1) == '?!?jedi=0, ?!? (*_*value: object*_*, format_spec: str="") ?!?jedi?!?'
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'no signature'
|
it 'no signature'
|
||||||
@@ -82,7 +82,7 @@ describe 'signatures'
|
|||||||
redir => msg
|
redir => msg
|
||||||
python3 jedi_vim.show_call_signatures()
|
python3 jedi_vim.show_call_signatures()
|
||||||
redir END
|
redir END
|
||||||
Expect msg == "\nstaticmethod(f: Callable[..., Any])"
|
Expect msg == "\nstaticmethod(f: Callable[_P, _R_co])"
|
||||||
|
|
||||||
redir => msg
|
redir => msg
|
||||||
doautocmd InsertLeave
|
doautocmd InsertLeave
|
||||||
@@ -98,6 +98,11 @@ describe 'signatures'
|
|||||||
end
|
end
|
||||||
|
|
||||||
it 'command line truncation'
|
it 'command line truncation'
|
||||||
|
" Disable autoindent so `o` opens a new line at column 0; relying on
|
||||||
|
" `\<BS>` to strip the indent is not portable across vim/nvim defaults
|
||||||
|
" (with `bs=eol` it joins lines instead of just removing the indent).
|
||||||
|
setlocal noautoindent nosmartindent indentexpr=
|
||||||
|
|
||||||
let g:jedi#show_call_signatures = 2
|
let g:jedi#show_call_signatures = 2
|
||||||
call jedi#configure_call_signatures()
|
call jedi#configure_call_signatures()
|
||||||
|
|
||||||
@@ -111,7 +116,7 @@ describe 'signatures'
|
|||||||
let funcname = repeat('a', &columns - (30 + (&ruler ? 18 : 0)))
|
let funcname = repeat('a', &columns - (30 + (&ruler ? 18 : 0)))
|
||||||
put = 'def '.funcname.'(arg1, arg2, arg3, a, b, c):'
|
put = 'def '.funcname.'(arg1, arg2, arg3, a, b, c):'
|
||||||
put = ' pass'
|
put = ' pass'
|
||||||
execute "normal o\<BS>".funcname."( "
|
execute "normal o".funcname."( "
|
||||||
Expect Signature() == "\n".funcname."(arg1, …)"
|
Expect Signature() == "\n".funcname."(arg1, …)"
|
||||||
|
|
||||||
exe 'normal sarg1, '
|
exe 'normal sarg1, '
|
||||||
@@ -126,7 +131,7 @@ describe 'signatures'
|
|||||||
g/^/d
|
g/^/d
|
||||||
put = 'def '.funcname.'('.repeat('b', 20).', arg2):'
|
put = 'def '.funcname.'('.repeat('b', 20).', arg2):'
|
||||||
put = ' pass'
|
put = ' pass'
|
||||||
execute "normal o\<BS>".funcname."( "
|
execute "normal o".funcname."( "
|
||||||
Expect Signature() == "\n".funcname."(…)"
|
Expect Signature() == "\n".funcname."(…)"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user