lsp: show function signature, use conform.nvim for formatting code.
This commit is contained in:
parent
8199081348
commit
aca9dd3078
4 changed files with 80 additions and 10 deletions
|
@ -8,12 +8,28 @@
|
|||
|
||||
extraPackages = [
|
||||
pkgs.metals
|
||||
pkgs.scalafmt
|
||||
];
|
||||
|
||||
autoGroups.nvim_metals_group = {
|
||||
clear = true;
|
||||
};
|
||||
|
||||
extraConfigLua = ''
|
||||
metals_config = require("metals").bare_config()
|
||||
metals_config.init_options.statusBarProvider = "off"
|
||||
metals_config.settings = {
|
||||
showInferredType = true,
|
||||
showImplicitArguments = false,
|
||||
showImplicitConversionsAndClasses = false,
|
||||
metalsBinaryPath = "${pkgs.lib.getExe pkgs.metals}",
|
||||
excludedPackages = { "akka.actor.typed.javadsl", "com.github.swagger.akka.javadsl" },
|
||||
useGlobalExecutable = true,
|
||||
verboseCompilation = true
|
||||
}
|
||||
metals_config.capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
'';
|
||||
|
||||
autoCmd = [
|
||||
{
|
||||
event = "FileType";
|
||||
|
@ -21,18 +37,10 @@
|
|||
desc = "Initialize nvim-metals";
|
||||
callback = helpers.mkRaw ''
|
||||
function()
|
||||
metals_config = require("metals").bare_config()
|
||||
metals_config.init_options.statusBarProvider = "off"
|
||||
metals_config.settings = {
|
||||
showInferredType = true,
|
||||
showImplicitArguments = false,
|
||||
showImplicitConversionsAndClasses = false,
|
||||
metalsBinaryPath = "${pkgs.lib.getExe pkgs.metals}",
|
||||
useGlobalExecutable = true
|
||||
}
|
||||
require("metals").initialize_or_attach(metals_config)
|
||||
end
|
||||
'';
|
||||
pattern = [ "scala" "sbt" ];
|
||||
}
|
||||
];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue