Closed Kenneth-Mata closed 8 months ago
Tried with a different language, it also happens with gopls
Screencast_20240111_184822.webm
The lsp-bridge buffer
can you send example code to me?
#include <stdio.h>
/* ANSI C doesn't require int to be the return of the main function*/
main() {
float fahr, celsius, upper, lower, step;
step = 20;
upper = 500;
lower = 0;
fahr = lower;
printf("%s", "Fahrenheit to Celsius Table\n");
while (fahr <= upper) {
celsius = (5.0 / 9.0) * (fahr - 32);
printf("%6.2d %9.1f\n" ,fahr, celsius);
fahr = fahr + step;
}
}
This is from the C Programming Book 2nd, clangd will highlight that %6.2d should be %6.2f, but freeze after selecting the fix
I used the above code to test locally. The code action ran normally and there was no freezing problem. Please use emacs -Q to load only lsp-bridge for testing to eliminate the influence of other plug-ins.
I'm using --init-directory for the tests
(add-to-list 'load-path "/home/kenneth/.config/emm/lsp-bridge")
(require 'yasnippet)
(yas-global-mode 1)
(require 'lsp-bridge)
(global-lsp-bridge-mode)
(setopt lsp-bridge-enable-log t)
(setq lsp-bridge-python-command "/home/kenneth/.conda/envs/py_env/bin/python")
i tried with this configuration, directly download the lsp-bridge repo and still got the freezing behavior
I'll try to replicate this behavior on a VM and/or my windows machine
I can also confirm this behavior. It happens only in graphical mode, not in -nw
mode. It seems it has to do more with showing/hiding the action popup than with applying the action itself, as when I C-g
to hide the popup, the freeze still occurs. This happens in Wayland and in XOrg. I'm using pgtk emacs
I can also confirm this behavior. It happens only in graphical mode, not in
-nw
mode. It seems it has to do more with showing/hiding the action popup than with applying the action itself, as when IC-g
to hide the popup, the freeze still occurs. This happens in Wayland and in XOrg. I'm using pgtk emacs我也可以确认这种行为。它仅发生在图形模式下,而不发生在-nw
模式下。看起来它必须在显示/隐藏操作弹出窗口方面做更多的事情,而不是应用操作本身,因为当我Cg
隐藏弹出窗口时,冻结仍然发生。这种情况发生在 Wayland 和 XOrg 中。我正在使用 pgtk emacs
(setq pgtk-wait-for-event-timeout 0)
Will fix your problem?
I can also confirm this behavior. It happens only in graphical mode, not in
-nw
mode. It seems it has to do more with showing/hiding the action popup than with applying the action itself, as when IC-g
to hide the popup, the freeze still occurs. This happens in Wayland and in XOrg. I'm using pgtk emacs我也可以确认这种行为。它仅发生在图形模式下,而不发生在-nw
模式下。看起来它必须在显示/隐藏操作弹出窗口方面做更多的事情,而不是应用操作本身,因为当我Cg
隐藏弹出窗口时,冻结仍然发生。这种情况发生在 Wayland 和 XOrg 中。我正在使用 pgtk emacs(setq pgtk-wait-for-event-timeout 0)
Will fix your problem?
@kuba-orlik Can you help to test this solution? Thanks
I've just tested it and unfortunately it does not solve this problem
It's looks like pgtk branch bug, I haven't use pgtk, can't help you.
Using the
lsp-bridge-code-action
while havinglsp-bridge-code-action-enable-popup-menu
enabled will cause emacs to freeze, it will not respond to keyboard input (but mouse input, at least on wayland) will still workI tried using this configuration
Screencast_20240111_181830-1.webm
This is the lsp-bridge buffer after the code action
It was previously mentioned here
I'm not very knowledgeable in either elisp or python, but i think this is worth mentioning, or disabling the popup by default / removing the option if it doesn't work properly.