aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorJoão Távora2023-12-26 00:31:29 +0000
committerJoão Távora2023-12-26 02:41:28 +0000
commita6ef458e3831001b0acad57cf8fa75b77a4aff3f (patch)
tree40447f2371e35e9ced7be53c047277563d5c0c2c /java
parent2d15389554432277227af0567cd7da8b21d5930d (diff)
downloademacs-a6ef458e3831001b0acad57cf8fa75b77a4aff3f.tar.gz
emacs-a6ef458e3831001b0acad57cf8fa75b77a4aff3f.zip
Eglot: partial fix for middle-of-symbol completions
* lisp/progmodes/eglot.el (eglot-completion-at-point): Fix completion reversion in :exit-function. In a rust-ts-mode buffer such as this main.rs file fn main() { let v: usize = 1; v.c<cursor-here>1234.1234567890 } the server wants to edit the line to read, after C-M-i and selecting "count_ones" v.count_ones<cursor-here>.1234567890 But it couldn't apply the edit to the correct initial state because that state wasn't correctly restored. This commit fixes that. However, if the initial state is v.count_on1234.1234567890 then completion still fails, because the 'try-completion' call in eglot-completion-at-point will just return complete to "count_ones" and Emacs doesn't consider this a completion "exit", so it'll completely ignore the exit function. I think 'try-completion' (and 'test-completion') simply can't be used here (for one, they obey styles, and styles are off-limits in LSP), but I'll leave that for another commit. Github-reference: https://github.com/joaotavora/eglot/issues/1339
Diffstat (limited to 'java')
0 files changed, 0 insertions, 0 deletions