Skip to content

Conversation

BarrensZeppelin
Copy link
Contributor

When vim.fs.root is given a table of markers, it performs one traversal per entry in the table (until a root is found).
What we actually want is to perform a single traversal that stops when any of the javascript root markers are found.

@justinmk justinmk merged commit 99748c0 into neovim:master Aug 20, 2025
6 checks passed
@goatslacker
Copy link

This seems to be causing an issue when starting up nvim v0.11.0

Here's the error message

Error detected while processing BufReadPost Autocommands for "*":
Error executing lua callback: .../neovim/[VERSION]/share/nvim/runtime/filetype.lua:36: BufReadPost Autocommands for "*"..FileType Autocommands for "*": Vim(append):Error executing lua callback: vim/fs.lua:0: invalid value (table) at
index 2 in table for 'concat'
stack traceback:
        [C]: in function 'concat'
        vim/fs.lua: in function 'joinpath'
        vim/fs.lua: in function <vim/fs.lua:0>
        vim/fs.lua: in function 'find'
        vim/fs.lua: in function 'root'
        .../[USER]/.local/share/nvim/lazy/nvim-lspconfig/lsp/ts_ls.lua:63: in function 'root_dir'
        .../neovim/[VERSION]/share/nvim/runtime/lua/vim/lsp.lua:492: in function 'lsp_enable_callback'
        .../neovim/[VERSION]/share/nvim/runtime/lua/vim/lsp.lua:543: in function <.../neovim/[VERSION]/share/nvim/runtime/lua/vim/lsp.lua:542>
        [C]: in function 'nvim_cmd'
        .../neovim/[VERSION]/share/nvim/runtime/filetype.lua:36: in function <.../neovim/[VERSION]/share/nvim/runtime/filetype.lua:35>
        [C]: in function 'pcall'
        vim/shared.lua: in function <vim/shared.lua:0>
        [C]: in function '_with'
        .../neovim/[VERSION]/share/nvim/runtime/filetype.lua:35: in function <.../neovim/[VERSION]/share/nvim/runtime/filetype.lua:35>
stack traceback:
        [C]: in function '_with'
        .../neovim/[VERSION]/share/nvim/runtime/filetype.lua:35: in function <.../neovim/[VERSION]/share/nvim/runtime/filetype.lua:10>

@BarrensZeppelin
Copy link
Contributor Author

BarrensZeppelin commented Aug 20, 2025

This seems to be causing an issue when starting up nvim v0.11.0

You're right. It's a v0.12.0 feature...
I'll create another patch.

Edit: #4021

@justinmk
Copy link
Member

@goatslacker why are you using Nvim 0.11.0? The latest stable release is 0.11.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants