diff options
| author | Michael Lan <44309097+mizlan@users.noreply.github.com> | 2022-12-29 21:30:13 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-30 13:30:13 +0800 |
| commit | 086f2afe93c467cfd10dfecd2bb26205060d0d65 (patch) | |
| tree | e91fdae50ebbcc389cf44aad74dd6f1af8efdb79 /lua | |
| parent | docs: update server_configurations.md (diff) | |
| download | nvim-lspconfig-086f2afe93c467cfd10dfecd2bb26205060d0d65.tar nvim-lspconfig-086f2afe93c467cfd10dfecd2bb26205060d0d65.tar.gz nvim-lspconfig-086f2afe93c467cfd10dfecd2bb26205060d0d65.tar.bz2 nvim-lspconfig-086f2afe93c467cfd10dfecd2bb26205060d0d65.tar.lz nvim-lspconfig-086f2afe93c467cfd10dfecd2bb26205060d0d65.tar.xz nvim-lspconfig-086f2afe93c467cfd10dfecd2bb26205060d0d65.tar.zst nvim-lspconfig-086f2afe93c467cfd10dfecd2bb26205060d0d65.zip | |
feat: add cabal support to hls (#2370)
* add note for when to modify filetypes field
* specify cabalfmt as the formatter for cabal files
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/lspconfig/server_configurations/hls.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lua/lspconfig/server_configurations/hls.lua b/lua/lspconfig/server_configurations/hls.lua index 54b45e98..e0d0e702 100644 --- a/lua/lspconfig/server_configurations/hls.lua +++ b/lua/lspconfig/server_configurations/hls.lua @@ -14,6 +14,7 @@ return { settings = { haskell = { formattingProvider = 'ormolu', + cabalFormattingProvider = 'cabalfmt', }, }, lspinfo = function(cfg) @@ -39,6 +40,14 @@ return { https://github.com/haskell/haskell-language-server Haskell Language Server + +If you are using HLS 1.9.0.0, enable the language server to launch on Cabal files as well: + +```lua +require('lspconfig')['hls'].setup{ + filetypes = { 'haskell', 'lhaskell', 'cabal' }, +} +``` ]], default_config = { |
