Skip to content

Ability to set cmd = "path/to/metals-bin" #454

Answered by ckipp01
gvolpe asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @gvolpe! Thanks for the question!

The really short answer is sure, you can do the following:

local metals_config = require("metals").bare_config()
metals_config.cmd = { "whatever/you/want" }

However I don't actually document it. The reason for this is that nvim-metals actually also takes into account JAVA_OPTS, JAVA_FLAGS, your .jvmopts file and also anything you pass into metals_config.settings.serverProperties. It also then strips out certain ones that won't work with metals/coursier automatically and then passes them all in to Neovim to start the server. So if you override cmd you lose all of that, which is for sure not what most people want.

There is a useGlobalExecutable setting …

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@gvolpe
Comment options

@ckipp01
Comment options

Answer selected by gvolpe
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