Open mattgallagher92 opened 1 year ago
Hi @mattgallagher92 By any chance, did you manage to solve this issue?
Hey @arialdomartini
Unfortunately not. However, I plan to make another attempt at setting Emacs up as a capable F# IDE in the near future, and will post here if I get it working. Might be a few months though :sweat_smile:
I managed to make it work today, with the precious help of @protesilaos, both on Windows and Linux. Feel free to contact me in private arialdo.martini@gmail.com, I'll be happy to help. Eventually I guess I will share a post with the steps I followed.
Thanks!
At the moment, I'm using Doom Emacs with very little customisation for a few utilities, including Magit. However, I'm intending to replicate the features that I like in a custom Emacs configuration, and use that instead of Doom Emacs. The setup created in System Crafters' Emacs from Scratch YouTube playlist seems like it might be good.
I'll reach out once I've got that working, as I expect that will be a better starting point (possibly only because I'll better understand how to configure Emacs by that point :sweat_smile:)
@mattgallagher92
I'm on doom-emacs too and I just tried to switch over to Eglot and I wasn't able to get it working. lsp-mode
just works out of the box for me though.
I made a very simple program to test it out:
open Suave
open Suave.Successful
printfn "Hello from F#"
let html = "Hello"
startWebServer defaultConfig (OK html)
The language server is constantly throwing errors:
[server-reply] (id:107) ERROR Sun Jul 30 14:25:39 2023:
(:jsonrpc "2.0" :id 107 :error
(:code -32603 :message "No typecheck results for /Users/davidbruce/Git/projects/fsharp/MyFSharpApp/Program.fs"))
With lsp-mode
it prompted me to download fsac
, then prompted to me to set the root of the project and then I was immediately getting auto complete.
Also you can change the autocomplete delay of lsp-mode in config.el
with the following:
(setq lsp-idle-delay 0.100)
Description
I'm trying to set up Emacs to use it as my full-time F# editor. I'm having trouble setting up eglot to enable basic IDE features like go to definition and find references.
I'm very much an Emacs noob, so it's likely that the problem is with what I'm doing.
Repro steps
Use vanilla Emacs and add the following to your init file:
Scaffold a new SAFE app in ./safev4:
Open ./safev4/Build.fs in Emacs
Run
M-x eglot
Highlight the word
run
on line 61.Run
M-x xref-find-definitions
Expected behavior
Emacs opens the file ./safev4/Helpers.fs, with the cursor on the
r
oflet run...
on line 86.Actual behavior
Emacs prompts with "Visit tags table (default TAGS): [path to repo]". When I hit
RET
, Emacs shows the message "[path to repo]/TAGS" does not exist.Known workarounds
None.
Related information