diff options
| author | Hirokazu Hata <h.hata.ai.t@gmail.com> | 2020-02-23 09:30:36 +0900 |
|---|---|---|
| committer | Hirokazu Hata <h.hata.ai.t@gmail.com> | 2020-02-23 09:30:36 +0900 |
| commit | dfbe07edfc9f3b6001de7a2b4a78898ad7c2d84a (patch) | |
| tree | 5b4c28e1cbb70d2b809158893565945ecd749f64 /lua | |
| parent | [docgen] Update README.md (diff) | |
| download | nvim-lspconfig-dfbe07edfc9f3b6001de7a2b4a78898ad7c2d84a.tar nvim-lspconfig-dfbe07edfc9f3b6001de7a2b4a78898ad7c2d84a.tar.gz nvim-lspconfig-dfbe07edfc9f3b6001de7a2b4a78898ad7c2d84a.tar.bz2 nvim-lspconfig-dfbe07edfc9f3b6001de7a2b4a78898ad7c2d84a.tar.lz nvim-lspconfig-dfbe07edfc9f3b6001de7a2b4a78898ad7c2d84a.tar.xz nvim-lspconfig-dfbe07edfc9f3b6001de7a2b4a78898ad7c2d84a.tar.zst nvim-lspconfig-dfbe07edfc9f3b6001de7a2b4a78898ad7c2d84a.zip | |
dartls: remove calling error in detecting cmd
ref: #140
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/nvim_lsp/dartls.lua | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/lua/nvim_lsp/dartls.lua b/lua/nvim_lsp/dartls.lua index 1f059bc5..5093294d 100644 --- a/lua/nvim_lsp/dartls.lua +++ b/lua/nvim_lsp/dartls.lua @@ -10,12 +10,10 @@ local find_dart_sdk_root_path = function() elseif vim.fn["executable"]("flutter") == 1 then local flutter_path = vim.fn["resolve"](vim.fn["exepath"]("flutter")) local flutter_bin = vim.fn["fnamemodify"](flutter_path, ":h") - local dart_sdk_root_path = flutter_bin.."/cache/dart-sdk/bin/dart" - if vim.fn["executable"](dart_sdk_root_path) == 1 then - return dart_sdk_root_path - end + return flutter_bin.."/cache/dart-sdk/bin/dart" + else + return '' end - error("[LSP] Could not find Dart SDK root path") end local analysis_server_snapshot_path = function() @@ -26,11 +24,7 @@ local analysis_server_snapshot_path = function() snapshot = snapshot:gsub("/", "\\") end - if vim.fn["filereadable"](snapshot) == 1 then - return snapshot - else - error("[LSP] Could not find analysis server snapshot") - end + return snapshot end configs[server_name] = { |
