Problem:
Search for node_modules uses a costly call to fn.globpath; the final
path resolution was not working on Linux.
Solution:
A custom function to resolve ngserver location from CMD wrappers on
Windows; and the corrected final path.
Co-authored-by: Erikson K. <erikson23@gmail.com>
The cmd function's config parameter can sometimes be nil,
causing a warning when attempting to access config.root.
Added a nil check to safely handle this case.
Fixes#4180
Problem:
The current config for Angular LS make strong assumptions when trying to
find the root dir, which can lead to unexpected LSP crashes.
Solution:
By defining the 'cmd' field as a function, the config employs Neovim's
LSP root resolution to identify the correct path and find the relevant
node_modules folder.
Co-authored-by: Erikson Kaszubowski <erikson.kaszubowski@serpro.gov.br>