Skip to content

Typo in ts_ls.lua prevents LSP from attaching due to incorrect root marker #985

@realizer5

Description

@realizer5

There's a typo in the ts_ls.lua file located at:
@/home/user/.local/share/nvim/lazy/nvim-lspconfig/lsp/ts_ls.lua

At line 68, the project_root_markers table contains 'bun.lockb', which appears to be incorrect. The correct file name should likely be 'bun.lock', based on the actual lockfile name used by Bun package manager.

This typo causes the LSP to fail to detect the project root correctly, resulting in it not attaching when expected.
Problematic line (line 68):

local project_root_markers = { 'package-lock.json', 'yarn.lock', 'pnpm-lock.yaml', 'bun.lockb' }

Suggested fix:

local project_root_markers = { 'package-lock.json', 'yarn.lock', 'pnpm-lock.yaml', 'bun.lock' }

Steps to reproduce:

Open a project that uses Bun (with a bun.lock file).

Start Neovim with the current LSP configuration.

Observe that the TypeScript LSP does not attach.

Manually correcting the filename resolves the issue.

Please let me know if you'd like me to submit a PR with the fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions