Commit Graph

115 Commits

Author SHA1 Message Date
Daniel Hahler
9ec2fb44b0 smart_auto_mappings: look for from only at the start of a line
Fixes https://github.com/davidhalter/jedi-vim/issues/469.
Closes https://github.com/davidhalter/jedi-vim/pull/470.
2015-10-06 01:44:26 +02:00
itchyny
267f66755d make key and val script local 2015-09-28 07:02:30 +09:00
Daniel Hahler
0d52b56a72 Merge pull request #455 from blueyed/add-reinit_python
Add jedi#reinit_python
2015-08-20 23:38:13 +02:00
Dave Halter
45c0b91c5e Merge pull request #456 from blueyed/add-debug-info
Add JediDebugInfo command: display used Python version
2015-08-20 10:32:38 +02:00
Daniel Hahler
83e62d56ba Add jedi#reinit_python
This is meant to be used in case you want to re-init the Python version
used by jedi-vim, without restarting Vim.

I had this laying around.. it might be better to just export
`s:init_python` as `jedi#init_python`?!
2015-08-19 23:58:47 +02:00
Daniel Hahler
ed09c7c1af Add JediDebugInfo command: display used Python version
This command is meant to come in handy to debug problems with jedi-vim.
For now, it will display the Python version that jedi-vim is using.
2015-08-19 23:57:29 +02:00
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
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
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
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
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
Jacob Niehus
a135f3b75b Find first column with winwidth instead of wincmds 2015-05-17 15:10:17 -07: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
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
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
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
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
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
78ac52a26e Merge remote-tracking branch 'origin/dev' 2015-04-29 23:41:37 +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
b78f1d74c5 Merge branch 'master' of github.com:davidhalter/jedi-vim 2015-04-28 19:42:31 +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
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
Dave Halter
e87e7db0e9 Trying to improve jedi-vim, when Jedi is not found. Fixes #263. 2015-03-30 19:11:05 +02:00
Dave Halter
075cd9ce69 call signature escape characters moved from == to =`=, because that's something way less common. 2015-03-25 16:29:06 +01:00
Dave Halter
d82df60392 Replace the call_signature_escape character with == (was a weird unicode character before), fixes #238. 2015-03-25 14:29:24 +01:00
pearofducks
55929b2713 Set 'hide documentation' to the same mapping as jedi#documentation_command - instead of K 2015-03-07 15:08:07 +01:00
Jacob Niehus
f44ae4efe0 Fix autocmd error in Vim <7.3.867 2014-12-06 14:47:45 -07:00
Jacob Niehus
9ea98e2e81 Fix obscure undojoin bug 2014-12-06 14:47:45 -07:00
Jacob Niehus
e1a49790cb Remove manual width calculation and handle horizontal scroll 2014-12-06 14:47:45 -07:00
Jacob Niehus
048b9dc286 Fix autocmd outside of if statement 2014-12-06 14:47:45 -07:00
Jacob Niehus
cfd71a6b54 Add option to show call signatures in command line 2014-12-06 14:47:45 -07:00
Dave Halter
0ce1af78b2 Merge pull request #336 from davidhalter/dev
Merge the dangling dev branch stuff back into master
2014-12-06 16:10:47 +01:00
itchyny
d477ee6557 add scriptencoding (fix #325) 2014-11-25 08:32:26 +09:00
Talha Ahmed
e620b5bf50 fixed mismatched parenthesis :| 2014-05-14 10:49:19 +05:00