nvim/lua/plugins/common.lua

142 lines
3.9 KiB
Lua
Raw Normal View History

2023-02-19 23:01:47 +01:00
return {
-- NOTE: Theme
{
2023-02-24 11:04:06 +01:00
'sainnhe/gruvbox-material',
priority = 1000,
config = function()
2023-02-24 11:04:06 +01:00
vim.g.gruvbox_material_background = 'soft'
vim.g.gruvbox_material_foreground = 'original'
vim.g.gruvbox_material_better_performance = 1
vim.cmd.colorscheme 'gruvbox-material'
end,
},
2023-02-19 23:01:47 +01:00
-- NOTE: First, some plugins that don't require any configuration
-- Git related plugins
'tpope/vim-fugitive',
'tpope/vim-rhubarb',
-- Detect tabstop and shiftwidth automatically
'tpope/vim-sleuth',
2023-02-24 11:04:06 +01:00
-- NOTE: Second, plugins that require setup call (done via opts)
2023-02-19 23:01:47 +01:00
-- Useful plugin to show you pending keybinds.
{ 'folke/which-key.nvim', opts = {} },
-- "gc" to comment visual regions/lines
{ 'numToStr/Comment.nvim', opts = {} },
-- colorize in files
{ "norcalli/nvim-colorizer.lua", opts = {} },
-- highlighting for comments
{ "folke/todo-comments.nvim", dependencies = "nvim-lua/plenary.nvim", opts = {} },
2023-02-24 11:04:06 +01:00
-- markdown preview using glow
{ "ellisonleao/glow.nvim", config = true, cmd = "Glow" },
2023-02-19 23:01:47 +01:00
-- NOTE: Third, plugins that require some setup, but not enugh for separate file
{ -- Adds git releated signs to the gutter, as well as utilities for managing changes
'lewis6991/gitsigns.nvim',
opts = {
-- See `:help gitsigns.txt`
signs = {
add = { text = '+' },
change = { text = '~' },
delete = { text = '_' },
topdelete = { text = '' },
changedelete = { text = '~' },
},
},
},
{ -- Set lualine as statusline
'nvim-lualine/lualine.nvim',
-- See `:help lualine.txt`
opts = {
options = {
icons_enabled = false,
2023-02-24 11:04:06 +01:00
theme = 'gruvbox-material',
statusline_style = 'mix',
2023-02-19 23:01:47 +01:00
component_separators = '|',
section_separators = '',
},
},
},
{ -- Add indentation guides even on blank lines
'lukas-reineke/indent-blankline.nvim',
-- Enable `lukas-reineke/indent-blankline.nvim`
-- See `:help indent_blankline.txt`
opts = {
char = '',
show_trailing_blankline_indent = false,
},
},
{ -- git blame annotations
'f-person/git-blame.nvim',
config = function()
vim.api.nvim_set_keymap('n', '<leader>gt', ':GitBlameToggle<CR>', { desc = '[G]it Blame [T]oggle', noremap = true })
vim.api.nvim_set_keymap('n', '<leader>gu', ':GitBlameOpenCommitURL<CR>',
{ desc = '[G]it Blame Open Commit [U]rl', noremap = true })
end
},
{ -- a more adventurous wildmenu
'gelguy/wilder.nvim',
dependencies = { 'romgrk/fzy-lua-native' },
config = function()
local wilder = require('wilder')
wilder.setup({ modes = { ':', '/', '?' } })
-- Disable Python remote plugin
wilder.set_option('use_python_remote_plugin', 0)
wilder.set_option('pipeline', {
wilder.branch(
wilder.cmdline_pipeline({
fuzzy = 1,
fuzzy_filter = wilder.lua_fzy_filter(),
}),
wilder.vim_search_pipeline()
)
})
wilder.set_option('renderer', wilder.popupmenu_renderer(
wilder.popupmenu_border_theme({
highlights = {
border = 'Normal',
},
border = 'rounded',
highlighter = wilder.lua_fzy_highlighter(),
left = { ' ', wilder.popupmenu_devicons() },
right = { ' ', wilder.popupmenu_scrollbar() },
})
))
end,
},
2023-02-19 23:18:06 +01:00
{ -- file tree
"nvim-neo-tree/neo-tree.nvim",
version = "*",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
"MunifTanjim/nui.nvim",
},
config = function()
2023-02-19 23:18:06 +01:00
-- Unless you are still migrating, remove the deprecated commands from v1.x
vim.cmd([[ let g:neo_tree_remove_legacy_commands = 1 ]])
require('neo-tree').setup {}
end,
},
2023-02-19 23:01:47 +01:00
}