plugins
This commit is contained in:
parent
ff05cf8b89
commit
41590ba3dd
11
lua/custom/plugins/autopairs.lua
Normal file
11
lua/custom/plugins/autopairs.lua
Normal 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,
|
||||||
|
}
|
23
lua/custom/plugins/harpoon.lua
Normal file
23
lua/custom/plugins/harpoon.lua
Normal 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,
|
||||||
|
}
|
25
lua/custom/plugins/lsp.lua
Normal file
25
lua/custom/plugins/lsp.lua
Normal 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
|
||||||
|
}
|
6
lua/custom/plugins/undotree.lua
Normal file
6
lua/custom/plugins/undotree.lua
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
return {
|
||||||
|
'mbbill/undotree',
|
||||||
|
config = function()
|
||||||
|
vim.keymap.set('n', '<leader>u', vim.cmd.UndotreeToggle)
|
||||||
|
end,
|
||||||
|
}
|
7
lua/custom/plugins/vim-fugitive.lua
Normal file
7
lua/custom/plugins/vim-fugitive.lua
Normal 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,
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user