More plugin configuration

This commit is contained in:
Chris
2025-04-14 11:38:42 +01:00
parent f2f3b1812a
commit 01164c6d8b
14 changed files with 211 additions and 35 deletions

View File

@@ -1,3 +1,5 @@
require('helpers').edit_cf('pa', '/lua/plugins/avante.lua')
return {
'olimorris/codecompanion.nvim',
opts = {},

View File

@@ -1,3 +1,3 @@
return {
'github/copilot.vim',
'zbirenbaum/copilot.lua',
}

View File

@@ -1,10 +0,0 @@
return {
'nvimdev/dashboard-nvim',
event = 'VimEnter',
config = function()
require('dashboard').setup {
-- config
}
end,
dependencies = { {'nvim-tree/nvim-web-devicons'}}
}

101
lua/plugins/edgy.lua Normal file
View File

@@ -0,0 +1,101 @@
return {
"folke/edgy.nvim",
event = "VeryLazy",
init = function()
vim.opt.laststatus = 3
vim.opt.splitkeep = "screen"
end,
opts = {
bottom = {
-- toggleterm / lazyterm at the bottom with a height of 40% of the screen
{
ft = "toggleterm",
size = { height = 0.4 },
-- exclude floating windows
filter = function(buf, win)
return vim.api.nvim_win_get_config(win).relative == ""
end,
},
{
ft = "lazyterm",
title = "LazyTerm",
size = { height = 0.4 },
filter = function(buf)
return not vim.b[buf].lazyterm_cmd
end,
},
{
ft = "snack_terminal",
size = { height = 0.4 },
title = "%{b:snacks_terminal.id}: %{b:term_title}",
filter = function(_buf, win)
return vim.w[win].snacks_win
and vim.w[win].snacks_win.position == pos
and vim.w[win].snacks_win.relative == "editor"
and not vim.w[win].trouble_preview
end,
},
"Trouble",
{ ft = "qf", title = "QuickFix" },
{
ft = "help",
size = { height = 20 },
-- only show help buffers
filter = function(buf)
return vim.bo[buf].buftype == "help"
end,
},
{ ft = "spectre_panel", size = { height = 0.4 } },
},
left = {
-- Neo-tree filesystem always takes half the screen height
{
title = "Neo-Tree",
ft = "neo-tree",
filter = function(buf)
return vim.b[buf].neo_tree_source == "filesystem"
end,
size = { height = 0.5 },
},
{
title = "Neo-Tree Git",
ft = "neo-tree",
filter = function(buf)
return vim.b[buf].neo_tree_source == "git_status"
end,
pinned = true,
collapsed = true, -- show window as closed/collapsed on start
open = "Neotree position=right git_status",
},
{
title = "Neo-Tree Buffers",
ft = "neo-tree",
filter = function(buf)
return vim.b[buf].neo_tree_source == "buffers"
end,
pinned = true,
collapsed = true, -- show window as closed/collapsed on start
open = "Neotree position=top buffers",
},
{
title = function()
local buf_name = vim.api.nvim_buf_get_name(0) or "[No Name]"
return vim.fn.fnamemodify(buf_name, ":t")
end,
ft = "Outline",
pinned = true,
open = "SymbolsOutlineOpen",
},
-- any other neo-tree windows
"neo-tree",
},
right = {
{
title = 'Code Companion',
ft = 'codecompanion',
size = { width = 0.3 },
}
}
},
}

View File

@@ -31,21 +31,6 @@ return {
require('mini.splitjoin').setup()
local animate = require 'mini.animate'
animate.setup {
cursor = {
enable = false,
},
resize = {
enable = true,
timing = animate.gen_timing.linear { duration = 50, unit = 'total' },
},
scroll = {
enable = true,
timing = animate.gen_timing.linear { duration = 50, unit = 'total' },
},
}
require('mini.map').setup()
-- Simple and easy statusline.

View File

@@ -13,8 +13,19 @@ return {
keys = {
{ '\\', ':Neotree reveal<CR>', desc = 'NeoTree reveal', silent = true },
},
opts = {
filesystem = {
opts = function(_, opts)
local function on_move(data)
Snacks.rename.on_rename_file(data.source, data.destination)
end
local events = require("neo-tree.events")
opts.event_handlers = opts.event_handlers or {}
vim.list_extend(opts.event_handlers, {
{ event = events.FILE_MOVED, handler = on_move },
{ event = events.FILE_RENAMED, handler = on_move },
})
opts.filesystem = {
window = {
mappings = {
['\\'] = 'close_window',
@@ -23,6 +34,6 @@ return {
filtered_items = {
hide_dotfiles = false,
},
},
},
}
end,
}

21
lua/plugins/neotest.lua Normal file
View File

@@ -0,0 +1,21 @@
return {
"nvim-neotest/neotest",
lazy = true,
dependencies = {
"nvim-neotest/nvim-nio",
"nvim-lua/plenary.nvim",
"antoinemadec/FixCursorHold.nvim",
"nvim-treesitter/nvim-treesitter",
-- Adapters
'V13Axel/neotest-pest',
-- "olimorris/neotest-phpunit",
},
config = function()
require('neotest').setup({
adapters = {
require('neotest-pest'),
-- require('neotest-phpunit'),
}
})
end
}

View File

@@ -1,6 +1,7 @@
-- Filesystem manager
vim.keymap.set('n', '-', '<CMD>Oil<CR>', { desc = 'Open parent directory' })
return {
'stevearc/oil.nvim',
---@module 'oil'

View File

@@ -0,0 +1,10 @@
return {
'MeanderingProgrammer/render-markdown.nvim',
dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.nvim' }, -- if you use the mini.nvim suite
-- dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.icons' }, -- if you use standalone mini plugins
-- dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons' }, -- if you prefer nvim-web-devicons
---@module 'render-markdown'
---@type render.md.UserConfig
opts = {},
ft = { 'markdown', 'codecompanion' },
}

24
lua/plugins/snacks.lua Normal file
View File

@@ -0,0 +1,24 @@
return {
'folke/snacks.nvim',
priority = 1000,
lazy = false,
---@type snacks.Config
opts = {
-- your configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
bigfile = { enabled = true },
dashboard = { enabled = true },
indent = { enabled = true },
input = { enabled = true },
notifier = { enabled = true },
quickfile = { enabled = true },
scope = { enabled = true },
-- scroll = { enabled = true },
statuscolumn = { enabled = true },
words = { enabled = true },
terminal = { enabled = true },
scratch = { enabled = true },
rename = { enabled = true },
},
}

4
lua/plugins/wakatime.lua Normal file
View File

@@ -0,0 +1,4 @@
return {
'wakatime/vim-wakatime',
lazy = false
}

9
lua/plugins/yanky.lua Normal file
View File

@@ -0,0 +1,9 @@
-- For when I'm ready
return {
-- "gbprod/yanky.nvim",
-- opts = {
-- -- your configuration comes here
-- -- or leave it empty to use the default settings
-- -- refer to the configuration section below
-- },
}