veridian icon indicating copy to clipboard operation
veridian copied to clipboard

Neovim lspconfig/util.is_absolute() was deprecated

Open ralex2304 opened this issue 1 week ago • 0 comments

Neovim lspconfig/util.is_absolute() was deprecated. So Neovim config in "usage" section of README doesn't work now.

lspconfig developers propose vim.fs.abspath(). However, it's still in nightly release of Neovim

Function looks like this:

local function is_absolute(filename)
  if vim.loop.os_uname().version:match 'Windows' then
    return filename:match '^%a:' or filename:match '^\\\\'
  else
    return filename:match '^/'
  end
end

IMHO, the best solution for now, is to add this function to config explicitly, because of inability to use vim.fs.abspath()

lspconfig/util.path.join() and lspconfig/util.path.dirname() are also deprecated. But there are fallbacks for them, so they work fine.

ralex2304 avatar Feb 15 '25 19:02 ralex2304