aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua')
-rw-r--r--lua/nvim_lsp.lua1
-rw-r--r--lua/nvim_lsp/hie.lua40
2 files changed, 41 insertions, 0 deletions
diff --git a/lua/nvim_lsp.lua b/lua/nvim_lsp.lua
index c5eb0d01..74d547fa 100644
--- a/lua/nvim_lsp.lua
+++ b/lua/nvim_lsp.lua
@@ -6,6 +6,7 @@ require 'nvim_lsp/clangd'
require 'nvim_lsp/elmls'
require 'nvim_lsp/flow'
require 'nvim_lsp/gopls'
+require 'nvim_lsp/hie'
require 'nvim_lsp/pyls'
require 'nvim_lsp/rls'
require 'nvim_lsp/texlab'
diff --git a/lua/nvim_lsp/hie.lua b/lua/nvim_lsp/hie.lua
new file mode 100644
index 00000000..dac2f7c8
--- /dev/null
+++ b/lua/nvim_lsp/hie.lua
@@ -0,0 +1,40 @@
+local skeleton = require 'nvim_lsp/skeleton'
+local util = require 'nvim_lsp/util'
+local lsp = vim.lsp
+
+skeleton.hie = {
+ default_config = {
+ cmd = {"hie-wrapper"};
+ filetypes = {"haskell"};
+ root_dir = util.root_pattern("stack.yaml", "package.yaml", ".git");
+ log_level = lsp.protocol.MessageType.Warning;
+ settings = {};
+ };
+
+ docs = {
+ description = [[
+https://github.com/haskell/haskell-ide-engine
+
+the following init_options are supported (see https://github.com/haskell/haskell-ide-engine#configuration):
+```lua
+init_options = {
+ languageServerHaskell = {
+ hlintOn = bool;
+ maxNumberOfProblems = number;
+ diagnosticsDebounceDuration = number;
+ liquidOn = bool (default false);
+ completionSnippetsOn = bool (default true);
+ formatOnImportOn = bool (default true);
+ formattingProvider = string (default "brittany", alternate "floskell");
+ }
+}
+```
+ ]];
+
+ default_config = {
+ root_dir = [[root_pattern("stack.yaml", "package.yaml", ".git")]];
+ };
+ };
+};
+
+-- vim:et ts=2 sw=2