Skip to content

Eglot not working #320

@mattgallagher92

Description

@mattgallagher92

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

  1. Use vanilla Emacs and add the following to your init file:

    (require 'package)
    
    (add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/"))
    (add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/"))
    
    (setq package-enable-at-startup nil)
    (package-initialize)
    
    (unless (package-installed-p 'use-package)
      (package-refresh-contents)
      (package-install 'use-package))
    
    (eval-when-compile
      (require 'use-package))
    
    (use-package fsharp-mode
      :defer t
      :ensure t)
    
    (use-package eglot-fsharp
      :ensure t)
  2. Scaffold a new SAFE app in ./safev4:

    dotnet new -i SAFE.Template::4.0.0
    dotnet new safe -o safev4
  3. Open ./safev4/Build.fs in Emacs

  4. Run M-x eglot

  5. Highlight the word run on line 61.

  6. Run M-x xref-find-definitions

Expected behavior

Emacs opens the file ./safev4/Helpers.fs, with the cursor on the r of let 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

  • Ubuntu 22.04
  • GNU Emacs 28.2 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0) of 2022-09-16
  • .NET SDK 6.0.109

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions