Skip to content

Reliable way to get package installation location #258

Answered by williamboman
mtrajano asked this question in Q&A
Discussion options

You must be logged in to vote

Hey! So the best way to gather the installation location of a package is via Package:get_install_path(). However, as you mention, you shouldn't really be reaching into packages directly as this is prone to errors. The node-debug2-adapter package will link an executable with the same name, for easy access. If you're using nvim-dap, try something like:

dap.adapters.node2 = {
  type = 'executable',
  command = 'node-debug2-adapter',
  args = {},
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mtrajano
Comment options

Answer selected by williamboman
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants