jose-elias-alvarez / nvim-lsp-ts-utils

Utilities to improve the TypeScript development experience for Neovim's built-in LSP client.
The Unlicense
438 stars 18 forks source link

fix(null-ls): use current file to resolve node_modules path #77

Closed jose-elias-alvarez closed 3 years ago

jose-elias-alvarez commented 3 years ago

May close #66.

The previous mechanism to resolve local executables depended on the null-ls root path, which may not be reliable in every situation since it's based on .git or vim.fn.getcwd(). This PR uses nvim-lspconfig's util.root_pattern to find node_modules upwards from the current file's path, which should be more reliable.