fsharp / emacs-fsharp-mode

F# Emacs mode
Apache License 2.0
205 stars 62 forks source link

Support project file modifications via LSP #318

Open baronfel opened 1 year ago

baronfel commented 1 year ago

Description

FSAC provides LSP commands for project file modifications that prevent client applications from having to learn the details of this format. It would be nice to have integration for:

The moveFileUp/moveFileDown/addFile/removeFile commands all use the following structure:

type DotnetFileRequest =
  { FsProj: string // absolute path to the project file (not a file:// uri)
    FileVirtualPath: string // relative path (from the parent directory of the FsProj above) specifying the file to act on
  } 

The addFileAbove/addFileBelow commands use the following structure:

type DotnetFile2Request =
  { FsProj: string // absolute path to the project file (not a file:// uri)
    FileVirtualPath: string // relative path (from the parent directory of the FsProj above) specifying the file the new file will be added above/below
    NewFile: string // relative path (from the FileVirtualPath above) specifying the new file to create
  }
amcguier commented 10 months ago

I took a stab at this that works pretty well for me (I've been running it in a private fork for a while). There are some design choices that I'd like to get consensus around, and I probably need to beef up the testing before really issuing it as a PR

333