fixed nvim-metals

master
Elias Almqvist 2 days ago
parent f0355244a8
commit 47786bf89e
No known key found for this signature in database
GPG Key ID: E31A99CE3E75A158
  1. 24
      nvchad/.config/nvim/lua/configs/lspconfig.lua
  2. 26
      nvchad/.config/nvim/lua/plugins/init.lua

@ -25,16 +25,16 @@ for _, lsp in ipairs(servers) do
})
end
lspconfig.metals.setup({
settings = {
showImplicitArguments = true,
excludedPackages = { "akka.actor.typed.javadsl", "com.github.swagger.akka.javadsl" },
},
init_options = {
statusBarProvider = "on",
},
-- on_attach = function(client, bufnr)
-- -- Add your keybindings and other on_attach functions here
-- end,
})
-- lspconfig.metals.setup({
-- settings = {
-- showImplicitArguments = true,
-- excludedPackages = { "akka.actor.typed.javadsl", "com.github.swagger.akka.javadsl" },
-- },
-- init_options = {
-- statusBarProvider = "on",
-- },
-- -- on_attach = function(client, bufnr)
-- -- -- Add your keybindings and other on_attach functions here
-- -- end,
-- })

@ -158,6 +158,32 @@ local plugins = {
-- end,
},
{
"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, bufnr)
-- your on_attach function
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
},
{
"NvChad/nvim-colorizer.lua",
enabled = true

Loading…
Cancel
Save