136 lines
2.8 KiB
Lua
136 lines
2.8 KiB
Lua
local cmp = require "cmp"
|
|
|
|
local plugins = {
|
|
{
|
|
"christoomey/vim-tmux-navigator",
|
|
lazy = false,
|
|
},
|
|
-- {
|
|
-- "zbirenbaum/copilot.lua",
|
|
-- lazy = false,
|
|
-- opts = function ()
|
|
-- return require "custom.configs.copilot"
|
|
-- end,
|
|
-- config = function(_, opts)
|
|
-- require("copilot").setup(opts)
|
|
-- end
|
|
-- },
|
|
{
|
|
"anuvyklack/pretty-fold.nvim",
|
|
lazy = false,
|
|
config = function()
|
|
require("pretty-fold").setup()
|
|
end
|
|
},
|
|
{
|
|
"williamboman/mason.nvim",
|
|
opts = {
|
|
ensure_installed = {
|
|
"gopls",
|
|
"rust-analyzer",
|
|
"python-lsp-server",
|
|
},
|
|
},
|
|
},
|
|
{
|
|
"neovim/nvim-lspconfig",
|
|
config = function()
|
|
require "plugins.configs.lspconfig"
|
|
require "custom.configs.lspconfig"
|
|
end,
|
|
},
|
|
{
|
|
"simrat39/rust-tools.nvim",
|
|
ft = "rust",
|
|
dependencies = "neovim/nvim-lspconfig",
|
|
opts = function ()
|
|
return require "custom.configs.rust-tools"
|
|
end,
|
|
config = function(_, opts)
|
|
require('rust-tools').setup(opts)
|
|
end
|
|
},
|
|
{
|
|
"jose-elias-alvarez/null-ls.nvim",
|
|
ft = "go",
|
|
opts = function()
|
|
return require "custom.configs.null-ls"
|
|
end,
|
|
},
|
|
{
|
|
"mfussenegger/nvim-dap",
|
|
init = function()
|
|
require("core.utils").load_mappings("dap")
|
|
end
|
|
},
|
|
{
|
|
"leoluz/nvim-dap-go",
|
|
ft = "go",
|
|
dependencies = "mfussenegger/nvim-dap",
|
|
config = function(_, opts)
|
|
require("dap-go").setup(opts)
|
|
require("core.utils").load_mappings("dap_go")
|
|
end
|
|
},
|
|
{
|
|
"olexsmir/gopher.nvim",
|
|
ft = "go",
|
|
config = function(_, opts)
|
|
require("gopher").setup(opts)
|
|
end,
|
|
build = function()
|
|
vim.cmd [[silent! GoInstallDeps]]
|
|
end,
|
|
},
|
|
{
|
|
'saecki/crates.nvim',
|
|
ft = {"rust", "toml"},
|
|
config = function(_, opts)
|
|
local crates = require('crates')
|
|
crates.setup(opts)
|
|
require('cmp').setup.buffer({
|
|
sources = { { name = "crates" }}
|
|
})
|
|
crates.show()
|
|
require("core.utils").load_mappings("crates")
|
|
end,
|
|
},
|
|
{
|
|
"rust-lang/rust.vim",
|
|
ft = "rust",
|
|
init = function ()
|
|
vim.g.rustfmt_autosave = 1
|
|
end
|
|
},
|
|
{
|
|
"theHamsta/nvim-dap-virtual-text",
|
|
lazy = false,
|
|
config = function(_, opts)
|
|
require("nvim-dap-virtual-text").setup()
|
|
end
|
|
},
|
|
{
|
|
"hrsh7th/nvim-cmp",
|
|
opts = function()
|
|
local M = require "plugins.configs.cmp"
|
|
M.completion.completeopt = "menu,menuone,noselect"
|
|
M.mapping["<CR>"] = cmp.mapping.confirm {
|
|
behavior = cmp.ConfirmBehavior.Insert,
|
|
select = false,
|
|
}
|
|
|
|
M.mapping["<C-j>"] = cmp.mapping(function(_fallback)
|
|
cmp.mapping.abort()
|
|
require("copilot.suggestion").accept_line()
|
|
end, {
|
|
"i",
|
|
"s",
|
|
})
|
|
|
|
table.insert(M.sources, {name = "crates"})
|
|
return M
|
|
end,
|
|
},
|
|
}
|
|
return plugins
|