Skip to content

How to get the path for shared articafacts of a package? #1553

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

You must be logged in to vote

Reaching into the internal package structure is not recommended and not supported as this may change in-between versions. Instead, these artifacts are also available at a stable location inside the bin/ (executables), share/ (architecture-independent files), and opt/ (rarely used for architecture-dependent files) directories. .jar files will be found inside the share/ directory. The recommended way to access these are by expanding the $MASON environment variable which mason.nvim sets up during setup.

In the case of java-test, this could for example look like:

local java_test_jar = vim.fn.glob "$MASON/share/java-test/com.microsoft.java.test.plugin-*.jar"
-- /Users/williamboman/.local/share…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by s1n7ax
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