188 lines
4 KiB
Lua
188 lines
4 KiB
Lua
return {
|
|
-- Nvim lspconfig
|
|
{
|
|
"neovim/nvim-lspconfig",
|
|
event = { "BufReadPre", "BufNewFile" },
|
|
config = function()
|
|
require("configs.lsp.lspconfig")
|
|
end
|
|
},
|
|
-- Mason
|
|
{
|
|
"mason-org/mason.nvim",
|
|
opts = {}
|
|
},
|
|
-- Mason lspconfig
|
|
{
|
|
"mason-org/mason-lspconfig.nvim",
|
|
opts = {
|
|
ensure_installed = {
|
|
-- "clangd",
|
|
-- "gopls",
|
|
-- "phpactor",
|
|
-- "lua_ls",
|
|
-- "bashls",
|
|
-- "mesonlsp",
|
|
},
|
|
automatic_enable = true,
|
|
},
|
|
dependencies = {
|
|
"mason-org/mason.nvim",
|
|
"neovim/nvim-lspconfig",
|
|
}
|
|
},
|
|
-- Nvim complete
|
|
{
|
|
"hrsh7th/nvim-cmp",
|
|
event = "InsertEnter",
|
|
dependencies = {
|
|
{
|
|
"L3MON4D3/LuaSnip",
|
|
dependencies = "rafamadriz/friendly-snippets",
|
|
opts = { history = true, updateevents = "TextChanged,TextChangedI" },
|
|
config = function(_, opts)
|
|
require("luasnip").config.set_config(opts)
|
|
require "configs.luasnip"
|
|
end,
|
|
},
|
|
{
|
|
"windwp/nvim-autopairs",
|
|
opts = {
|
|
fast_wrap = {},
|
|
disable_filetype = { "TelescopePrompt", "vim" },
|
|
},
|
|
config = function(_, opts)
|
|
require("nvim-autopairs").setup(opts)
|
|
-- setup cmp for autopairs
|
|
local cmp_autopairs = require "nvim-autopairs.completion.cmp"
|
|
require("cmp").event:on("confirm_done", cmp_autopairs.on_confirm_done())
|
|
end,
|
|
},
|
|
{
|
|
"saadparwaiz1/cmp_luasnip",
|
|
"hrsh7th/cmp-nvim-lua",
|
|
"hrsh7th/cmp-nvim-lsp",
|
|
"hrsh7th/cmp-buffer",
|
|
"https://codeberg.org/FelipeLema/cmp-async-path.git"
|
|
}
|
|
},
|
|
opts = function()
|
|
return require "configs.cmp"
|
|
end,
|
|
},
|
|
-- Treesitter (syntax)
|
|
{
|
|
"nvim-treesitter/nvim-treesitter",
|
|
branch = "main",
|
|
lazy = false,
|
|
build = ":TSUpdate",
|
|
opts = function()
|
|
return require("configs.treesitter")
|
|
end,
|
|
config = function(_, opts)
|
|
require("nvim-treesitter").setup(opts)
|
|
|
|
vim.api.nvim_create_autocmd("FileType", {
|
|
pattern = {
|
|
"c",
|
|
"cpp",
|
|
"go",
|
|
"lua",
|
|
"python",
|
|
"javascript",
|
|
"typescript",
|
|
"tsx",
|
|
"json",
|
|
"jsonc",
|
|
"vim",
|
|
"vimdoc",
|
|
"query",
|
|
"markdown",
|
|
"markdown_inline",
|
|
"nix",
|
|
"html",
|
|
"xml",
|
|
"yaml",
|
|
"toml",
|
|
"sql",
|
|
"php",
|
|
"make",
|
|
"cmake",
|
|
"diff",
|
|
"gitcommit",
|
|
"gitignore",
|
|
"tla",
|
|
},
|
|
callback = function(args)
|
|
pcall(vim.treesitter.start, args.buf)
|
|
end,
|
|
})
|
|
end,
|
|
},
|
|
-- Logs
|
|
{
|
|
'fei6409/log-highlight.nvim',
|
|
event = 'BufReadPre', -- Lazy load the plugin
|
|
config = function()
|
|
require('log-highlight').setup({
|
|
keyword = {
|
|
error = 'ERROR',
|
|
warning = { 'ALWAYS', 'WARN' },
|
|
info = { 'INFO' },
|
|
debug = { 'DEBUG' },
|
|
pass = {},
|
|
},
|
|
})
|
|
end
|
|
},
|
|
-- Folders
|
|
{
|
|
'kevinhwang91/nvim-ufo',
|
|
dependencies = 'kevinhwang91/promise-async',
|
|
event = "VeryLazy",
|
|
config = function()
|
|
require("configs.ufo")
|
|
end
|
|
},
|
|
-- These are for C/C++ Debbuger
|
|
{
|
|
"nvim-neotest/nvim-nio",
|
|
event = "VeryLazy",
|
|
},
|
|
{
|
|
"mfussenegger/nvim-dap",
|
|
event = "VeryLazy",
|
|
config = function()
|
|
require("configs.nvim-dap").setup()
|
|
end
|
|
},
|
|
{
|
|
"rcarriga/nvim-dap-ui",
|
|
event = "VeryLazy",
|
|
dependencies = "mfussenegger/nvim-dap",
|
|
},
|
|
{
|
|
"jay-babu/mason-nvim-dap.nvim",
|
|
event = "VeryLazy",
|
|
dependencies = {
|
|
"mason-org/mason.nvim",
|
|
"mfussenegger/nvim-dap",
|
|
},
|
|
opts = {
|
|
handlers = {}
|
|
},
|
|
},
|
|
{
|
|
"theHamsta/nvim-dap-virtual-text",
|
|
dependencies = "mfussenegger/nvim-dap",
|
|
config = function()
|
|
require("nvim-dap-virtual-text").setup()
|
|
end,
|
|
},
|
|
{
|
|
'aspeddro/gitui.nvim',
|
|
config = function()
|
|
require("gitui").setup()
|
|
end,
|
|
},
|
|
}
|