aboutsummaryrefslogtreecommitdiffstats
path: root/lua/nvim_lsp/util.lua
diff options
context:
space:
mode:
authorAshkan Kiani <ashkan.k.kiani@gmail.com>2019-11-14 17:14:53 -0800
committerGitHub <noreply@github.com>2019-11-14 17:14:53 -0800
commit0ccd248ef958a8d27e752952a880d004078b4ae9 (patch)
tree67f4afbe9bf69322c0481f00aaff171214487c05 /lua/nvim_lsp/util.lua
parentAdd github actions for docgen (#7) (diff)
downloadnvim-lspconfig-0ccd248ef958a8d27e752952a880d004078b4ae9.tar
nvim-lspconfig-0ccd248ef958a8d27e752952a880d004078b4ae9.tar.gz
nvim-lspconfig-0ccd248ef958a8d27e752952a880d004078b4ae9.tar.bz2
nvim-lspconfig-0ccd248ef958a8d27e752952a880d004078b4ae9.tar.lz
nvim-lspconfig-0ccd248ef958a8d27e752952a880d004078b4ae9.tar.xz
nvim-lspconfig-0ccd248ef958a8d27e752952a880d004078b4ae9.tar.zst
nvim-lspconfig-0ccd248ef958a8d27e752952a880d004078b4ae9.zip
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 <seth.messer@gmail.com>
Diffstat (limited to 'lua/nvim_lsp/util.lua')
-rw-r--r--lua/nvim_lsp/util.lua10
1 files changed, 10 insertions, 0 deletions
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)