mirror of
https://github.com/davidhalter/jedi-vim.git
synced 2025-12-07 03:04:30 +08:00
Merge pull request #1076 from jamescherti/case-insensitive
Add option to enable/disable case insensitive completion
This commit is contained in:
@@ -56,5 +56,6 @@ Stevan Milic (@stevanmilic) <stevan.milic@yahoo.com>
|
|||||||
Konstantin Glukhov (@Konstantin-Glukhov)
|
Konstantin Glukhov (@Konstantin-Glukhov)
|
||||||
Seungchan An (@SeungChan92) <dev.issea1015@gmail.com>
|
Seungchan An (@SeungChan92) <dev.issea1015@gmail.com>
|
||||||
Thomas Blauth (@ThomasBlauth) <thomas.blauth@protonmail.com>
|
Thomas Blauth (@ThomasBlauth) <thomas.blauth@protonmail.com>
|
||||||
|
James Cherti (@jamescherti)
|
||||||
|
|
||||||
@something are github user names.
|
@something are github user names.
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ let s:default_settings = {
|
|||||||
\ 'added_sys_path': '[]',
|
\ 'added_sys_path': '[]',
|
||||||
\ 'project_path': "'auto'",
|
\ 'project_path': "'auto'",
|
||||||
\ 'smart_auto_mappings': 0,
|
\ 'smart_auto_mappings': 0,
|
||||||
|
\ 'case_insensitive_completion': 1,
|
||||||
\ 'use_tag_stack': 1
|
\ 'use_tag_stack': 1
|
||||||
\ }
|
\ }
|
||||||
|
|
||||||
|
|||||||
@@ -47,6 +47,8 @@ Contents *jedi-vim-contents*
|
|||||||
6.15. environment_path |g:jedi#environment_path|
|
6.15. environment_path |g:jedi#environment_path|
|
||||||
|b:jedi_environment_path|
|
|b:jedi_environment_path|
|
||||||
6.16. added_sys_path |g:jedi#added_sys_path|
|
6.16. added_sys_path |g:jedi#added_sys_path|
|
||||||
|
6.17. case_insensitive_completion |g:jedi#case_insensitive_completion|
|
||||||
|
|b:jedi_case_insensitive_completion|
|
||||||
7. Testing |jedi-vim-testing|
|
7. Testing |jedi-vim-testing|
|
||||||
8. Contributing |jedi-vim-contributing|
|
8. Contributing |jedi-vim-contributing|
|
||||||
9. License |jedi-vim-license|
|
9. License |jedi-vim-license|
|
||||||
@@ -533,6 +535,18 @@ To add extra sys_path.
|
|||||||
Examples: ["../site-packages"]
|
Examples: ["../site-packages"]
|
||||||
Default: []
|
Default: []
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
6.17. `g:jedi#case_insensitive_completion` *g:jedi#case_insensitive_completion*
|
||||||
|
*b:jedi_case_insensitive_completion*
|
||||||
|
|
||||||
|
0 to disable case insensitive completion.
|
||||||
|
1 to enable case insensitive completion (default).
|
||||||
|
|
||||||
|
The buffer-local variable `b:jedi_case_insensitive_completion` can be used to
|
||||||
|
override the global variable `g:jedi#case_insensitive_completion`.
|
||||||
|
|
||||||
|
Default: 1
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
7. Testing *jedi-vim-testing*
|
7. Testing *jedi-vim-testing*
|
||||||
|
|
||||||
|
|||||||
@@ -321,6 +321,10 @@ def get_pos(column=None):
|
|||||||
@_check_jedi_availability(show_error=False)
|
@_check_jedi_availability(show_error=False)
|
||||||
@catch_and_print_exceptions
|
@catch_and_print_exceptions
|
||||||
def completions():
|
def completions():
|
||||||
|
jedi.settings.case_insensitive_completion = \
|
||||||
|
bool(int(vim_eval("get(b:, 'jedi_case_insensitive_completion', "
|
||||||
|
"g:jedi#case_insensitive_completion)")))
|
||||||
|
|
||||||
row, column = vim.current.window.cursor
|
row, column = vim.current.window.cursor
|
||||||
# Clear call signatures in the buffer so they aren't seen by the completer.
|
# Clear call signatures in the buffer so they aren't seen by the completer.
|
||||||
# Call signatures in the command line can stay.
|
# Call signatures in the command line can stay.
|
||||||
|
|||||||
Reference in New Issue
Block a user