Expose metals as a nix derivation
Add to your inputs:
nix-metals = {
url = "github:ghostbuster91/nix-metals/stable";
inputs.nixpkgs.follows = "nixpkgs";
};
(or use nightly
branch if you would like to use snapshot versions)
Configure your editor to use provided metals package.
Example for neovim:
metals_config.settings = {
metalsBinaryPath = binaries.metals_binary_path,
showImplicitArguments = true,
superMethodLensesEnabled = false,
excludedPackages = {
"akka.actor.typed.javadsl",
"com.github.swagger.akka.javadsl",
},
enableSemanticHighlighting = false,
}
where metals_binary_path
is set to:
"${nix-metals.packages.${system}.metals}/bin/metals",