nvim: refactor scala configuration

This commit is contained in:
Primrose 2025-07-08 23:56:16 +02:00
parent 83a83630db
commit 35787ab423
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA
4 changed files with 26 additions and 43 deletions

View file

@ -0,0 +1,22 @@
local mylsp = require("lsp")
local capabilities = mylsp.capabilities
local on_attach = mylsp.on_attach
local metals = require("metals")
local config = metals.bare_config()
config.capabilities = capabilities
-- I think this is for nix
config.settings.useGlobalExecutable = true
config.on_attach = function(client, bufnr)
-- local function nnoremap(bind, callback, userargs)
-- local args = userargs or {}
-- args.buffer = bufnr
-- vim.keymap.set("n", bind, callback, args)
-- end
-- nnoremap("<leader>ws", metals.hover_worksheet)
on_attach(client, bufnr)
end