Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support project file modifications via LSP #318

Open
baronfel opened this issue Aug 23, 2022 · 1 comment
Open

Support project file modifications via LSP #318

baronfel opened this issue Aug 23, 2022 · 1 comment

Comments

@baronfel
Copy link

baronfel commented Aug 23, 2022

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:

  • fsproj/moveFileUp
  • fsproj/moveFileDown
  • fsproj/addFileAbove
  • fsproj/addFileBelow
  • fsproj/addFile
  • fsproj/removeFile

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
Copy link
Contributor

amcguier commented Sep 6, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants