Open xiaoshihou514 opened 1 week ago
nvim-metals config:
return {
"scalameta/nvim-metals",
dependencies = {
"nvim-lua/plenary.nvim",
},
ft = { "scala", "sbt", "java" },
opts = function()
local metals_config = require("metals").bare_config()
metals_config.on_attach = function(client, buf)
if client.server_capabilities.semanticTokensProvider then
vim.lsp.semantic_tokens.start(buf, client.id)
end
end
return metals_config
end,
config = function(self, metals_config)
local nvim_metals_group = vim.api.nvim_create_augroup("nvim-metals", { clear = true })
vim.api.nvim_create_autocmd("FileType", {
pattern = self.ft,
callback = function()
require("metals").initialize_or_attach(metals_config)
end,
group = nvim_metals_group,
})
end,
}
Now that I think about it, it's most probably an upstream issue? Is there at least a way to kill the bloop daemon on nvim exit?
Describe the bug
add ! after hello scala and save (triggers scala-cli rebuild)
Expected behavior
Metals does its own thing and I can build stuff as usual
Operating system
Linux
Version of Metals
latest stable
Commit of nvim-metals
1b87e6bfa4174b5fbaee9ca7ec79d8eae8df7f18