mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
nvim: refactor scala configuration
This commit is contained in:
parent
83a83630db
commit
35787ab423
4 changed files with 26 additions and 43 deletions
22
.config/nvim/lua/lsp/scala.lua
Normal file
22
.config/nvim/lua/lsp/scala.lua
Normal 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
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue