Commit Graph

577 Commits

Author SHA1 Message Date
Daniel Hahler
afb84a837c rename: save and restore view before/after changes 2015-05-02 16:42:04 +02:00
Daniel Hahler
7539614f09 rename: display number of affected buffers 2015-05-02 16:41:13 +02:00
Daniel Hahler
fc95545378 rename: save/restore tab/windows; not via new_buffer
Ref: https://github.com/davidhalter/jedi-vim/pull/364#discussion-diff-25785992
2015-05-02 16:38:47 +02:00
Daniel Hahler
676c558110 VimError: set self.message
`self.message` is used in `__str__`.

Without this, tracebacks end like this:

    Traceback (most recent call last):
    [...]
      File "…/vim/neobundles/jedi/jedi_vim.py", line 87, in _catch_
    exception
        raise VimError(result['exception'], result['throwpoint'], string)
    jedi_vim.VimError: <unprintable VimError object>
2015-05-02 11:51:27 +02:00
Daniel Hahler
65c06553fd Move max_doc_height default to s:default_settings 2015-05-02 10:41:31 +02:00
petobens
4095d0efef Add variable to control the height of the buffer showing documentation 2015-05-02 10:34:43 +02:00
Daniel Hahler
527562208c jedi_vim: reorder to use echo_highlight in try-import block
This uses `echo_highlight` for exceptions caused by an empty "jedi"
folder.
2015-05-02 00:44:45 +02:00
Daniel Hahler
baa2969427 minor: use 'jedi-vim' in no_jedi_warning; fix typo 'too old' 2015-05-02 00:44:37 +02:00
Daniel Hahler
dd4cb80911 Move jedi#_vim_exceptions before call to jedi#init_python
It might be used during setup, in the case of errors and needs to be
defined then already.
2015-05-02 00:44:33 +02:00
Daniel Hahler
e5038cc9fa Merge branch 'master' into dev 2015-05-01 04:46:13 +02:00
Daniel Hahler
2f06d90f95 Fix jedi#complete_opened for completeopt with "longest"
jedi#complete_opened: move <C-p> for is_popup_on_dot below "longest"
handling.

Fixes #399.
2015-05-01 04:41:33 +02:00
Dave Halter
03805f87f5 Merge pull request #397 from blueyed/select-mode-mapping
Select mode mapping for completion trigger
2015-04-30 19:22:00 +02:00
Dave Halter
c38b549a95 Merge pull request #398 from blueyed/auto-config-in-plugin
auto-config: set completeopt only if it's the default
2015-04-30 16:56:05 +02:00
Daniel Hahler
83d398bc5d auto-config: set completeopt only if it's the default
The setting is also moved from "ftplugin" to "plugin", which allows for
easier customization, e.g. via a FileType plugin.

Ref: https://github.com/davidhalter/jedi-vim/issues/374#issuecomment-97621368
2015-04-30 02:37:36 +02:00
Daniel Hahler
0f203c12b9 Add select-mode mapping for completion trigger
This deletes the selection (by going to visual mode, and "c"), and then
triggers the completion.

This is useful with e.g. UltiSnips, when you want to start completion
with an expanded snippet argument selected.

Ref: https://github.com/davidhalter/jedi-vim/pull/339#issuecomment-97612632
2015-04-30 01:53:01 +02:00
Daniel Hahler
cfb76259f1 Mapping: remap of <C-Space>: use <buffer> and map to <C-Space>
Mapping it to <C-Space> should be enough, and makes it unnecessary to
map everything twice.
2015-04-30 01:50:23 +02:00
Dave Halter
78ac52a26e Merge remote-tracking branch 'origin/dev' 2015-04-29 23:41:37 +02:00
Dave Halter
3b26cf376b Merge pull request #396 from blueyed/fix-dot-completion-dev
Fix popup-on-dot completion: use <C-p> to deselect the first entry
2015-04-29 23:20:36 +02:00
Daniel Hahler
d76c00eff4 jedi#init_python: add v:throwpoint to error message 2015-04-29 23:11:44 +02:00
Daniel Hahler
3c79979c50 Move functions used by jedi#init_python before it 2015-04-29 23:11:44 +02:00
Daniel Hahler
1837cdee1f Move Python init to top of autoloading; finish in case of error
This will not define jedi-vim's functions in case initialization failed.
2015-04-29 23:11:44 +02:00
Daniel Hahler
e43012afc8 Refactor init method: add jedi#init_python
- jedi#init_python is used to init the Python environment.
 - jedi#setup_py_version is the single point where PythonJedi is
   defined, and will configure `PythonJedi` to output an error in case
   initialization failed.
 - jedi#force_py_version_switch will throw an error when
   g:jedi#force_py_version is not handled (e.g. invalid or "auto" and
   unresolved).
 - When g:jedi#force_py_version is provided, it will be used always.
 - Use WarningMsg highlight for errors, which are centralized and
   handled through exceptions.
2015-04-29 23:11:44 +02:00
Daniel Hahler
2d74fe6c51 Use PythonJedi instead of Python as command wrapper
`:Python` is more likely to interfere with other plugins / user
commands.
2015-04-29 23:11:44 +02:00
Daniel Hahler
9779628322 Refactor 'auto' handling 2015-04-29 23:11:44 +02:00
Daniel Hahler
3497a9644e jedi#force_py_version: catch errors
This prevents the script from aborting, in case e.g. `py3file` is not
defined, but should be forced.
2015-04-29 23:11:44 +02:00
Daniel Hahler
0cd664d8f7 Drop jedi#get_force_py_version again, handle 'auto' once 2015-04-29 23:11:44 +02:00
Daniel Hahler
7784c29a59 Optimize python check for Neovim: skip has() calls 2015-04-29 23:11:43 +02:00
Daniel Hahler
8f7f07fb58 Support for force_py_version = "auto"
This will call `python` to look up its major version number.
2015-04-29 23:11:43 +02:00
Daniel Hahler
63dc0badac Fix popup-on-dot completion: use <C-p> to deselect the first entry
Without this, the <C-x><C-o> triggered by jedi-vim would cause the first
match to be inserted (and selected).  When using completopt=longest,
this was less so an issue.
2015-04-29 23:09:18 +02:00
Dave Halter
cc254432b6 Merge remote-tracking branch 'origin/dev' 2015-04-29 22:52:03 +02:00
Dave Halter
ae8a2505bc Merge branch 'master' of github.com:davidhalter/jedi-vim 2015-04-29 22:40:10 +02:00
Dave Halter
839e1b5b85 We've had some issues in running the tests with vim-vspec > 1.4.1, so we're just defaulting to that. 2015-04-29 22:39:58 +02:00
Dave Halter
27df21c7bf Merge pull request #393 from blueyed/better-builtin-error
Use `desc_with_module` in "Builtin modules cannot be displayed" error
2015-04-29 15:41:13 +02:00
Dave Halter
acdd711d84 Merge pull request #395 from blueyed/improve-tests
Improve tests: use pytest.fail
2015-04-29 15:40:40 +02:00
Dave Halter
9b11e70afe Merge pull request #394 from blueyed/no-echoerr
Use "echohl WarningMsg" instead of "echoerr" in no_jedi_warning
2015-04-29 15:39:09 +02:00
Daniel Hahler
ab04982d63 pep8 fixes; sort imports 2015-04-29 11:52:36 +02:00
Daniel Hahler
a0bb09e891 tests: use pytest.fail instead of assert False 2015-04-29 11:51:52 +02:00
Daniel Hahler
2611ea3c27 Use "echohl WarningMsg" instead of "echoerr" in no_jedi_warning
`echoerr` causes Vim to throw an error, but like the function name
indicates, this is only a warning.
2015-04-29 11:29:27 +02:00
Daniel Hahler
fe517fae74 Use desc_with_module in "Builtin modules cannot be displayed" error 2015-04-29 10:57:40 +02:00
Dave Halter
401731c98b Merge branch 'dev' of github.com:davidhalter/jedi-vim 2015-04-28 19:43:14 +02:00
Dave Halter
b78f1d74c5 Merge branch 'master' of github.com:davidhalter/jedi-vim 2015-04-28 19:42:31 +02:00
Dave Halter
2bfae0acfa Jedi 0.9.0 release. 2015-04-28 19:42:21 +02:00
Dave Halter
b7bdb5a06e Merge pull request #383 from blueyed/qf-min-height
add_goto_window: pass len of list and use min()
2015-04-08 23:52:37 +02:00
Daniel Hahler
a233d603e3 add_goto_window: pass len of list and use min()
With less than `g:jedi#quickfix_window_height` entries in quickfix list,
this now only makes the window that large, effectively saving screen
space.
2015-04-08 16:10:56 +02:00
Dave Halter
1005d1ad64 Merge pull request #382 from d7415/dev
Add Debian and Ubuntu packages to README.rst
2015-04-07 00:46:17 +02:00
Martin Stone
c22e2bcdf5 Add linux packages to docs. 2015-04-02 15:33:27 +01:00
Dave Halter
bf96f7d611 jedi#auto_vim_configuration might not have been set before loading plugin. Therefore check if it was set. 2015-04-02 16:16:17 +02:00
d7415
a120f428ff Add Debian and Ubuntu packages to README.rst 2015-04-02 12:18:35 +01:00
Dave Halter
d3fadd54c7 Simplification. 2015-03-31 02:17:33 +02:00
Dave Halter
d65c35a69d Problem with multi definitions tokenize tests. Jedi behaves different now, therefore I have disabled the tests. Once we find another example where it actually makes sense to test it, we can reenable the tests. 2015-03-31 00:54:58 +02:00