Merge pull request #6 from kitsoNamane/kitso

feat: add nvim-metals
This commit is contained in:
Kitso Gidion Namane 2024-07-16 11:37:25 +02:00 committed by GitHub
commit f22c3dcd31
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 27 additions and 1 deletions

View File

@ -155,7 +155,7 @@ vim.opt.cursorline = true
vim.opt.scrolloff = 10
-- fix indentation
vim.o.tab = 4
-- vim.o.tab = 4
vim.o.softtabstop = 4
vim.o.shiftwidth = 4
@ -799,6 +799,32 @@ require('lazy').setup({
-- Highlight todo, notes, etc in comments
{ 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } },
{
'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,
},
{ -- Collection of various small independent plugins/modules
'echasnovski/mini.nvim',
config = function()