This commit is contained in:
lucas nicolas 2024-02-27 03:07:22 +01:00
parent ff05cf8b89
commit 41590ba3dd
5 changed files with 72 additions and 0 deletions

View File

@ -0,0 +1,11 @@
return {
'windwp/nvim-autopairs',
dependencies = { 'hrsh7th/nvim-cmp' },
config = function()
require('nvim-autopairs').setup {}
-- If you want to automatically add `(` after selecting a function or method
local cmp_autopairs = require 'nvim-autopairs.completion.cmp'
local cmp = require 'cmp'
cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done())
end,
}

View File

@ -0,0 +1,23 @@
return {
'theprimeagen/harpoon',
--dependencies = 'nvim-lua/plenary.nvim',
config = function()
local mark = require 'harpoon.mark'
local ui = require 'harpoon.ui'
vim.keymap.set('n', '<leader>a', mark.add_file, { desc = 'Add current file to harpoon' })
vim.keymap.set('n', '<C-e>', ui.toggle_quick_menu, { desc = ' harpoon menu' })
vim.keymap.set('n', '<C-h>', function()
ui.nav_file(1)
end)
vim.keymap.set('n', '<C-t>', function()
ui.nav_file(2)
end)
vim.keymap.set('n', '<C-n>', function()
ui.nav_file(3)
end)
vim.keymap.set('n', '<C-s>', function()
ui.nav_file(4)
end)
end,
}

View File

@ -0,0 +1,25 @@
return {
"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
}

View File

@ -0,0 +1,6 @@
return {
'mbbill/undotree',
config = function()
vim.keymap.set('n', '<leader>u', vim.cmd.UndotreeToggle)
end,
}

View File

@ -0,0 +1,7 @@
return {
'tpope/vim-fugitive',
config = function()
vim.keymap.set('n', '<leader>gs', vim.cmd.Git, { desc = '[G]it [S]tatus' })
end,
}