-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle jedi-vim call signatures when looking for colon in prev line #41
Conversation
@hynek |
Could you elaborate a bit more what this does? Does it use jedi for certain tasks if it’s present? |
jedi-vim provides call signatures, via inserting text into the buffer and then uses concealing to hide parts of it. I will refactor this to be used in more places, e.g. to also fix #32. |
endif | ||
let colon_pos = getpos(".")[2] | ||
" Check that everything behind is to be ignored, including jedi-vim's | ||
" call signatures). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here’s an extra paren. maybe you could add a sentence explaining what those are?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. Will do.
Re-based and squashed. |
I've tried to set it to true by default, but it is still buggy.
- Handle jedi-vim call signatures when looking for colon and function def in previous line. This adds `jedi\S` to s:skip_special_chars and improves the algorithm to find the colon in the previous line in `s:indent_like_previous_line`. - Add `s:match_expr_on_line` and use it for `nothing_after_opening_paren`. - Handle comments after opening paren (#32). NOTE: This handles older Vim versions, where `synconcealed` behaves different (returns an empty list for non-concealed) and `getcurpos` is not available (Vim 7.3.429 (used on Travis)). Fixes: #32
Handle jedi-vim call signatures when looking for colon in prev line
This adds
jedi\S
to s:skip_special_chars and improves the algorithm tofind the colon in the previous line in
s:indent_like_previous_line
.There should be a test for this probably?!
jedi-vim's syntax setup for the (partly concealed) call signature is at https://github.com/davidhalter/jedi-vim/blob/master/after/syntax/python.vim.