I have the same question. After reading the docs it looks as if for this to work there should be some way to instruct the Sublime Text LSP implementation (https://lsp.sublimetext.io/language_servers/) to set the haskell.formattingProvider to stylish-haskell. I don't see any way to do this.
In the meantime I have been using the FilterPipes package (https://packagecontrol.io/packages/FilterPipes) to manually run files through stylish-haskell. It works, but it's not perfect. It runs from the Sublime Text installation directory (on my system /Applications/Sublime Text.app/Contents/MacOS), which means it does not read the local .stylish-haskell.yaml config file.
There is a stylish-haskell plugin for Sublime Text 2 (https://github.com/hairyhum/SublimeStylishHaskell); it should be simple to adapt it for Sublime Text 3 (or 4 coming soon I suppose), but integration with LSP would be better.
Update:
I think this is the solution -- add a settings clause to your LSP config for Haskell as follows:
"haskell-language-server": {
"enabled": true,
"command": ["haskell-language-server-wrapper", "--lsp"],
"scopes": ["source.haskell"],
"syntaxes": ["Packages/Haskell/Haskell.sublime-syntax"],
"languageId": "haskell",
"settings": {
"haskell.formattingProvider": "stylish-haskell"
},
},