This PR is a (very) rough draft of some FsProj and eglot enhancements I've been playing with.
I'd love to get some general feedback on the approach and see what folks appetite would be for bringing something like this in.
Pain points this solves for my workflow
Currently, when starting eglot in a multi-project workspace with a sln eglot uses the project integration and ends up finding the fsproj first, even if there's a sln file further up the directory tree, which means I end up running multiple copies of FsAutoComplete when editing client/server projects
When editing an fsproj file with the dotnet command line tools or manually, eglot/FsAutoComplete don't pickup the change, requiring me to kill/restart eglot to get completions on new files
Similar to '2.' when reordering files in an fsproj file during development I have to kill/restart eglot/FsAutoComplete for the changes to be detected
General layout of my approach, and some reasoning.
The solution file issue is straightforward, I've extended the project/sln search to first run a search for a sln file, and then to fallback to either an fsproj file if a sln file cannot be found see here
For adding/removing fs files is accomplished via pretty straightforward modifications to eglot-fsharp itself here. Renaming is similar, although in that case I save the buffer first, and then open the alternative file once the operation is completed.
The changing of the file order is a bit more complicated. I opted to create a new fsproj-mode because it simplifies the implementation of tabulated-list-mode, however this mode isn't intended to be accessed from an fsproj file, but rather launched from an fs file with eglot running, because otherwise getting the running eglot session (or joining one) seems tricky to manage. You can open the buffer for with the command fsproj-list-files and then use u/d to move/change the file order.
This PR is a (very) rough draft of some FsProj and eglot enhancements I've been playing with.
I'd love to get some general feedback on the approach and see what folks appetite would be for bringing something like this in.
Pain points this solves for my workflow
sln
eglot uses the project integration and ends up finding thefsproj
first, even if there's asln
file further up the directory tree, which means I end up running multiple copies ofFsAutoComplete
when editing client/server projectsfsproj
file during development I have to kill/restart eglot/FsAutoComplete for the changes to be detectedGeneral layout of my approach, and some reasoning.
The solution file issue is straightforward, I've extended the project/sln search to first run a search for a
sln
file, and then to fallback to either anfsproj
file if asln
file cannot be found see hereFor adding/removing
fs
files is accomplished via pretty straightforward modifications toeglot-fsharp
itself here. Renaming is similar, although in that case I save the buffer first, and then open the alternative file once the operation is completed.The changing of the file order is a bit more complicated. I opted to create a new
fsproj-mode
because it simplifies the implementation oftabulated-list-mode
, however this mode isn't intended to be accessed from anfsproj
file, but rather launched from anfs
file with eglot running, because otherwise getting the running eglot session (or joining one) seems tricky to manage. You can open the buffer for with the commandfsproj-list-files
and then use u/d to move/change the file order.