josa42 / coc-sh

SH language server extension using bash-language-server for coc.nvim.
MIT License
205 stars 4 forks source link

[fix] deps path resolve #51

Closed onichandame closed 2 years ago

onichandame commented 3 years ago

Problem

when the deps are hosted and installed to an upper directory like this:

~/.config/coc/extensions
└──node_modules
    └──coc-sh
    └──bash-language-server

In this case the pkgDir resolves to the wrong path: ~/.config/coc/extensions/node_modules/coc-sh/node_modules/bash-language-server.

Solution

require.resolve uses the native dependency loader require to find the path to the dependencies.