From 0ccd248ef958a8d27e752952a880d004078b4ae9 Mon Sep 17 00:00:00 2001 From: Ashkan Kiani Date: Thu, 14 Nov 2019 17:14:53 -0800 Subject: Add ElmLS (#9) - Initial add of elmLS support - Removes unnecessary vim.schedule_wrap fn calls in elmls & clangd impls - Add automatic installation for elmls and update docs. - Sort server output in the README. - Add commands for elmls for buffer and globally. - [bugfix] Skeleton could've tried to attach even if root_dir was nil TODO: check for updates and warn the user if there are updates when an elm server is started. Co-authored-by: Seth Messer --- lua/nvim_lsp/util.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lua/nvim_lsp/util.lua') diff --git a/lua/nvim_lsp/util.lua b/lua/nvim_lsp/util.lua index 190869e6..2b13d227 100644 --- a/lua/nvim_lsp/util.lua +++ b/lua/nvim_lsp/util.lua @@ -2,6 +2,7 @@ local validate = vim.validate local api = vim.api local lsp = vim.lsp local uv = vim.loop +local fn = vim.fn local M = {} @@ -89,6 +90,15 @@ function M.create_module_commands(module_name, commands) end end +function M.need_bins(...) + for i = 1, select("#", ...) do + if 0 == fn.executable((select(i, ...))) then + return false + end + end + return true +end + -- Some path utilities M.path = (function() local function exists(filename) -- cgit v1.2.3-70-g09d2