You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 7, 2020. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+19Lines changed: 19 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,6 +52,9 @@ we talk to clients.__
52
52
-[Documentation](#documentation)
53
53
-[Architecture](#architecture)
54
54
-[Troubleshooting](#troubleshooting)
55
+
-[Emacs](#emacs)
56
+
-[Parse errors, file state going out of sync](#parse-errors-file-state-going-out-of-sync)
57
+
-[`emacs-direnv` loads environment too late](#emacs-direnv-loads-environment-too-late)
55
58
-[DYLD on macOS](#dyld-on-macos)
56
59
-[macOS: Got error while installing GHC 8.6.1 or 8.6.2 - dyld: Library not loaded: /usr/local/opt/gmp/lib/libgmp.10.dylib](#macos-got-error-while-installing-ghc-861-or-862---dyld-library-not-loaded-usrlocaloptgmpliblibgmp10dylib)
57
60
-[macOS: Got error while processing diagnostics: unable to load package `integer-gmp-1.0.2.0`](#macos-got-error-while-processing-diagnostics-unable-to-load-package-integer-gmp-1020)
@@ -559,6 +562,22 @@ Have a look at
559
562
560
563
## Troubleshooting
561
564
565
+
### Emacs
566
+
567
+
#### Parse errors, file state going out of sync
568
+
With the `lsp-mode` client for Emacs, it seems that the document can very easily get out of sync between, which leads to parse errors being displayed. To fix this, enable full document synchronization with
569
+
570
+
```elisp
571
+
(setq lsp-document-sync-method 'full)
572
+
```
573
+
574
+
#### [`emacs-direnv`](https://github.com/wbolster/emacs-direnv) loads environment too late
575
+
`emacs-direnv` sometimes loads the environment too late, meaning `lsp-mode` won't be able to find correct GHC/cabal versions. To fix this, add a direnv update hook *after* adding the lsp hook for `haskell-mode` (meaning the direnv hook is executed first, because hooks are LIFO):
If you hit a problem that looks like ```can't load .so/.DLL for: libiconv.dylib (dlopen(libiconv.dylib, 5): image not found)```, it means that libraries cannot be found in the library path. We can hint where to look for them and append more paths to `DYLD_LIBRARY_PATH`.
0 commit comments