theonepath.nvim/after/plugin/hls.lua
theonepath 853e6b7ee5
Added files
Added after/ and lua/ scripts
2023-04-20 14:42:48 +01:00

27 lines
614 B
Lua

local ok, hls = pcall(require, 'hls')
if not ok then
print("hls is not installed.")
return
end
if hls == nil then
return
end
hls.setup {
cmd = { "haskell-language-server-wrapper", '--lsp' },
filetypes = { "haskell", "lhaskell" },
root_dir = function (filepath)
return (
vim.util.root_pattern('hie.yaml', 'stack.yaml', 'cabal.project')(filepath)
or vim.util.root_pattern('*.cabal', 'package.yaml')(filepath)
)
end,
settings = {
haskell = {
formattingProvider = "ormolu"
}
},
single_file_support = true,
}