mirror of
https://github.com/mfussenegger/nvim-jdtls
synced 2024-09-16 14:34:13 +02:00
Revert find_root change to link to fs.root
The jdtls variant returned absolute path to the working directory for unnamed buffers. The fs.root version currently doesn't (But will with https://github.com/neovim/neovim/pull/28964) This reverts the change to use fs.root for now. Closes https://github.com/mfussenegger/nvim-jdtls/issues/656
This commit is contained in:
parent
29255ea26d
commit
10691312d5
1 changed files with 1 additions and 10 deletions
|
@ -74,7 +74,7 @@ local function attach_to_active_buf(bufnr, client_name)
|
|||
return nil
|
||||
end
|
||||
|
||||
local function find_root(source, markers)
|
||||
function M.find_root(markers, source)
|
||||
source = source or api.nvim_buf_get_name(api.nvim_get_current_buf())
|
||||
local dirname = vim.fn.fnamemodify(source, ':p:h')
|
||||
local getparent = function(p)
|
||||
|
@ -91,15 +91,6 @@ local function find_root(source, markers)
|
|||
end
|
||||
|
||||
|
||||
function M.find_root(markers, bufname)
|
||||
if vim.fs.root then
|
||||
return vim.fs.root(bufname or 0, markers)
|
||||
else
|
||||
return find_root(bufname, markers)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
M.extendedClientCapabilities = {
|
||||
classFileContentsSupport = true,
|
||||
generateToStringPromptSupport = true,
|
||||
|
|
Loading…
Reference in a new issue