Skip to content

Commit

Permalink
custom plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoffmann committed Aug 11, 2024
1 parent 198460c commit d210bde
Show file tree
Hide file tree
Showing 10 changed files with 162 additions and 4 deletions.
12 changes: 12 additions & 0 deletions lua/custom/plugins/autopairs.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
return {
{
'windwp/nvim-autopairs',
event = 'InsertEnter',
config = true,
opts = {
map_c_w = true,
},
-- use opts = {} for passing setup options
-- this is equalent to setup({}) function
},
}
12 changes: 12 additions & 0 deletions lua/custom/plugins/barbecue.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
return {
'utilyre/barbecue.nvim',
name = 'barbecue',
version = '*',
dependencies = {
'SmiteshP/nvim-navic',
'nvim-tree/nvim-web-devicons', -- optional dependency
},
opts = {
-- configurations go here
},
}
28 changes: 28 additions & 0 deletions lua/custom/plugins/colors.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
return {
{
'rose-pine/neovim',
name = 'rose-pine',
config = function()
require('rose-pine').setup {
variant = 'main',
dark_variant = 'main',
dim_inactive_windows = false,
styles = {
transparency = true,
},
}
-- local theme = require 'lualine.themes.rose-pine'
-- local modes = { 'normal', 'insert', 'visual', 'replace', 'command', 'inactive' }
-- for _, mode in ipairs(modes) do
-- theme[mode].c.bg = 'NONE'
-- end

-- require('lualine').setup {
-- options = {
-- theme = theme,
-- },
-- }
vim.cmd 'colorscheme rose-pine'
end,
},
}
18 changes: 18 additions & 0 deletions lua/custom/plugins/grapple.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
return {
{
'cbochs/grapple.nvim',
opts = {
scope = 'git_branch',
},
keys = {
{ '<C-a>', '<cmd>Grapple toggle<cr>', desc = 'T[a]g a file' },
{ ';', '<cmd>Grapple toggle_tags<cr>', desc = 'Show tags menu' },
-- { '<C-h>', '<cmd>Grapple cycle_tags next<cr>', desc = 'Cycle next tag' },
-- { '<C-j>', '<cmd>Grapple cycle_tags prev<cr>', desc = 'Cycle previous tag' },
-- { '<c-1>', '<cmd>Grapple select index=1<cr>', desc = 'Select first tag' },
-- { '<c-2>', '<cmd>Grapple select index=2<cr>', desc = 'Select second tag' },
-- { '<c-3>', '<cmd>Grapple select index=3<cr>', desc = 'Select third tag' },
-- { '<c-4>', '<cmd>Grapple select index=4<cr>', desc = 'Select fourth tag' },
},
},
}
10 changes: 10 additions & 0 deletions lua/custom/plugins/neogit.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
return {
'NeogitOrg/neogit',
dependencies = {
'nvim-lua/plenary.nvim',
'sindrets/diffview.nvim',

'nvim-telescope/telescope.nvim',
},
config = true,
}
35 changes: 35 additions & 0 deletions lua/custom/plugins/neotree.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
return {
{
'nvim-neo-tree/neo-tree.nvim',
branch = 'v3.x',
dependencies = {
'nvim-lua/plenary.nvim',
'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended
'MunifTanjim/nui.nvim',
-- "3rd/image.nvim", -- Optional image support in preview window: See `# Preview Mode` for more information
},
config = function()
require('neo-tree').setup {
close_if_last_window = true,
window = {
mappings = {
['s'] = 'open_split',
['S'] = 'open_vsplit',
},
width = 40,
},
filesystem = {
filtered_items = {
visible = true,
},
follow_current_file = {
enabled = true,
},
},
}
end,
},

vim.keymap.set('n', '\\f', '<cmd>Neotree left filesystem<cr>', { desc = '[F]ile explorer' }),
vim.keymap.set('n', '\\b', '<cmd>Neotree float buffers<cr>', { desc = 'List open [B]uffers' }),
}
25 changes: 25 additions & 0 deletions lua/custom/plugins/project.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
return {
{
'coffebar/neovim-project',
opts = {
projects = { -- define project roots
'/mnt/Data/src/kprofiles/*',
'/mnt/Data/src/*',
'/mnt/Data/code/*',
'~/.config/*',
},
dashboard_mode = true,
},
init = function()
-- enable saving the state of plugins in the session
vim.opt.sessionoptions:append 'globals' -- save global variables that start with an uppercase letter and contain at least one lowercase letter.
end,
dependencies = {
{ 'nvim-lua/plenary.nvim' },
{ 'nvim-telescope/telescope.nvim', tag = '0.1.4' },
{ 'Shatur/neovim-session-manager' },
},
lazy = false,
priority = 100,
},
}
19 changes: 19 additions & 0 deletions lua/custom/plugins/toggleterm.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
return {
{
'akinsho/toggleterm.nvim',
version = '*',
config = true,
opts = {
size = 20,
float_opts = {
border = 'curved',
width = 120,
height = 40,
title_pos = 'left',
},
},
},

vim.keymap.set('n', '<A-i>', '<cmd>ToggleTerm direction=horizontal<cr>', { desc = 'Toggle a split terminal' }),
vim.keymap.set('n', '<A-f>', '<cmd>ToggleTerm direction=float<cr>', { desc = 'Toggle a floating terminal' }),
}
5 changes: 2 additions & 3 deletions lua/lazy-plugins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ require('lazy').setup({
-- Use `opts = {}` to force a plugin to be loaded.
--


-- modular approach: using `require 'path/name'` will
-- include a plugin definition from file lua/path/name.lua

Expand All @@ -36,7 +35,7 @@ require('lazy').setup({

require 'kickstart/plugins/cmp',

require 'kickstart/plugins/tokyonight',
-- require 'kickstart/plugins/tokyonight',

require 'kickstart/plugins/todo-comments',

Expand Down Expand Up @@ -64,7 +63,7 @@ require('lazy').setup({
--
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
-- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins`
-- { import = 'custom.plugins' },
{ import = 'custom.plugins' },
}, {
ui = {
-- If you are using a Nerd Font: set icons to an empty table which will use the
Expand Down
2 changes: 1 addition & 1 deletion lua/options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
vim.opt.number = true
-- You can also add relative line numbers, to help with jumping.
-- Experiment for yourself to see if you like it!
-- vim.opt.relativenumber = true
vim.opt.relativenumber = true

-- Enable mouse mode, can be useful for resizing splits for example!
vim.opt.mouse = 'a'
Expand Down

0 comments on commit d210bde

Please sign in to comment.