From 516bdf08b94d784bd7e677b6ad2a26aaaf656e59 Mon Sep 17 00:00:00 2001 From: Elias Almqvist Date: Tue, 14 Jan 2025 14:58:02 +0100 Subject: [PATCH] fixes --- nvchad/.config/nvim/lua/configs/lspconfig.lua | 15 ++++++++++- nvchad/.config/nvim/lua/plugins/init.lua | 27 +------------------ 2 files changed, 15 insertions(+), 27 deletions(-) diff --git a/nvchad/.config/nvim/lua/configs/lspconfig.lua b/nvchad/.config/nvim/lua/configs/lspconfig.lua index b1aa65a..347ca15 100644 --- a/nvchad/.config/nvim/lua/configs/lspconfig.lua +++ b/nvchad/.config/nvim/lua/configs/lspconfig.lua @@ -14,7 +14,6 @@ local servers = { "tailwindcss", "pyright", "julials", - -- "metals", -- handled by nvim-metals } -- lsps with default config @@ -25,3 +24,17 @@ for _, lsp in ipairs(servers) do capabilities = capabilities, }) end + +lspconfig.metals.setup({ + settings = { + showImplicitArguments = true, + excludedPackages = { "akka.actor.typed.javadsl", "com.github.swagger.akka.javadsl" }, + }, + init_options = { + statusBarProvider = "off", + }, + -- on_attach = function(client, bufnr) + -- -- Add your keybindings and other on_attach functions here + -- end, +}) + diff --git a/nvchad/.config/nvim/lua/plugins/init.lua b/nvchad/.config/nvim/lua/plugins/init.lua index 2c5cdfa..93d498b 100644 --- a/nvchad/.config/nvim/lua/plugins/init.lua +++ b/nvchad/.config/nvim/lua/plugins/init.lua @@ -140,6 +140,7 @@ local plugins = { "zig", "rust", "vhdl", + "scala", }, indent = { enable = true, @@ -157,32 +158,6 @@ 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