metals improvements
This commit is contained in:
parent
7ad9b5a141
commit
7b6176d6d7
1 changed files with 12 additions and 0 deletions
|
@ -12,10 +12,22 @@ return {
|
||||||
local metals_config = require("metals").bare_config()
|
local metals_config = require("metals").bare_config()
|
||||||
|
|
||||||
metals_config.settings = {
|
metals_config.settings = {
|
||||||
|
serverVersion = "latest.snapshot",
|
||||||
showImplicitArguments = true,
|
showImplicitArguments = true,
|
||||||
|
showInferredType = true,
|
||||||
|
bloopSbtAlreadyInstalled = true,
|
||||||
excludedPackages = { "akka.actor.typed.javadsl", "com.github.swagger.akka.javadsl" },
|
excludedPackages = { "akka.actor.typed.javadsl", "com.github.swagger.akka.javadsl" },
|
||||||
|
fallbackScalaVersion = "2.13.8",
|
||||||
|
superMethodLensesEnabled = true,
|
||||||
|
javaHome = "/Users/salar/.nix-profile",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
metals_config.on_attach = function(client, bufnr)
|
||||||
|
vim.cmd([[autocmd CursorHold <buffer> lua vim.lsp.buf.document_highlight()]])
|
||||||
|
vim.cmd([[autocmd CursorMoved <buffer> lua vim.lsp.buf.clear_references()]])
|
||||||
|
vim.cmd([[autocmd BufEnter,CursorHold,InsertLeave <buffer> lua vim.lsp.codelens.refresh()]])
|
||||||
|
end
|
||||||
|
|
||||||
metals_config.init_options.statusBarProvider = "on"
|
metals_config.init_options.statusBarProvider = "on"
|
||||||
|
|
||||||
metals_config.capabilities = require("cmp_nvim_lsp").default_capabilities()
|
metals_config.capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||||
|
|
Loading…
Reference in a new issue