dotfiles/dot_config/nvim/lua/wekuz/executable_plugins.lua
2026-03-29 00:52:51 +02:00

374 lines
15 KiB
Lua

return {
{
"olimorris/onedarkpro.nvim",
lazy = false,
priority = 1000,
config = function()
require("onedarkpro").setup({
options = {
transparency = true
}
})
vim.cmd.colorscheme("onedark")
end
},
{
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
config = function()
local configs = require("nvim-treesitter.configs")
configs.setup({
ensure_installed = {
"vimdoc", "lua", "markdown", "markdown_inline", "c", "cpp", "rust", "javascript",
"typescript", "html", "python", "json", "hyprlang"
},
sync_install = false,
auto_install = true,
ignore_install = { }
})
end
},
{
"nvim-treesitter/nvim-treesitter-textobjects",
event = "VeryLazy"
},
{
"williamboman/mason-lspconfig.nvim",
dependencies = {
"williamboman/mason.nvim",
"neovim/nvim-lspconfig",
"saghen/blink.cmp"
},
event = { "BufReadPre", "BufNewFile" },
config = function()
require("mason").setup()
require("mason-lspconfig").setup({
automatic_installation = true,
ensure_installed = { "lua_ls", "clangd", "rust_analyzer", "pyright", "marksman", "tailwindcss" }
})
local lspconfig = require("lspconfig")
local blinkCapabilities = require("blink.cmp").get_lsp_capabilities()
vim.lsp.config("lua_ls", {
settings = {
Lua = {
diagnostics = {
globals = { "vim" }
},
workspace = {
library = vim.api.nvim_get_runtime_file("", true)
},
telemetry = {
enable = false
}
}
},
capabilities = blinkCapabilities
})
vim.lsp.config("clangd", { capabilities = blinkCapabilities })
vim.lsp.config("rust_analyzer", { capabilities = blinkCapabilities })
vim.lsp.config("pyright", { capabilities = blinkCapabilities })
vim.lsp.config("marksman", { capabilities = blinkCapabilities })
vim.lsp.config("tailwindcss", {
filetypes = { "html", "css", "less", "postcss", "sass", "scss", "stylus", "sugarss" },
capabilities = blinkCapabilities
})
end
},
{
"saghen/blink.cmp",
dependencies = { "rafamadriz/friendly-snippets" },
version = "*",
opts = {
enabled = function()
return not vim.tbl_contains({ "text", "markdown" }, vim.bo.filetype)
and vim.bo.buftype ~= "prompt"
and vim.b.completion ~= false
end,
keymap = { preset = "default" },
appearance = {
nerd_font_variant = "mono"
},
signature = { enabled = true },
cmdline = {
enabled = true,
keymap = { preset = 'cmdline' },
sources = function()
local type = vim.fn.getcmdtype()
if type == '/' or type == '?' then return { 'buffer' } end
if type == ':' or type == '@' then return { 'cmdline' } end
return {}
end,
completion = {
trigger = {
show_on_blocked_trigger_characters = {},
show_on_x_blocked_trigger_characters = {},
},
list = {
selection = {
preselect = true,
auto_insert = true,
},
},
menu = { auto_show = true },
ghost_text = { enabled = true }
}
}
}
},
{
"folke/trouble.nvim",
opts = { },
cmd = "Trouble",
keys = {
{
"<leader>xx",
"<cmd>Trouble diagnostics toggle<cr>",
desc = "Diagnostics (Trouble)",
},
{
"<leader>xX",
"<cmd>Trouble diagnostics toggle filter.buf=0<cr>",
desc = "Buffer Diagnostics (Trouble)"
},
{
"<leader>cs",
"<cmd>Trouble symbols toggle focus=false<cr>",
desc = "Symbols (Trouble)"
},
{
"<leader>cl",
"<cmd>Trouble lsp toggle focus=false win.position=right<cr>",
desc = "LSP Definitions / references / ... (Trouble)"
},
{
"<leader>xL",
"<cmd>Trouble loclist toggle<cr>",
desc = "Location List (Trouble)"
},
{
"<leader>xQ",
"<cmd>Trouble qflist toggle<cr>",
desc = "Quickfix List (Trouble)"
},
}
},
{
"nvim-pack/nvim-spectre",
config = function()
local spectre = require("spectre")
vim.keymap.set("n", "<leader>ss", function() spectre.toggle() end, { desc = "Spectre toggle" })
vim.keymap.set("n", "<leader>sw", function() require("spectre").open_visual({ select_word = true }) end, { desc = "Spectre search current word" })
vim.keymap.set("v", "<leader>sw", function() require("spectre").open_visual() end, { desc = "Spectre search current word" })
vim.keymap.set("n", "<leader>sf", function() require("spectre").open_file_search({ select_word = true }) end, { desc = "Spectre search current word in current file" })
vim.keymap.set("v", "<leader>sf", function() require("spectre").open_file_search() end, { desc = "Spectre search current word in current file" })
spectre.setup({
is_block_ui_break = true
})
end
},
{
"kdheepak/lazygit.nvim",
lazy = true,
cmd = {
"LazyGit",
"LazyGitConfig",
"LazyGitCurrentFile",
"LazyGitFilter",
"LazyGitFilterCurrentFile",
},
dependencies = {
"nvim-lua/plenary.nvim",
},
keys = {
{ "<leader>lg", "<cmd>LazyGit<cr>", desc = "LazyGit" }
}
},
{
"nvim-telescope/telescope.nvim",
branch = "0.1.x",
dependencies = { "nvim-lua/plenary.nvim", "nvim-telescope/telescope-fzf-native.nvim" },
config = function()
require("telescope").load_extension("fzf")
local builtin = require("telescope.builtin")
vim.keymap.set("n", "<leader>ff", builtin.find_files, { desc = "Telescope find files" })
vim.keymap.set("n", "<leader>fg", builtin.git_files, { desc = "Telescope git files" })
vim.keymap.set("n", "<leader>fs", builtin.live_grep, { desc = "Telescope live grep" })
vim.keymap.set("n", "<leader>fw", function()
local word = vim.fn.expand("<cword>")
builtin.grep_string({ search = word })
end, { desc = "Telescope grep current word" })
vim.keymap.set("n", "<leader>fW", function()
local word = vim.fn.expand("<cWORD>")
builtin.grep_string({ search = word })
end, { desc = "Telescope grep current WORD" })
end
},
{
"nvim-telescope/telescope-fzf-native.nvim",
build = "cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_POLICY_VERSION_MINIMUM=3.5 && cmake --build build --config Release"
},
{
"mbbill/undotree"
},
{
"folke/todo-comments.nvim",
dependencies = { "nvim-lua/plenary.nvim" },
config = function(_, opts)
require("todo-comments").setup(opts)
vim.keymap.set("n", "Tn", function() require("todo-comments").jump_next() end, { desc = "Next todo comment" })
vim.keymap.set("n", "TN", function() require("todo-comments").jump_prev() end, { desc = "Previous todo comment" })
end,
opts = {
signs = true, -- show icons in the signs column
sign_priority = 8, -- sign priority
keywords = {
BUG = {
icon = "", -- icon used for the sign, and in search results
color = "error", -- can be a hex color, or a named color (see below)
alt = { "FIX", "FIXME", "FIXIT", "ISSUE" }
},
TODO = { icon = "", color = "info" },
HACK = { icon = "", color = "warning" },
WARN = { icon = "", color = "warning", alt = { "WARNING", "XXX" } },
PERF = { icon = "", alt = { "OPTIM", "PERFORMANCE", "OPTIMIZE" } },
NOTE = { icon = "", color = "hint", alt = { "INFO" } },
TEST = { icon = "", color = "test", alt = { "TESTING", "PASSED", "FAILED" } }
},
gui_style = {
fg = "NONE", -- The gui style to use for the fg highlight group.
bg = "BOLD" -- The gui style to use for the bg highlight group.
},
merge_keywords = true, -- when true, custom keywords will be merged with the defaults
highlight = {
multiline = true, -- enable multine todo comments
multiline_pattern = "^.", -- lua pattern to match the next multiline from the start of the matched keyword
multiline_context = 10, -- extra lines that will be re-evaluated when changing a line
before = "", -- "fg" or "bg" or empty
keyword = "bg", -- "fg", "bg", "wide", "wide_bg", "wide_fg" or empty. (wide and wide_bg is the same as bg, but will also highlight surrounding characters, wide_fg acts accordingly but with fg)
after = "fg", -- "fg" or "bg" or empty
pattern = [[.*<(KEYWORDS)\s*:]], -- pattern or table of patterns, used for highlighting (vim regex)
comments_only = true, -- uses treesitter to match keywords in comments only
max_line_len = 400, -- ignore lines longer than this
exclude = {}, -- list of file types to exclude highlighting
},
colors = {
error = { "DiagnosticError", "ErrorMsg", "#DC2626" },
warning = { "DiagnosticWarn", "WarningMsg", "#FBBF24" },
info = { "DiagnosticInfo", "#2563EB" },
hint = { "DiagnosticHint", "#10B981" },
default = { "Identifier", "#7C3AED" },
test = { "Identifier", "#FF00FF" }
},
search = {
command = "rg",
args = {
"--color=never",
"--no-heading",
"--with-filename",
"--line-number",
"--column"
},
pattern = [[\b(KEYWORDS):]]
}
}
},
{
"nvim-tree/nvim-web-devicons",
lazy = true
},
{
"epwalsh/obsidian.nvim",
version = "*",
lazy = true,
event = {
"BufEnter " .. vim.fn.expand "~" .. "/Obsidian*"
},
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-telescope/telescope.nvim",
"nvim-treesitter/nvim-treesitter"
},
opts = {
workspaces = {
{
name = "personal",
path = "~/Obsidian/personal",
}
},
notes_subdir = "Notes",
daily_notes = {
folder = "Notes/Daily",
date_format = "%Y-%m-%d",
alias_format = "%B %-d, %Y",
default_tags = { "Daily-notes" },
template = nil
},
--completion = {
-- nvim_cmp = true,
-- min_chars = 1
--},
new_notes_location = "notes_subdir",
note_path_func = function(spec)
local path = spec.dir / spec.title
return path:with_suffix(".md")
end,
preferred_link_style = "wiki",
disable_frontmatter = true,
templates = {
folder = "Templates",
date_format = "%Y-%m-%d",
time_format = "%H:%M",
substitutions = {},
},
picker = {
name = "telescope.nvim",
note_mappings = {
new = "<C-x>",
insert_link = "<C-l>",
},
tag_mappings = {
tag_note = "<C-x>",
insert_tag = "<C-l>",
},
},
ui = {
enable = true,
update_debounce = 200,
max_file_length = 5000,
checkboxes = {
[" "] = { char = "󰄱", hl_group = "ObsidianTodo" },
["x"] = { char = "", hl_group = "ObsidianDone" },
[">"] = { char = "", hl_group = "ObsidianRightArrow" },
["~"] = { char = "󰰱", hl_group = "ObsidianTilde" },
["!"] = { char = "", hl_group = "ObsidianImportant" }
},
bullets = { char = "", hl_group = "ObsidianBullet" },
external_link_icon = { char = "", hl_group = "ObsidianExtLinkIcon" },
reference_text = { hl_group = "ObsidianRefText" },
highlight_text = { hl_group = "ObsidianHighlightText" },
tags = { hl_group = "ObsidianTag" },
block_ids = { hl_group = "ObsidianBlockID" },
hl_groups = {
ObsidianTodo = { bold = true, fg = "#f78c6c" },
ObsidianDone = { bold = true, fg = "#89ddff" },
ObsidianRightArrow = { bold = true, fg = "#f78c6c" },
ObsidianTilde = { bold = true, fg = "#ff5370" },
ObsidianImportant = { bold = true, fg = "#d73128" },
ObsidianBullet = { bold = true, fg = "#89ddff" },
ObsidianRefText = { underline = true, fg = "#c792ea" },
ObsidianExtLinkIcon = { fg = "#c792ea" },
ObsidianTag = { italic = true, fg = "#89ddff" },
ObsidianBlockID = { italic = true, fg = "#89ddff" },
ObsidianHighlightText = { bg = "#75662e" }
},
}
},
keys = {
{
"fn",
"<cmd>ObsidianQuickSwitch<cr>",
desc = "Switch between Obsidian notes"
}
}
}
}