configs/nvim/lua/plugins/plugins.lua
Kacper Marzecki 817d3269d6 reorg nvim
2025-10-14 18:18:07 +02:00

310 lines
8.2 KiB
Lua

local function masterBranch(dep)
return {
dep,
branch = "master",
}
end
return {
{
"nvim-treesitter/nvim-treesitter",
opts = {
ensure_installed = {
"bash",
"html",
"javascript",
"json",
"lua",
"markdown",
"markdown_inline",
"python",
"query",
"regex",
"tsx",
"typescript",
"vim",
"yaml",
"heex",
"elixir",
},
highlight = { enable = true },
indent = { enable = true },
incremental_selection = {
enable = true,
keymaps = {
node_incremental = "v",
node_decremental = "V",
},
},
},
},
{ "nvim-lualine/lualine.nvim" },
-- {
-- "nvim-neotest/neotest",
-- dependencies = {
-- "jfpedroza/neotest-elixir",
-- },
-- opts = {
-- adapters = {
-- ["neotest-elixir"] = {},
-- },
-- },
-- },
{
"neovim/nvim-lspconfig",
opts = {
servers = {
-- disable to prevent elixir extra to install it automatically
elixirls = false,
},
},
},
{ "chrisgrieser/nvim-spider", lazy = true },
{
"ibhagwan/fzf-lua",
opts = {
buffers = {
actions = {
["ctrl-w"] = { fn = require("fzf-lua.actions").buf_del, reload = true },
},
},
},
},
{
"MagicDuck/grug-far.nvim",
opts = { headerMaxWidth = 80 },
cmd = "GrugFar",
keys = {
{
"<leader>sr",
function()
local grug = require("grug-far")
local ext = vim.bo.buftype == "" and vim.fn.expand("%:e")
grug.open({
transient = true,
prefills = {
filesFilter = ext and ext ~= "" and "*." .. ext or nil,
},
})
end,
mode = { "n", "v" },
desc = "Search and Replace",
},
},
},
-- {
-- "garymjr/nvim-snippets",
-- opts = {
-- search_paths = { "/Users/kacper.marzecki@schibsted.com/.snippets" },
-- },
-- },
{
"folke/snacks.nvim",
opts = {
-- dashboard = { enabled = false },
-- scratch = { enabled = false },
-- terminal = { enabled = false },
scroll = { enabled = false },
-- indent = { enabled = false },
},
},
{
"folke/zen-mode.nvim",
keys = {
{
"<leader>z",
"<cmd>ZenMode<CR>",
desc = "Zen Mode",
},
},
opts = {
window = {
backdrop = 0.95, -- shade the backdrop of the Zen window. Set to 1 to keep the same as Normal
-- height and width can be:
-- * an absolute number of cells when > 1
-- * a percentage of the width / height of the editor when <= 1
-- * a function that returns the width or the height
width = 120, -- width of the Zen window
height = 1, -- height of the Zen window
-- by default, no options are changed for the Zen window
-- uncomment any of the options below, or add other vim.wo options you want to apply
options = {
-- signcolumn = "no", -- disable signcolumn
-- number = false, -- disable number column
-- relativenumber = false, -- disable relative numbers
-- cursorline = false, -- disable cursorline
-- cursorcolumn = false, -- disable cursor column
-- foldcolumn = "0", -- disable fold column
-- list = false, -- disable whitespace characters
},
},
plugins = {
-- disable some global vim options (vim.o...)
-- comment the lines to not apply the options
options = {
enabled = true,
ruler = false, -- disables the ruler text in the cmd line area
showcmd = false, -- disables the command in the last line of the screen
-- you may turn on/off statusline in zen mode by setting 'laststatus'
-- statusline will be shown only if 'laststatus' == 3
laststatus = 0, -- turn off the statusline in zen mode
},
twilight = { enabled = true }, -- enable to start Twilight when zen mode opens
gitsigns = { enabled = false }, -- disables git signs
tmux = { enabled = false }, -- disables the tmux statusline
todo = { enabled = false }, -- if set to "true", todo-comments.nvim highlights will be disabled
-- this will change the font size on kitty when in zen mode
-- to make this work, you need to set the following kitty options:
-- - allow_remote_control socket-only
-- - listen_on unix:/tmp/kitty
kitty = {
enabled = false,
font = "+4", -- font size increment
},
-- this will change the font size on alacritty when in zen mode
-- requires Alacritty Version 0.10.0 or higher
-- uses `alacritty msg` subcommand to change font size
alacritty = {
enabled = false,
font = "14", -- font size
},
-- this will change the font size on wezterm when in zen mode
-- See alse also the Plugins/Wezterm section in this projects README
wezterm = {
enabled = false,
-- can be either an absolute font size or the number of incremental steps
font = "+4", -- (10% increase per step)
},
},
on_open = function(win) end,
on_close = function() end,
},
},
{
"nvim-telescope/telescope.nvim",
enabled = true,
opts = {
defaults = {
mappings = {
i = {
["<C-h>"] = "which_key",
["<C-j>"] = "move_selection_next",
["<C-k>"] = "move_selection_previous",
},
},
},
},
keys = {
{
"<leader>,",
false,
},
},
},
{
"tomasky/bookmarks.nvim",
dependencies = { "nvim-telescope/telescope.nvim" },
config = function(_, opts)
require("bookmarks").setup(opts)
require("telescope").load_extension("bookmarks")
end,
},
{
"gpanders/nvim-parinfer",
},
{ "EdenEast/nightfox.nvim", opts = {
colorblind = {
enable = true,
},
} },
{ "catppuccin/nvim", name = "catppuccin" },
{
"folke/tokyonight.nvim",
opts = {
transparent = true,
styles = {
sidebars = "transparent",
floats = "transparent",
},
},
},
{
"robitx/gp.nvim",
opts = {
agents = {
{
provider = "ollama",
name = "warhammer",
chat = true,
command = false,
-- string with model name or table with model name and parameters
model = {
model = "llama3",
temperature = 0.6,
top_p = 1,
min_p = 0.05,
},
-- system prompt (use this to specify the persona/role of the AI)
system_prompt = "You are a general AI assistant.",
},
},
providers = {
ollama = {
endpoint = "http://localhost:11434/v1/chat/completions",
},
openai = {
endpoint = "https://api.openai.com/v1/chat/completions",
secret = {
"echo ",
"$OPENAI_API_KEY",
},
},
},
},
},
{
"vhyrro/luarocks.nvim",
priority = 1000,
opts = {
luarocks_build_args = {
"--with-lua-include=/usr/include",
},
},
},
{ "akinsho/toggleterm.nvim", version = "*", config = true },
{
"ThePrimeagen/harpoon",
branch = "harpoon2",
dependencies = { "nvim-lua/plenary.nvim" },
opts = {
file_with_line = {
create_list_item = function()
local file_path = vim.fn.expand("%:p") -- Absolute file path
local line_number = vim.fn.line(".")
if file_path == "" then
return nil
end
return {
value = file_path .. ":" .. line_number,
context = { file_path = file_path, line_number = line_number },
}
end,
select = function(list_item, list, option)
vim.cmd("edit " .. list_item.context.file_path)
-- Jump to the line
vim.api.nvim_win_set_cursor(0, { list_item.context.line_number, 0 })
end,
},
},
},
{
"sindrets/diffview.nvim",
opts = {},
},
}