aboutsummaryrefslogtreecommitdiffstats
path: root/lua/lspconfig/dhall_lsp_server.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/lspconfig/dhall_lsp_server.lua')
-rw-r--r--lua/lspconfig/dhall_lsp_server.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/lua/lspconfig/dhall_lsp_server.lua b/lua/lspconfig/dhall_lsp_server.lua
index 761d2b46..29e952c6 100644
--- a/lua/lspconfig/dhall_lsp_server.lua
+++ b/lua/lspconfig/dhall_lsp_server.lua
@@ -5,7 +5,9 @@ configs.dhall_lsp_server = {
default_config = {
cmd = { 'dhall-lsp-server' },
filetypes = { 'dhall' },
- root_dir = util.root_pattern('.git', vim.fn.getcwd()),
+ root_dir = function(fname)
+ return util.root_pattern '.git'(fname) or util.path.dirname(fname)
+ end,
docs = {
description = [[
https://github.com/dhall-lang/dhall-haskell/tree/master/dhall-lsp-server
@@ -19,7 +21,7 @@ cabal install dhall-lsp-server
prebuilt binaries can be found [here](https://github.com/dhall-lang/dhall-haskell/releases).
]],
default_config = {
- root_dir = [[root_pattern(".git", vim.fn.getcwd())]],
+ root_dir = [[root_pattern(".git") or dirname]],
},
},
},