aboutsummaryrefslogtreecommitdiffstats
path: root/lua/nvim-lsp-installer/core/path.lua
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2022-07-06 19:41:43 +0200
committerWilliam Boman <william@redwill.se>2022-07-07 00:39:59 +0200
commit5f634e0c37e723fc0c33e06b4fd5c2180178db40 (patch)
treefa4f09363adefa8259e23e4d1ea036db628b1243 /lua/nvim-lsp-installer/core/path.lua
parentfeat(health): use stderr for java version, also check for JAVA_HOME (#765) (diff)
downloadmason-5f634e0c37e723fc0c33e06b4fd5c2180178db40.tar
mason-5f634e0c37e723fc0c33e06b4fd5c2180178db40.tar.gz
mason-5f634e0c37e723fc0c33e06b4fd5c2180178db40.tar.bz2
mason-5f634e0c37e723fc0c33e06b4fd5c2180178db40.tar.lz
mason-5f634e0c37e723fc0c33e06b4fd5c2180178db40.tar.xz
mason-5f634e0c37e723fc0c33e06b4fd5c2180178db40.tar.zst
mason-5f634e0c37e723fc0c33e06b4fd5c2180178db40.zip
mason.nvim
Diffstat (limited to 'lua/nvim-lsp-installer/core/path.lua')
-rw-r--r--lua/nvim-lsp-installer/core/path.lua36
1 files changed, 0 insertions, 36 deletions
diff --git a/lua/nvim-lsp-installer/core/path.lua b/lua/nvim-lsp-installer/core/path.lua
deleted file mode 100644
index 2f0fd84b..00000000
--- a/lua/nvim-lsp-installer/core/path.lua
+++ /dev/null
@@ -1,36 +0,0 @@
-local uv = vim.loop
-
-local sep = (function()
- ---@diagnostic disable-next-line: undefined-global
- if jit then
- ---@diagnostic disable-next-line: undefined-global
- local os = string.lower(jit.os)
- if os == "linux" or os == "osx" or os == "bsd" then
- return "/"
- else
- return "\\"
- end
- else
- return package.config:sub(1, 1)
- end
-end)()
-
-local M = {}
-
-function M.cwd()
- return uv.fs_realpath "."
-end
-
----@param path_components string[]
----@return string
-function M.concat(path_components)
- return table.concat(path_components, sep)
-end
-
----@path root_path string
----@path path string
-function M.is_subdirectory(root_path, path)
- return root_path == path or path:sub(1, #root_path + 1) == root_path .. sep
-end
-
-return M