nix-community / nix-doom-emacs

doom-emacs packaged for Nix [maintainers=@thiagokokada]
MIT License
218 stars 43 forks source link

Using plists #344

Open rafaelcgs10 opened 1 year ago

rafaelcgs10 commented 1 year ago

If one wants to use plists to improve performance, then these steps are necessary.

The steps 2 and 4 could be achieved by running LSP_USE_PLISTS=true doom sync again (source).

I have the LSP_USE_PLISTS variable in my environment (used home.sessionVariables to set it), but I think this variable should be present during the doom sync when running home-manager switch, which I don't believe is the case because this environment is something separated (is it?).

The problem is I have lsp mode complaining that it can't understand the messages from the server. Messages sample:

Error processing message (wrong-type-argument hash-table-p (:jsonrpc "2.0" :method "language/progressReport" :params (:id "041d4f5d-2615-47a0-8882-6f7fbf7da54b" :task "Building" :status "0% " :totalWork 1000 :workDone 0 :complete nil))).
Error processing message (wrong-type-argument hash-table-p (:jsonrpc "2.0" :method "language/progressReport" :params (:id "041d4f5d-2615-47a0-8882-6f7fbf7da54b" :task "Building" :status "100% " :totalWork 1000 :workDone 1000 :complete t))). [2 times]

My current guess is that I didn't get steps 2 and 4 right.

My question is: how can I rebuild the packages with LSP_USE_PLISTS variable as requests by the instructions?

ckiee commented 1 year ago

which I don't believe is the case because this environment is something separated (is it?).

Yes, all nix builds run in a sandbox. Can read some of the wiki/nix.dev/manual on that. You probably want to patch your own version of nix-straight.el (also under this org) and stick that envvar in one of the build phases. Good luck; maybe check out #doom-emacs:nixos.org.

PR possibly okay, but it'd be ugly to generalize without #353 done. Do let me know if you get it though, fast LSP sounds nice.. ^^