diff options
| author | kylo252 <59826753+kylo252@users.noreply.github.com> | 2021-08-10 17:16:02 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-10 11:16:02 -0400 |
| commit | 9dca8d65604d5fb76528bcbe09d0a3664959314d (patch) | |
| tree | ec603ba1d5d008b6563cd8ea5584b11be2a6ff40 /lua/lspconfig/dhall_lsp_server.lua | |
| parent | [docgen] Update CONFIG.md (diff) | |
| download | nvim-lspconfig-9dca8d65604d5fb76528bcbe09d0a3664959314d.tar nvim-lspconfig-9dca8d65604d5fb76528bcbe09d0a3664959314d.tar.gz nvim-lspconfig-9dca8d65604d5fb76528bcbe09d0a3664959314d.tar.bz2 nvim-lspconfig-9dca8d65604d5fb76528bcbe09d0a3664959314d.tar.lz nvim-lspconfig-9dca8d65604d5fb76528bcbe09d0a3664959314d.tar.xz nvim-lspconfig-9dca8d65604d5fb76528bcbe09d0a3664959314d.tar.zst nvim-lspconfig-9dca8d65604d5fb76528bcbe09d0a3664959314d.zip | |
fix: don't pass the cwd to root_pattern (#1130)
Diffstat (limited to 'lua/lspconfig/dhall_lsp_server.lua')
| -rw-r--r-- | lua/lspconfig/dhall_lsp_server.lua | 6 |
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]], }, }, }, |
