diff --git a/lua/lspconfig/util.lua b/lua/lspconfig/util.lua index dd84f4f8e9..7de9e8b856 100644 --- a/lua/lspconfig/util.lua +++ b/lua/lspconfig/util.lua @@ -107,16 +107,6 @@ M.path = (function() end end - --- @param filename string - --- @return boolean - local function is_absolute(filename) - if iswin then - return filename:match '^%a:' or filename:match '^\\\\' - else - return filename:match '^/' - end - end - local function path_join(...) return table.concat(M.tbl_flatten { ... }, '/') end @@ -175,7 +165,6 @@ M.path = (function() local path_separator = iswin and ';' or ':' return { - is_absolute = is_absolute, join = path_join, traverse_parents = traverse_parents, iterate_parents = iterate_parents, diff --git a/test/lspconfig_spec.lua b/test/lspconfig_spec.lua index a34dc40edb..5ce98ea1a5 100644 --- a/test/lspconfig_spec.lua +++ b/test/lspconfig_spec.lua @@ -10,19 +10,6 @@ describe('lspconfig', function() describe('util', function() describe('path', function() - describe('is_absolute', function() - it('is absolute', function() - local lspconfig = require 'lspconfig' - eq(true, lspconfig.util.path.is_absolute '/foo/bar' ~= nil) - end) - - it('is not absolute', function() - local lspconfig = require 'lspconfig' - assert.is_nil(lspconfig.util.path.is_absolute 'foo/bar') - assert.is_nil(lspconfig.util.path.is_absolute '../foo/bar') - end) - end) - describe('join', function() it('', function() local lspconfig = require 'lspconfig'