191 lines
4.0 KiB
Lua
191 lines
4.0 KiB
Lua
local version = vim.version()
|
|
|
|
local function hasversion(major, minor, patch)
|
|
if version.major < major then
|
|
return false
|
|
end
|
|
if minor == nil then
|
|
return true
|
|
end
|
|
if version.minor < minor then
|
|
return false
|
|
end
|
|
if patch == nil then
|
|
return true
|
|
end
|
|
return version.patch <= patch
|
|
end
|
|
|
|
return {
|
|
{
|
|
'rose-pine/neovim',
|
|
name = 'rose-pine',
|
|
config = function() vim.cmd [[colorscheme rose-pine-moon]] end
|
|
},
|
|
{
|
|
"L3MON4D3/LuaSnip",
|
|
version = "v2.*",
|
|
build = "make install_jsregexp",
|
|
dependencies = { "rafamadriz/friendly-snippets" },
|
|
config = function ()
|
|
require("luasnip.loaders.from_vscode").lazy_load()
|
|
end
|
|
},
|
|
'saadparwaiz1/cmp_luasnip',
|
|
'hrsh7th/cmp-nvim-lsp',
|
|
'hrsh7th/cmp-buffer',
|
|
'hrsh7th/cmp-path',
|
|
'hrsh7th/cmp-cmdline',
|
|
{
|
|
'hrsh7th/nvim-cmp',
|
|
config = function() require 'cmp-setup' end
|
|
},
|
|
"lukas-reineke/cmp-under-comparator",
|
|
{ 'neovim/nvim-lspconfig', config = function() require 'lsp-setup' end, dependencies = 'neodev.nvim' },
|
|
{
|
|
"folke/neodev.nvim",
|
|
config = function() require 'neodev'.setup({
|
|
override = function(_, library)
|
|
library.enabled = true
|
|
library.plugins = true
|
|
end,
|
|
}) end,
|
|
enabled = not hasversion(0, 10),
|
|
lazy = false
|
|
},
|
|
'simrat39/rust-tools.nvim',
|
|
'mfussenegger/nvim-dap',
|
|
{
|
|
'numToStr/Comment.nvim',
|
|
opts = {}
|
|
},
|
|
{
|
|
"NeogitOrg/neogit",
|
|
version = "v0.0.1",
|
|
dependencies = {
|
|
"nvim-lua/plenary.nvim", -- required
|
|
"nvim-telescope/telescope.nvim", -- optional
|
|
"sindrets/diffview.nvim", -- optional
|
|
},
|
|
config = true,
|
|
},
|
|
{
|
|
"ahmedkhalf/project.nvim",
|
|
opts = {},
|
|
config = function (_, opts)
|
|
require 'gitsigns'.setup(opts)
|
|
end
|
|
},
|
|
'lambdalisue/suda.vim',
|
|
{
|
|
"kylechui/nvim-surround",
|
|
version = "*",
|
|
opts = {}
|
|
},
|
|
{
|
|
'nvim-treesitter/nvim-treesitter',
|
|
config = function() require 'nvim-treesitter.configs'.setup({
|
|
ensure_installed = { "c", "lua", "vim", "vimdoc", "query", "rust", "cpp" }
|
|
}) end,
|
|
build = function()
|
|
local ts_update = require('nvim-treesitter.install').update({ with_sync = true })
|
|
ts_update()
|
|
end,
|
|
},
|
|
{
|
|
'theblob42/drex.nvim',
|
|
dependencies = 'nvim-tree/nvim-web-devicons',
|
|
keys = {
|
|
{ '<F2>', ':DrexDrawerToggle<CR>', desc = 'Files', mode = 'n' }
|
|
}
|
|
},
|
|
{
|
|
"klen/nvim-test",
|
|
config = function()
|
|
require('nvim-test').setup()
|
|
end
|
|
},
|
|
'direnv/direnv.vim',
|
|
{
|
|
"folke/which-key.nvim",
|
|
event = "VeryLazy",
|
|
opts = {
|
|
delay = function(ctx)
|
|
return ctx.plugin and 100 or 200
|
|
end,
|
|
},
|
|
keys = {
|
|
{
|
|
"<leader>?",
|
|
function()
|
|
require("which-key").show({ global = false })
|
|
end,
|
|
desc = "Buffer Local Keymaps (which-key)",
|
|
},
|
|
},
|
|
},
|
|
{
|
|
'nvim-lualine/lualine.nvim',
|
|
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
|
config = function()
|
|
require 'lualine'.setup()
|
|
end
|
|
},
|
|
{
|
|
'stevearc/conform.nvim',
|
|
config = function ()
|
|
require("conform").setup({
|
|
formatters_by_ft = {
|
|
lua = { 'stylua' },
|
|
rust = { 'rustfmt', lsp_format = 'fallback' },
|
|
-- javascript = { '', stop_after_first = true },
|
|
},
|
|
})
|
|
end,
|
|
enabled = hasversion(0, 10),
|
|
},
|
|
{
|
|
"folke/trouble.nvim",
|
|
opts = {}, -- for default options, refer to the configuration section for custom setup.
|
|
cmd = "Trouble",
|
|
keys = {
|
|
{
|
|
"<leader>xx",
|
|
"<cmd>Trouble diagnostics toggle<cr>",
|
|
desc = "Diagnostics (Trouble)",
|
|
},
|
|
{
|
|
"<leader>xX",
|
|
"<cmd>Trouble diagnostics toggle filter.buf=0<cr>",
|
|
desc = "Buffer Diagnostics (Trouble)",
|
|
},
|
|
{
|
|
"<leader>cs",
|
|
"<cmd>Trouble symbols toggle focus=false<cr>",
|
|
desc = "Symbols (Trouble)",
|
|
},
|
|
{
|
|
"<leader>cl",
|
|
"<cmd>Trouble lsp toggle focus=false win.position=right<cr>",
|
|
desc = "LSP Definitions / references / ... (Trouble)",
|
|
},
|
|
{
|
|
"<leader>xL",
|
|
"<cmd>Trouble loclist toggle<cr>",
|
|
desc = "Location List (Trouble)",
|
|
},
|
|
{
|
|
"<leader>xQ",
|
|
"<cmd>Trouble qflist toggle<cr>",
|
|
desc = "Quickfix List (Trouble)",
|
|
},
|
|
},
|
|
},
|
|
{
|
|
'lewis6991/gitsigns.nvim',
|
|
opts = {
|
|
current_line_blame = true
|
|
}
|
|
}
|
|
}
|