From ee8a05fb36d6ce88de4455b9deb53c7ab775bdbd Mon Sep 17 00:00:00 2001 From: czwinzscher <40801720+czwinzscher@users.noreply.github.com> Date: Sun, 17 Nov 2019 20:07:09 +0100 Subject: Add support for haskell-ide-engine (#21) --- lua/nvim_lsp/hie.lua | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 lua/nvim_lsp/hie.lua (limited to 'lua/nvim_lsp') 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 -- cgit v1.2.3-70-g09d2