ziglang / zig-mode

Zig mode for Emacs
GNU General Public License v3.0
163 stars 54 forks source link

lsp-mode is turned off for buffer on buffer save #49

Closed GarbageHamburger closed 1 year ago

GarbageHamburger commented 3 years ago

When I have zig-mode enabled for a buffer and save that buffer while lsp-mode is enabled, LSP seems to turn off (the icon disappears from the modeline, and completions no longer work).

Distribution: Debian GNU/Linux bullseye/testing Emacs version: 27.1 Doom Emacs version: hlissner/doom-emacs@f7293fb6 zig-mode version: 20201022.955

joachimschmidt557 commented 3 years ago

I think this is due to the fact that zig-mode runs revert-buffer on every save (due to the formatting code). Leaving our manual reformatting code behind and moving towards https://github.com/ziglang/zig-mode/issues/39 could solve this problem.