aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorczwinzscher <40801720+czwinzscher@users.noreply.github.com>2019-11-17 20:07:09 +0100
committerAshkan Kiani <ashkan.k.kiani@gmail.com>2019-11-17 11:07:09 -0800
commitee8a05fb36d6ce88de4455b9deb53c7ab775bdbd (patch)
tree6e964634e09d5e3d1797d7d8c236ebaacad7ddcc
parent[docgen] Update README.md (diff)
downloadnvim-lspconfig-ee8a05fb36d6ce88de4455b9deb53c7ab775bdbd.tar
nvim-lspconfig-ee8a05fb36d6ce88de4455b9deb53c7ab775bdbd.tar.gz
nvim-lspconfig-ee8a05fb36d6ce88de4455b9deb53c7ab775bdbd.tar.bz2
nvim-lspconfig-ee8a05fb36d6ce88de4455b9deb53c7ab775bdbd.tar.lz
nvim-lspconfig-ee8a05fb36d6ce88de4455b9deb53c7ab775bdbd.tar.xz
nvim-lspconfig-ee8a05fb36d6ce88de4455b9deb53c7ab775bdbd.tar.zst
nvim-lspconfig-ee8a05fb36d6ce88de4455b9deb53c7ab775bdbd.zip
Add support for haskell-ide-engine (#21)
-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