Commit Graph

765 Commits

Author SHA1 Message Date
Daniel Hahler
2fbcc5b991 nvim: add a warning in case the auto-detected version is not functional
This usually means that the `neovim` module is not installed, which
commonly happens in a virtualenv.
2015-08-19 23:54:30 +02:00
Daniel Hahler
7890339ca8 Merge pull request #454 from davidhalter/smart-import-mapping
Smart import mapping

Closes https://github.com/davidhalter/jedi-vim/pull/453.
Closes https://github.com/davidhalter/jedi-vim/pull/454.
2015-08-19 23:46:22 +02:00
Daniel Hahler
91c2a031df Add tests for smart_auto_mappings 2015-08-19 22:37:32 +02:00
Daniel Hahler
0703494188 smart_auto_mappings: use C-r instead of expr-mapping
This makes it work in tests.  Using `<expr>` instead will not trigger
the expansion of the mapping.
This is likely a bug in vim-vspec; I have tried 1.4.1 (currently pinned)
and 1.6.1.
2015-08-19 22:37:13 +02:00
Daniel Hahler
6dedbf339e smart_auto_mappings: improve pattern 2015-08-19 22:36:23 +02:00
Daniel Hahler
889feae117 jedi#smart_auto_mappings: always 'popup_on_dot'
`popup_on_dot=1` means that it should not auto-select the first entry,
which is the case for the new smart-import-mapping.
2015-08-19 22:34:52 +02:00
Ali Aliyev
ac1615c647 Smart completion after "from foo": add "import" and complete
This adds a new setting `jedi#smart_auto_mappings` (default 1).
2015-08-17 23:36:48 +02:00
Dave Halter
d3484afe20 Merge pull request #442 from maxamillion/add_fedora
Add entry for Fedora Linux vim-jedi package
2015-08-09 13:51:45 +02:00
Bohr Shaw
dc9688602c Use shellescape with system call
This properly escapes the shell argument on Windows.

`cmd.exe` would strip off the first and last quote on a command.

Closes https://github.com/davidhalter/jedi-vim/pull/443/files.
2015-07-27 02:04:21 +02:00
Daniel Hahler
ed4a8be12e Revert "Use " with the shell argument for system()"
This reverts commit 95b8dd77ba.
2015-07-27 02:04:02 +02:00
Daniel Hahler
924b4db962 Add myself to AUTHORS
According to my first contribution as of:

> commit b6bef9a
> Date:   Tue Mar 3 12:59:52 2015 +0100
2015-07-27 00:50:49 +02:00
Daisuke Suzuki
95b8dd77ba Use " with the shell argument for system()
This is required on Windows.

Closes https://github.com/davidhalter/jedi-vim/pull/441.
2015-07-27 00:49:40 +02:00
Adam Miller
2e0be9069a Add entry for Fedora Linux vim-jedi package 2015-07-23 17:20:25 -05:00
Dave Halter
b3978bc4aa Merge pull request #431 from blueyed/fix-valueerror-cmdline-callsigs
Fix ValueError with cmdline call signatures
2015-07-01 03:09:27 +02:00
Daniel Hahler
91b4332774 Fix ValueError with cmdline call signatures
Commit 8016665 escaped the newlines in `text`, which requires to use the
escaped version with `text.index` and `len`, too.

This fixes the following error:

    Traceback (most recent call last):
      File "…/jedi/jedi_vim.py", line 110, in wrapper
        return func(*args, **kwargs)
      File "…/jedi/jedi_vim.py", line 414, in cmdline_call_signatures
        left = text.index(params[index])
    ValueError: substring not found
2015-06-26 17:07:23 +02:00
Dave Halter
133281a021 Merge pull request #430 from blueyed/no-use_tabs_not_buffers-by-default
Use use_tabs_not_buffers=0 by default
2015-06-26 14:09:04 +02:00
Daniel Hahler
439e50e9d1 Use use_tabs_not_buffers=0 by default
Ref: https://github.com/davidhalter/jedi-vim/issues/408#issuecomment-101997691
2015-06-21 22:06:24 +02:00
Daniel Hahler
56b2268df3 Merge pull request #422 from wilywampa/winwidth
Find first column using winwidth instead of wincmds/undojoin
2015-06-08 09:24:35 +02:00
Jacob Niehus
a135f3b75b Find first column with winwidth instead of wincmds 2015-05-17 15:10:17 -07:00
Dave Halter
bce599fc9c Merge pull request #417 from blueyed/fix-rename
Fix rename behaviour with empty cword; honor b:changedtick
2015-05-14 11:05:53 +02:00
Daniel Hahler
0dd1b9fd44 Fix PEP8 style 2015-05-12 22:08:39 +02:00
Daniel Hahler
6c1719a68a Fix rename behaviour with empty cword; honor b:changedtick
Ref: https://github.com/davidhalter/jedi-vim/issues/416
2015-05-12 22:08:30 +02:00
Daniel Hahler
d79f41149f Fix wrong call of goto in do_rename
This was overseen in dd33e38.

This is the main fix for https://github.com/davidhalter/jedi-vim/issues/41.
2015-05-12 22:04:15 +02:00
Daniel Hahler
651eac91ff goto: fix return value to always be a list
Fixes https://github.com/davidhalter/jedi-vim/issues/414#issuecomment-101341260
2015-05-12 19:43:09 +02:00
Daniel Hahler
abc0c07d0f echo_highlight: escape quotes in msg 2015-05-11 13:22:21 +02:00
Dave Halter
0747189516 Merge pull request #407 from blueyed/goto-auto
Better goto functionality
2015-05-10 20:02:38 +02:00
Daniel Hahler
dd33e38631 Add auto-goto command/function
This adds g:jedi#goto_command, and uses `<Leader>d` by default for it -
the old default for `g:jedi#goto_definitions_command`, which is now
empty.

It will try `script.goto_definitions()` first, and falls back to
`script.goto_assignments()` for builtins.

Closes https://github.com/davidhalter/jedi-vim/pull/407
2015-05-10 18:07:42 +02:00
Daniel Hahler
9a13f143a8 rename: fix saving/restoring of the view
This seemed(?) to work with Python 3, but not for Python 2.  Just get a
string (instead of dict) from Vim, and re-use that as-is.

This fixes afb84a8.
2015-05-09 19:14:54 +02:00
Dave Halter
6025f59945 Dropping the dev branch. Changed the notes about using it. Fixes #406. 2015-05-04 15:36:27 +02:00
Daniel Hahler
1bf69c5844 Merge pull request #360 from wilywampa/escape_newline
Escape newlines in call signatures with show_call_signatures=2
2015-05-04 00:41:51 +02:00
Daniel Hahler
054285e2b7 rename: fix opening new windows with &shellslash (Windows)
Ref: https://github.com/davidhalter/jedi-vim/pull/364#issuecomment-98418501
2015-05-03 17:16:08 +02:00
Dave Halter
fb77981040 Merge pull request #403 from blueyed/fix-rename
Fix rename
2015-05-03 15:48:37 +02:00
Daniel Hahler
de410d9347 Merge pull request #402 from blueyed/add-max_doc_height
Add max_doc_height setting
2015-05-03 15:40:35 +02:00
Dave Halter
299c9b26d3 Merge pull request #401 from blueyed/reorder-jedi_vim
Reorder jedi_vim.py / improved error handling
2015-05-03 03:46:19 +02:00
Daniel Hahler
4d67c1a6e3 rename: refactor into do_rename, add rename_visual
This adds a visual mode map for renaming, which asks for the new name
via input().

`rename` itself could be changed to use `input()`, too - but I've left
it for now.
2015-05-02 18:51:10 +02:00
Daniel Hahler
154e2dbae3 rename: use original word's length for replacing
Ref: https://github.com/davidhalter/jedi-vim/pull/403#discussion_r29548013
2015-05-02 18:46:52 +02:00
Daniel Hahler
b9ba141069 rename: display error in case new_buffer should fail and continue
Previously it would `return`, which would not restore the previous
state.  While I am not sure that it should continue, it should at least
not return.
2015-05-02 16:42:36 +02:00
Daniel Hahler
bf281dabda rename: fix _tabnew to go to the correct window 2015-05-02 16:42:28 +02:00
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