configs/nvim/lua/plugins/plugins.lua
Kacper Marzecki 759d1aa322 asd
2025-10-20 17:51:05 +02:00

315 lines
8.8 KiB
Lua

return {
{
"nvim-treesitter/nvim-treesitter",
lazy = false,
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 = {
-- does not work for some reason :(
-- use vib (visual in brackets) vic (visual in class) vif (visual in function) instead for now
-- also yib, yic, yif etc for copying
-- cib, cic, cif for changing etc. -- type `ya` and pause for a bit to look the options
-- or look at https://github.com/nvim-mini/mini.ai
node_incremental = "v",
node_decremental = "V",
},
},
},
},
{ "nvim-lualine/lualine.nvim" },
{
"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",
},
},
},
{
"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",
},
openrouter = {
endpoint = "https://openrouter.ai/api/v1",
secret = {
"echo ",
"$OPENROUTER_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 = {},
},
{
"nvim-mini/mini.keymap",
version = "*",
config = function()
local map_combo = require("mini.keymap").map_combo
-- Support most common modes. This can also contain 't', but would
-- only mean to press `<Esc>` inside terminal.
local mode = { "i", "c", "x", "s" }
map_combo(mode, "jk", "<BS><BS><Esc>")
-- To not have to worry about the order of keys, also map "kj"
map_combo(mode, "kj", "<BS><BS><Esc>")
-- Escape into Normal mode from Terminal mode
map_combo("t", "jk", "<BS><BS><C-\\><C-n>")
map_combo("t", "kj", "<BS><BS><C-\\><C-n>")
end,
},
{
"OXY2DEV/markview.nvim",
lazy = false,
},
}