mirror of
https://github.com/haskell/haskell-language-server.git
synced 2024-11-20 09:59:06 +03:00
7385915c99
* Change return type of getFileContents from Text to Rope - This avoids a few conversions between Rope and Text in the next commit - Note: Syntactic changes to Development.IDE.Plugin.CodeAction around line 2000 are to work around the following stylish-haskell failure: plugins/hls-refactor-plugin/src/Development/IDE/Plugin/CodeAction.hs: <string>:2002:5: error: [GHC-58481] parse error (possibly incorrect indentation or mismatched brackets) * Get virtual files from the Shake VFS in plugins This commit changes plugins to get virtual files from the Shake VFS rather than from the language server's VFS. - Replace `Ide.Types.pluginGetVirtualFile` with `Development.IDE.Core.FileStore.getFileContents` - Replace `Ide.Types.pluginGetVersionedTextDoc` with `Development.IDE.Core.FileStore.getVersionedTextDoc` * Rename `getFileContents` to `getFileModTimeContents` * Add util functions for common cases of Shake VFS file access * Cleanup * Fix warning * Install notification handlers for cabal files The cabal formatters read the file contents from the shake VFS. Thus, we need to make sure there are notification handlers that add the cabal files to the VFS! Formatters have to depend on the `hls-cabal-plugin` to have the necessary notification handlers installed during test time. --------- Co-authored-by: soulomoon <fwy996602672@gmail.com> Co-authored-by: Michael Peyton Jones <me@michaelpj.com> Co-authored-by: Fendor <fendor@posteo.de> Co-authored-by: fendor <fendor@users.noreply.github.com> |
||
---|---|---|
.. | ||
src/Ide/Plugin | ||
test |