Commit Graph

51 Commits

Author SHA1 Message Date
Konfekt 8c7161f4e9 prefer popup over preview window 2022-11-10 15:55:13 +01:00
Daniel Hahler acb98fc706 show_call_signatures: doc, default to 2 without 'conceal' (#994)
It basically allows to give a warning when '1' is used / set explicitly, and
the 'conceal' feature is not available.

Also defaulting to '2' (cmdline mode) then seems better than not using
it.

This is just some minor clean up before
https://github.com/davidhalter/jedi-vim/pull/652.
2020-02-03 01:31:10 +01:00
Daniel Hahler 5880f2de93 Revisit usage highlighting (#851) 2019-10-16 22:54:29 +02:00
Dave Halter 9c9a513aaf Add a goto_stubs command 2019-06-16 09:39:50 +02:00
Daniel Hahler 2f65c636f8 ftplugin: do not duplicate jedi_usages autocommands (#883)
Fixes https://github.com/davidhalter/jedi-vim/issues/882.
2018-11-08 08:43:28 +01:00
Dave Halter e7cb9a186e Also add remove_usages on InsertEnter 2018-07-15 19:26:11 +02:00
Dave Halter b5774a9554 Add an augroup for usages 2018-07-15 19:26:11 +02:00
Dave Halter f0d80048f1 Remove usages after text has changed in normal mode 2018-07-15 19:26:11 +02:00
Daniel Hahler eba90e615d Style fixes (via vint) (#662)
This also adds a augroup for `jedi#add_goto_window`.
2017-01-29 11:55:55 +01:00
Tommy Allen b7e42e6ad5 Fix preview autocmd being cleared for all buffers (#597)
Fixes https://github.com/davidhalter/jedi-vim/pull/582#issuecomment-235986169.
2016-07-28 23:02:21 +02:00
Tommy Allen 70360437cd Prevent duplication of InsertLeave autocmds in buffers (#582) 2016-06-12 00:35:09 +02:00
Daniel Hahler 3f259c2a9e Followup to 0703494: use <silent> with <C-R> mapping
Without this, the mapping/function will be displayed on Vim's cmdline.
2015-08-20 00:07:27 +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 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
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 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 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 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
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
Jacob Niehus cfd71a6b54 Add option to show call signatures in command line 2014-12-06 14:47:45 -07:00
Justin M. Keyes 17bfd3b276 fix #223: nnoremap instead of noremap
- mapping operator-pending-mode and selection-mode has undesirable
side-effects, and isn't actually used by jedi-vim.
- also, wrap 'for' loops in s:init() functions to avoid polluting the
global namespace ('for key in keys' assigns g:key).
2013-12-06 15:00:38 -05:00
Sheng Yun e8b9fcb5d1 Disable dot mapping at initialization if completion_enable is 0 2013-12-07 00:22:52 +08:00
Yann Thomas-Gerard 04c3fc9d1b Moves completion settings to the after directory 2013-09-23 13:48:06 +02:00
Yann Thomas-Gerard a9ffcbbda9 after/ftplugin/python/jedi.vim takes care of setting the omnifunc,
it's not needed here anymore.
2013-09-20 14:29:48 +02:00
Yann Thomas-Gerard 20a63f6c0f Sets our own omnifunc and allows loading of the distribution's python ftplugin 2013-09-18 11:44:06 +02:00
David Halter dd426c6369 change some more complete_string details 2013-08-28 19:36:57 +04:30
David Halter 3934359666 also move popup_on_dot_string method 2013-08-28 19:01:30 +04:30
David Halter 87ac865919 cleanup + all commands should cycle through entries, fixes #136 2013-08-28 15:44:21 +04:30
David Halter 3ce655f428 autocomplete function simplified, #136 2013-08-28 15:42:02 +04:30
David Halter a9c654fe48 added a way to disable completions, as mentioned in #166 2013-08-24 21:22:04 +04:30
David Halter 9d2259a63d make it possible to disable commands 2013-08-24 21:08:03 +04:30
David Halter c3bea09d74 rename methods 2013-08-23 11:24:10 +04:30
David Halter 6ed0b78c90 deprecate a lot of old definitions how to use functions, use instead the names of jedi functions 2013-08-20 16:17:39 +04:30
David Halter bba9682197 call_signatures instead of function_definition 2013-08-20 15:07:32 +04:30
David Halter 00814ef58d completions instead of complete 2013-08-20 15:01:09 +04:30
David Halter 403028a50c ctrl space cycles now through results, when used multiple times, fixes #118 2013-05-18 19:55:30 +04:30
Patrice Peterson 15605d77d6 Silence dot completion mappings
I find the long line that pops up in the command-line whenever I press
`.` a bit distracting, and it would potentially overwrite other useful
information displayed in there. This change silences the dot completion
commands.
2013-03-01 13:06:00 +01:00
Jean-Louis Fuchs f234bf4376 Select first line of completion popup. Improves typing flow and saves one keypress. 2013-01-21 18:08:19 +01:00
David Halter 098cdb3eb8 Don't map <C-c> if a mapping already exists, fixes #69 2013-01-11 11:03:19 +01:00
David Halter 7b60d00dbc also check for py3k in ftplugin 2013-01-07 00:00:16 +01:00
David Halter 5670946a73 finish also ftplugin if +python is not available 2013-01-05 13:56:38 +01:00
David Halter 4336cbb742 by default <C-c> imaps to escape, should fix #55 2012-12-24 00:44:09 +01:00
David Halter 824925debe remove unnecessary echo 2012-12-18 17:25:00 +01:00
David Halter 730c98ff67 add autocompletion_command default -> fixes #51 2012-12-18 17:14:58 +01:00
David Halter 704c1c2553 added auto configuration of VIM setting -> fixes #52 2012-12-18 16:46:28 +01:00
David Halter 42900bb62f if completeopt = longest is not set, change the default behaviour of the popup menu, fixes #32 2012-12-11 15:10:03 +01:00
David Halter 71f146c6bd add c-space also for gvim, which doesn't work with <nul>, #42 2012-11-27 10:29:12 +01:00
David Halter 75dee25646 removed sorting, because jedi does that now. 2012-11-21 17:33:12 +01:00
mattn 22198c7bed set b:did_ftplugin to avoid overwrites by pythoncomplete.vim . 2012-10-31 09:15:28 +09:00