added everythig

This commit is contained in:
liph22
2025-12-19 23:40:16 +01:00
parent 438be2a491
commit 3a741ac23c
148 changed files with 12034 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
{
"diagnostics.globals": [
"vim",
" false",
" "
],
"runtime.unicodeName": true,
"diagnostics.disable": [
"undefined-doc-name"
]
}

View File

@@ -0,0 +1,41 @@
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
-- Only enable spell checking for specific filetypes
vim.api.nvim_create_autocmd("FileType", {
pattern = { "markdown", "text", "gitcommit", "tex" },
callback = function()
vim.opt_local.spell = true
vim.opt_local.spelllang = "en_us,de"
end,
})
require("vim-options")
require("lazy").setup("plugins")
require("lualine").setup({
sections = {
lualine_x = {
{
require("noice").api.statusline.mode.get,
cond = require("noice").api.statusline.mode.has,
color = { fg = "#ff9e64" },
},
},
},
})
require("lazy").setup({
{
"tzachar/cmp-tabnine",
build = "./install.sh",
dependencies = "hrsh7th/nvim-cmp",
},
})

View File

@@ -0,0 +1,35 @@
vim.cmd("set expandtab")
vim.cmd("set tabstop=2")
vim.cmd("set softtabstop=2")
vim.cmd("set shiftwidth=2")
vim.g.mapleader = " "
-- Bootstrap lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
{ out, "WarningMsg" },
{ "\nPress any key to exit..." },
}, true, {})
vim.fn.getchar()
os.exit(1)
end
end
vim.opt.rtp:prepend(lazypath)
-- Make sure to setup `mapleader` and `maplocalleader` before
-- loading lazy.nvim so that mappings are correct.
-- This is also a good place to setup other settings (vim.opt)
vim.g.mapleader = " "
vim.g.maplocalleader = "\\"
-- Setup lazy.nvim
require("vim-options")
require("lazy").setup("plugins")

View File

@@ -0,0 +1,54 @@
{
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
"LuaSnip": { "branch": "master", "commit": "fb525166ccc30296fb3457441eb979113de46b00" },
"alpha-nvim": { "branch": "main", "commit": "3979b01cb05734331c7873049001d3f2bb8477f4" },
"barbecue": { "branch": "main", "commit": "cd7e7da622d68136e13721865b4d919efd6325ed" },
"catppuccin": { "branch": "main", "commit": "ce8d176faa4643e026e597ae3c31db59b63cef09" },
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
"cmp-cmdline": { "branch": "main", "commit": "d126061b624e0af6c3a556428712dd4d4194ec6d" },
"cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" },
"cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" },
"cmp-tabnine": { "branch": "main", "commit": "c0167cdc86c15e782c5461ee62aebee89231c2ed" },
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
"dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" },
"flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" },
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
"fzf-lua": { "branch": "main", "commit": "9d579feab4d3035627150e5e9b6e8fbf5e814ef6" },
"gitsigns.nvim": { "branch": "main", "commit": "5813e4878748805f1518cee7abb50fd7205a3a48" },
"grapple.nvim": { "branch": "main", "commit": "b41ddfc1c39f87f3d1799b99c2f0f1daa524c5f7" },
"harpoon": { "branch": "harpoon2", "commit": "87b1a3506211538f460786c23f98ec63ad9af4e5" },
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
"lazydev.nvim": { "branch": "main", "commit": "5231c62aa83c2f8dc8e7ba957aa77098cda1257d" },
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
"luvit-meta": { "branch": "main", "commit": "0ea4ff636c5bb559ffa78108561d0976f4de9682" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "3b3571b4dadbcb464804466e9872e7246c316af7" },
"mason.nvim": { "branch": "main", "commit": "57e5a8addb8c71fb063ee4acda466c7cf6ad2800" },
"neo-tree.nvim": { "branch": "v3.x", "commit": "f3df514fff2bdd4318127c40470984137f87b62e" },
"neogit": { "branch": "master", "commit": "d8bf9102692250193b855acd9025a826f1af2729" },
"noice.nvim": { "branch": "main", "commit": "7bfd942445fb63089b59f97ca487d605e715f155" },
"none-ls.nvim": { "branch": "main", "commit": "5abf61927023ea83031753504adb19630ba80eef" },
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
"nvim-autopairs": { "branch": "master", "commit": "c2a0dd0d931d0fb07665e1fedb1ea688da3b80b4" },
"nvim-cmp": { "branch": "main", "commit": "d97d85e01339f01b842e6ec1502f639b080cb0fc" },
"nvim-lspconfig": { "branch": "master", "commit": "c4f67bf85b01a57e3c130352c0a0e453ab8cd5b9" },
"nvim-navic": { "branch": "master", "commit": "7d914a39a1ef8f4e22c2c4381abeef7c556f5a13" },
"nvim-notify": { "branch": "master", "commit": "8701bece920b38ea289b457f902e2ad184131a5d" },
"nvim-spectre": { "branch": "master", "commit": "72f56f7585903cd7bf92c665351aa585e150af0f" },
"nvim-tmux-navigation": { "branch": "main", "commit": "4898c98702954439233fdaf764c39636681e2861" },
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "1b212c2eee76d787bbea6aa5e92a2b534e7b4f8f" },
"nvim-web-devicons": { "branch": "master", "commit": "8dcb311b0c92d460fac00eac706abd43d94d68af" },
"obsidian.nvim": { "branch": "main", "commit": "ae1f76a75c7ce36866e1d9342a8f6f5b9c2caf9b" },
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
"portal.nvim": { "branch": "main", "commit": "77d9d53fec945bfa407d5fd7120f1b4f117450ed" },
"projections.nvim": { "branch": "main", "commit": "f18a8505f84f45a0fe024cafca5b969447f63cd5" },
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
"telescope.nvim": { "branch": "master", "commit": "3d757e586ff0bfc85bdb7b46c9d3d932147a0cde" },
"trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" },
"vim-test": { "branch": "master", "commit": "1eeb12774a0f251571700ccf68da27789b2f0852" },
"vimux": { "branch": "master", "commit": "614f0bb1fb598f97accdcea71d5f7b18d7d62436" },
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" },
"yazi.nvim": { "branch": "main", "commit": "275c195596c857955f4627a8b48b68144d79478f" }
}

View File

@@ -0,0 +1,9 @@
return {
{
"hrsh7th/cmp-path", -- file and folders
"hrsh7th/cmp-buffer", -- words from the current buffer
"hrsh7th/cmp-nvim-lsp", -- LSP-based autocompletions
"hrsh7th/cmp-cmdline", -- Command-line autocompletions
"tzachar/cmp-tabnine"--, build = "./install.sh",
},
}

View File

@@ -0,0 +1,60 @@
return {
{
"williamboman/mason.nvim",
lazy = false,
config = function()
require("mason").setup()
end,
},
{
"williamboman/mason-lspconfig.nvim",
lazy = false,
opts = {
auto_install = true,
},
},
{
"neovim/nvim-lspconfig",
lazy = false,
config = function()
local capabilities = require('cmp_nvim_lsp').default_capabilities()
-- Define server configurations
local servers = {
ts_ls = {},
solargraph = {},
html = {},
lua_ls = {},
pyright = {},
-- ltex = {
-- cmd_env = {
-- JAVA_TOOL_OPTIONS = "-Djdk.xml.totalEntitySizeLimit=0 -Djdk.xml.entityExpansionLimit=0"
-- },
-- filetypes = { "markdown", "text", "tex", "gitcommit" },
-- settings = {
-- ltex = {
-- language = "en-US",
-- additionalRules = {
-- enablePickyRules = true,
-- motherTongue = "de-DE",
-- },
-- }
-- }
-- },
}
-- Setup each server with the new API
for server, config in pairs(servers) do
config.capabilities = capabilities
vim.lsp.config[server] = config
vim.lsp.enable(server)
end
-- LSP keymaps
vim.keymap.set("n", "K", vim.lsp.buf.hover, {})
vim.keymap.set("n", "<leader>gd", vim.lsp.buf.definition, {})
vim.keymap.set("n", "<leader>gr", vim.lsp.buf.references, {})
vim.keymap.set("n", "<leader>ca", vim.lsp.buf.code_action, {})
end,
},
}

View File

@@ -0,0 +1,46 @@
return {
{
"williamboman/mason.nvim",
lazy = false,
config = function()
require("mason").setup()
end,
},
{
"williamboman/mason-lspconfig.nvim",
lazy = false,
opts = {
auto_install = true,
},
},
{
"neovim/nvim-lspconfig",
lazy = false,
config = function()
local capabilities = require('cmp_nvim_lsp').default_capabilities()
local lspconfig = require("lspconfig")
lspconfig.ts_ls.setup({
capabilities = capabilities
})
lspconfig.solargraph.setup({
capabilities = capabilities
})
lspconfig.html.setup({
capabilities = capabilities
})
lspconfig.lua_ls.setup({
capabilities = capabilities
})
lspconfig.pyright.setup({
capabilities = capabilities
})
vim.keymap.set("n", "K", vim.lsp.buf.hover, {})
vim.keymap.set("n", "<leader>gd", vim.lsp.buf.definition, {})
vim.keymap.set("n", "<leader>gr", vim.lsp.buf.references, {})
vim.keymap.set("n", "<leader>ca", vim.lsp.buf.code_action, {})
end,
},
}

View File

@@ -0,0 +1,84 @@
return {
{
"iamcco/markdown-preview.nvim",
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
ft = { "markdown" },
build = function()
vim.fn["mkdp#util#install"]()
end,
config = function()
-- Set to 1 to open preview in browser automatically when entering markdown buffer
vim.g.mkdp_auto_start = 0
-- Set to 1 to auto close preview when switching away from markdown buffer
vim.g.mkdp_auto_close = 1
-- Set to 1 to refresh on save only, 0 to refresh on every change
vim.g.mkdp_refresh_slow = 0
-- Specify browser to open preview page
-- Can be 'firefox', 'chrome', etc. or leave empty for default
vim.g.mkdp_browser = ""
-- Set to 1 to echo preview page URL in command line
vim.g.mkdp_echo_preview_url = 0
-- Options for markdown rendering
-- mkit: markdown-it options for rendering
-- katex: KaTeX options for math typesetting
-- uml: markdown-it-plantuml options
vim.g.mkdp_preview_options = {
mkit = {},
katex = {},
uml = {},
maid = {},
disable_sync_scroll = 0,
sync_scroll_type = "middle",
hide_yaml_meta = 1,
sequence_diagrams = {},
flowchart_diagrams = {},
content_editable = false,
disable_filename = 0,
toc = {},
}
-- Use custom markdown style (absolute path or URL)
vim.g.mkdp_markdown_css = ""
-- Use custom highlight style (absolute path or URL)
vim.g.mkdp_highlight_css = ""
-- Custom port for preview server (empty = auto select)
vim.g.mkdp_port = ""
-- Theme: 'dark' or 'light'
vim.g.mkdp_theme = "dark"
-- Combine preview window (set to 1 to combine multiple markdown preview windows)
vim.g.mkdp_combine_preview = 0
-- Auto-start preview when entering markdown buffer
vim.g.mkdp_auto_start = 0
end,
keys = {
{
"<leader>mp",
"<cmd>MarkdownPreviewToggle<cr>",
desc = "Markdown Preview Toggle",
ft = "markdown",
},
{
"<leader>ms",
"<cmd>MarkdownPreview<cr>",
desc = "Markdown Preview Start",
ft = "markdown",
},
{
"<leader>mS",
"<cmd>MarkdownPreviewStop<cr>",
desc = "Markdown Preview Stop",
ft = "markdown",
},
},
},
}

View File

@@ -0,0 +1,21 @@
return {
"nvimtools/none-ls.nvim",
config = function()
local null_ls = require("null-ls")
null_ls.setup({
sources = {
null_ls.builtins.formatting.stylua,
null_ls.builtins.formatting.prettier,
-- null_ls.builtins.diagnostics.eslint_d,
null_ls.builtins.diagnostics.rubocop,
null_ls.builtins.formatting.rubocop,
null_ls.builtins.formatting.black,
null_ls.builtins.formatting.isort,
null_ls.builtins.diagnostics.pylint,
},
})
vim.keymap.set("n", "<leader>gf", vim.lsp.buf.format, {})
end,
}

View File

@@ -0,0 +1,8 @@
-- return {
-- "stevearc/oil.nvim",
-- config = function()
-- local oil = require("oil")
-- oil.setup()
-- vim.keymap.set("n", "-", oil.toggle_float, {})
-- end,
--}

View File

@@ -0,0 +1,5 @@
return {
"vinnymeller/swagger-preview.nvim",
build = "npm install -g swagger-ui-watcher",
config = true,
}

View File

@@ -0,0 +1,26 @@
return {
{
"nvim-telescope/telescope-ui-select.nvim",
},
{
"nvim-telescope/telescope.nvim",
tag = "0.1.5",
dependencies = { "nvim-lua/plenary.nvim" },
config = function()
require("telescope").setup({
extensions = {
["ui-select"] = {
require("telescope.themes").get_dropdown({}),
},
},
})
local builtin = require("telescope.builtin")
vim.keymap.set("n", "<C-p>", builtin.find_files, {})
vim.keymap.set("n", "<leader>fg", builtin.live_grep, {})
vim.keymap.set("n", "<leader><leader>", builtin.oldfiles, {})
require("telescope").load_extension("ui-select")
require("telescope").load_extension("noice")
end,
},
}

View File

@@ -0,0 +1 @@
return {}

View File

@@ -0,0 +1,31 @@
return {
"goolord/alpha-nvim",
dependencies = {
"nvim-tree/nvim-web-devicons",
},
config = function()
local alpha = require("alpha")
local dashboard = require("alpha.themes.startify")
dashboard.section.header.val = {
[[ ]],
[[ ]],
[[ ]],
[[ ]],
[[  ]],
[[ ████ ██████ █████ ██ ]],
[[ ███████████ █████  ]],
[[ █████████ ███████████████████ ███ ███████████ ]],
[[ █████████ ███ █████████████ █████ ██████████████ ]],
[[ █████████ ██████████ █████████ █████ █████ ████ █████ ]],
[[ ███████████ ███ ███ █████████ █████ █████ ████ █████ ]],
[[ ██████ █████████████████████ ████ █████ █████ ████ ██████ ]],
[[ ]],
[[ ]],
[[ ]],
}
alpha.setup(dashboard.opts)
end,
}

View File

@@ -0,0 +1,96 @@
return {
{
"windwp/nvim-autopairs",
event = "InsertEnter",
dependencies = {
"hrsh7th/nvim-cmp",
},
config = function()
local autopairs = require("nvim-autopairs")
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
local cmp = require("cmp")
autopairs.setup({
check_ts = true, -- Enable treesitter
ts_config = {
lua = { "string" }, -- Don't add pairs in lua string treesitter nodes
javascript = { "template_string" }, -- Don't add pairs in JS template strings
java = false, -- Don't check treesitter on java
},
disable_filetype = { "TelescopePrompt", "vim" },
disable_in_macro = true, -- Disable when recording or executing a macro
disable_in_visualblock = false, -- Disable when in visual block mode
disable_in_replace_mode = true,
ignored_next_char = [=[[%w%%%'%[%"%.%`%$]]=],
enable_moveright = true,
enable_afterquote = true, -- Add bracket pairs after quote
enable_check_bracket_line = true, -- Check bracket in same line
enable_bracket_in_quote = true,
enable_abbr = false, -- Trigger abbreviation
break_undo = true, -- Switch for basic rule break undo sequence
check_comma = true,
map_cr = true,
map_bs = true, -- Map the <BS> key
map_c_h = false, -- Map the <C-h> key to delete a pair
map_c_w = false, -- Map <c-w> to delete a pair if possible
})
-- Integration with nvim-cmp
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())
-- Treesitter rules
local ts_conds = require("nvim-autopairs.ts-conds")
-- Press % => %% only while inside a comment or string
autopairs.add_rules({
require("nvim-autopairs.rule")("%", "%", "lua")
:with_pair(ts_conds.is_ts_node({ "string", "comment" })),
require("nvim-autopairs.rule")("$", "$", "lua")
:with_pair(ts_conds.is_not_ts_node({ "function" })),
})
-- Add spaces between parentheses
local Rule = require("nvim-autopairs.rule")
local cond = require("nvim-autopairs.conds")
autopairs.add_rules({
Rule(" ", " ")
:with_pair(function(opts)
local pair = opts.line:sub(opts.col - 1, opts.col)
return vim.tbl_contains({ "()", "[]", "{}" }, pair)
end)
:with_move(cond.none())
:with_cr(cond.none())
:with_del(function(opts)
local col = vim.api.nvim_win_get_cursor(0)[2]
local context = opts.line:sub(col - 1, col + 2)
return vim.tbl_contains({ "( )", "[ ]", "{ }" }, context)
end),
Rule("", " )")
:with_pair(cond.none())
:with_move(function(opts)
return opts.char == ")"
end)
:with_cr(cond.none())
:with_del(cond.none())
:use_key(")"),
Rule("", " }")
:with_pair(cond.none())
:with_move(function(opts)
return opts.char == "}"
end)
:with_cr(cond.none())
:with_del(cond.none())
:use_key("}"),
Rule("", " ]")
:with_pair(cond.none())
:with_move(function(opts)
return opts.char == "]"
end)
:with_cr(cond.none())
:with_del(cond.none())
:use_key("]"),
})
end,
},
}

View File

@@ -0,0 +1,99 @@
return {
{
"utilyre/barbecue.nvim",
name = "barbecue",
version = "*",
dependencies = {
"SmiteshP/nvim-navic",
"nvim-tree/nvim-web-devicons",
},
event = { "BufReadPost", "BufNewFile" },
config = function()
require("barbecue").setup({
-- Create autocmd to attach to LSP
attach_navic = true,
-- Create user commands
create_autocmd = true,
-- Whether to show/use file icons
show_modified = false,
-- Whether to show file path
show_dirname = true,
-- Whether to show basename
show_basename = true,
-- Filetypes to exclude
exclude_filetypes = { "netrw", "toggleterm", "alpha", "NvimTree" },
-- Modifiers to apply to dirname
modifiers = {
dirname = ":~:.",
basename = "",
},
-- Whether to display path to file
show_navic = true,
-- Custom section
custom_section = function()
return " "
end,
-- Theme configuration
theme = "auto", -- 'auto', 'tokyonight', 'catppuccin', etc.
-- Symbols for different node kinds
kinds = {
File = "",
Module = "",
Namespace = "",
Package = "",
Class = "",
Method = "",
Property = "",
Field = "",
Constructor = "",
Enum = "",
Interface = "",
Function = "",
Variable = "",
Constant = "",
String = "",
Number = "",
Boolean = "",
Array = "",
Object = "",
Key = "",
Null = "",
EnumMember = "",
Struct = "",
Event = "",
Operator = "",
TypeParameter = "",
},
})
end,
},
{
"SmiteshP/nvim-navic",
dependencies = {
"neovim/nvim-lspconfig",
},
opts = {
lsp = {
auto_attach = true,
preference = nil,
},
highlight = true,
separator = " > ",
depth_limit = 0,
depth_limit_indicator = "..",
safe_output = true,
lazy_update_context = false,
click = false,
},
},
}

View File

@@ -0,0 +1,11 @@
return {
{
"catppuccin/nvim",
lazy = false,
name = "catppuccin",
priority = 1000,
config = function()
vim.cmd.colorscheme "catppuccin-mocha"
end
}
}

View File

@@ -0,0 +1,24 @@
return {
{
"hrsh7th/cmp-nvim-lsp",
},
{
"L3MON4D3/LuaSnip",
dependencies = {
"saadparwaiz1/cmp_luasnip",
"rafamadriz/friendly-snippets",
},
},
{
"hrsh7th/nvim-cmp",
dependencies = {
"hrsh7th/cmp-path",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-cmdline",
},
},
{
"tzachar/cmp-tabnine",
build = "./install.sh",
},
}

View File

@@ -0,0 +1,56 @@
return {
{
"numToStr/Comment.nvim",
event = { "BufReadPre", "BufNewFile" },
dependencies = {
"JoosepAlviste/nvim-ts-context-commentstring",
},
config = function()
local comment = require("Comment")
local ts_context_commentstring = require("ts_context_commentstring.integrations.comment_nvim")
comment.setup({
-- Add a space between comment and the line
padding = true,
-- Whether the cursor should stay at its position
sticky = true,
-- Lines to be ignored while (un)comment
ignore = "^$",
-- LHS of toggle mappings in NORMAL mode
toggler = {
line = "gcc", -- Line-comment toggle keymap
block = "gbc", -- Block-comment toggle keymap
},
-- LHS of operator-pending mappings in NORMAL and VISUAL mode
opleader = {
line = "gc", -- Line-comment keymap
block = "gb", -- Block-comment keymap
},
-- LHS of extra mappings
extra = {
above = "gcO", -- Add comment on the line above
below = "gco", -- Add comment on the line below
eol = "gcA", -- Add comment at the end of line
},
-- Enable keybindings
-- NOTE: If given `false` then the plugin won't create any mappings
mappings = {
basic = true,
extra = true,
},
-- Function to call before (un)comment
pre_hook = ts_context_commentstring.create_pre_hook(),
-- Function to call after (un)comment
post_hook = nil,
})
end,
},
}

View File

@@ -0,0 +1,45 @@
return {
{
"hrsh7th/cmp-nvim-lsp",
},
{
"L3MON4D3/LuaSnip",
-- follow latest release.
version = "v2.*", -- Replace <CurrentMajor> by the latest released major (first number of latest release)
-- install jsregexp (optional!).
build = "make install_jsregexp"
},
{
"hrsh7th/nvim-cmp",
config = function()
local cmp = require("cmp")
require("luasnip.loaders.from_vscode").lazy_load()
cmp.setup({
snippet = {
expand = function(args)
require("luasnip").lsp_expand(args.body)
end,
},
window = {
completion = cmp.config.window.bordered(),
documentation = cmp.config.window.bordered(),
},
mapping = cmp.mapping.preset.insert({
["<C-b>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-Space>"] = cmp.mapping.complete(),
["<C-e>"] = cmp.mapping.abort(),
["<CR>"] = cmp.mapping.confirm({ select = true }),
}),
sources = cmp.config.sources({
{ name = "nvim_lsp" },
{ name = "luasnip" }, -- For luasnip users.
{ name = "buffer" },
{ name = "path" },
{ name = "cmp_tabnine" }, -- ai powerde suggestions
}),
})
end,
},
}

View File

@@ -0,0 +1,44 @@
return {
{
"stevearc/dressing.nvim",
event = "VeryLazy",
opts = {
input = {
enabled = true,
default_prompt = "Input:",
trim_prompt = true,
title_pos = "left",
start_in_insert = true,
border = "rounded",
relative = "cursor",
prefer_width = 40,
win_options = {
winblend = 0,
},
mappings = {
n = {
["<Esc>"] = "Close",
["<CR>"] = "Confirm",
},
i = {
["<C-c>"] = "Close",
["<CR>"] = "Confirm",
["<Up>"] = "HistoryPrev",
["<Down>"] = "HistoryNext",
},
},
},
select = {
enabled = true,
backend = { "telescope", "builtin" },
trim_prompt = true,
telescope = require("telescope.themes").get_dropdown({
layout_config = {
width = 0.8,
height = 0.8,
},
}),
},
},
},
}

View File

@@ -0,0 +1,50 @@
return {
{
"folke/flash.nvim",
event = "VeryLazy",
---@type Flash.Config
opts = {},
keys = {
{
"<leader>w",
mode = { "n", "x", "o" },
function()
require("flash").jump()
end,
desc = "Flash",
},
{
"<leader>W",
mode = { "n", "x", "o" },
function()
require("flash").treesitter()
end,
desc = "Flash Treesitter",
},
{
"<leader>r",
mode = "o",
function()
require("flash").remote()
end,
desc = "Remote Flash",
},
{
"<leader>R",
mode = { "o", "x" },
function()
require("flash").treesitter_search()
end,
desc = "Treesitter Search",
},
{
"<c-f>",
mode = { "c" },
function()
require("flash").toggle()
end,
desc = "Toggle Flash Search",
},
},
},
}

View File

@@ -0,0 +1,14 @@
return {
{
"ibhagwan/fzf-lua",
-- optional for icon support
dependencies = { "nvim-tree/nvim-web-devicons" },
-- or if using mini.icons/mini.nvim
-- dependencies = { "nvim-mini/mini.icons" },
---@module "fzf-lua"
---@type fzf-lua.Config|{}
---@diagnostics disable: missing-fields
opts = {},
---@diagnostics enable: missing-fields
},
}

View File

@@ -0,0 +1,86 @@
return {
{
"lewis6991/gitsigns.nvim",
event = { "BufReadPre", "BufNewFile" },
config = function()
require("gitsigns").setup({
signs = {
add = { text = "" },
change = { text = "" },
delete = { text = "_" },
topdelete = { text = "" },
changedelete = { text = "~" },
untracked = { text = "" },
},
signcolumn = true, -- Toggle with `:Gitsigns toggle_signs`
numhl = false, -- Toggle with `:Gitsigns toggle_numhl`
linehl = false, -- Toggle with `:Gitsigns toggle_linehl`
word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff`
watch_gitdir = {
follow_files = true
},
attach_to_untracked = true,
current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame`
current_line_blame_opts = {
virt_text = true,
virt_text_pos = "eol", -- 'eol' | 'overlay' | 'right_align'
delay = 1000,
ignore_whitespace = false,
virt_text_priority = 100,
},
current_line_blame_formatter = "<author>, <author_time:%Y-%m-%d> - <summary>",
sign_priority = 6,
update_debounce = 100,
status_formatter = nil,
max_file_length = 40000,
preview_config = {
border = "rounded",
style = "minimal",
relative = "cursor",
row = 0,
col = 1
},
on_attach = function(bufnr)
local gs = package.loaded.gitsigns
local function map(mode, l, r, opts)
opts = opts or {}
opts.buffer = bufnr
vim.keymap.set(mode, l, r, opts)
end
-- Navigation
map("n", "]c", function()
if vim.wo.diff then return "]c" end
vim.schedule(function() gs.next_hunk() end)
return "<Ignore>"
end, { expr = true, desc = "Next hunk" })
map("n", "[c", function()
if vim.wo.diff then return "[c" end
vim.schedule(function() gs.prev_hunk() end)
return "<Ignore>"
end, { expr = true, desc = "Previous hunk" })
-- Actions
map("n", "<leader>hs", gs.stage_hunk, { desc = "Stage hunk" })
map("n", "<leader>hr", gs.reset_hunk, { desc = "Reset hunk" })
map("v", "<leader>hs", function() gs.stage_hunk({ vim.fn.line("."), vim.fn.line("v") }) end, { desc = "Stage hunk" })
map("v", "<leader>hr", function() gs.reset_hunk({ vim.fn.line("."), vim.fn.line("v") }) end, { desc = "Reset hunk" })
map("n", "<leader>hS", gs.stage_buffer, { desc = "Stage buffer" })
map("n", "<leader>hu", gs.undo_stage_hunk, { desc = "Undo stage hunk" })
map("n", "<leader>hR", gs.reset_buffer, { desc = "Reset buffer" })
map("n", "<leader>hp", gs.preview_hunk, { desc = "Preview hunk" })
map("n", "<leader>hb", function() gs.blame_line({ full = true }) end, { desc = "Blame line" })
map("n", "<leader>tb", gs.toggle_current_line_blame, { desc = "Toggle line blame" })
map("n", "<leader>hd", gs.diffthis, { desc = "Diff this" })
map("n", "<leader>hD", function() gs.diffthis("~") end, { desc = "Diff this ~" })
map("n", "<leader>td", gs.toggle_deleted, { desc = "Toggle deleted" })
-- Text object
map({ "o", "x" }, "ih", ":<C-U>Gitsigns select_hunk<CR>", { desc = "Select hunk" })
end
})
end,
},
}

View File

@@ -0,0 +1,68 @@
return {
{
"ThePrimeagen/harpoon",
branch = "harpoon2",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-telescope/telescope.nvim",
},
config = function()
local harpoon = require("harpoon")
-- Setup harpoon
harpoon:setup({
settings = {
save_on_toggle = true,
sync_on_ui_close = true,
key = function()
return vim.loop.cwd()
end,
},
})
-- Basic keymaps
vim.keymap.set("n", "<leader>a", function() harpoon:list():add() end,
{ desc = "Harpoon: Add file" })
vim.keymap.set("n", "<C-e>", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end,
{ desc = "Harpoon: Toggle menu" })
-- Navigate to files 1-4
vim.keymap.set("n", "<leader>1", function() harpoon:list():select(1) end,
{ desc = "Harpoon: Go to file 1" })
vim.keymap.set("n", "<leader>2", function() harpoon:list():select(2) end,
{ desc = "Harpoon: Go to file 2" })
vim.keymap.set("n", "<leader>3", function() harpoon:list():select(3) end,
{ desc = "Harpoon: Go to file 3" })
vim.keymap.set("n", "<leader>4", function() harpoon:list():select(4) end,
{ desc = "Harpoon: Go to file 4" })
-- Navigate to previous & next buffers
vim.keymap.set("n", "<C-S-P>", function() harpoon:list():prev() end,
{ desc = "Harpoon: Previous file" })
vim.keymap.set("n", "<C-S-N>", function() harpoon:list():next() end,
{ desc = "Harpoon: Next file" })
-- Telescope integration
local conf = require("telescope.config").values
local function toggle_telescope(harpoon_files)
local file_paths = {}
for _, item in ipairs(harpoon_files.items) do
table.insert(file_paths, item.value)
end
require("telescope.pickers").new({}, {
prompt_title = "Harpoon",
finder = require("telescope.finders").new_table({
results = file_paths,
}),
previewer = conf.file_previewer({}),
sorter = conf.generic_sorter({}),
}):find()
end
vim.keymap.set("n", "<leader>h", function() toggle_telescope(harpoon:list()) end,
{ desc = "Open harpoon window with Telescope" })
end,
},
}

View File

@@ -0,0 +1,18 @@
return {
{
"lukas-reineke/indent-blankline.nvim",
main = "ibl",
config = function()
require("ibl").setup({
indent = {
char = "",
},
scope = {
enabled = true,
show_start = true,
show_end = false,
},
})
end,
},
}

View File

@@ -0,0 +1,38 @@
return {
{
"folke/lazydev.nvim",
ft = "lua",
dependencies = {
"Bilal2453/luvit-meta",
},
opts = {
library = {
-- Load luvit types when the `vim.uv` word is found
{ path = "luvit-meta/library", words = { "vim%.uv" } },
-- Load LazyVim types when the `LazyVim` word is found
{ path = "LazyVim", words = { "LazyVim" } },
-- Add nvim-navic to library for completions
{ path = "nvim-navic", words = { "navic" } },
-- Add barbecue to library
{ path = "barbecue.nvim", words = { "barbecue" } },
},
-- Enable type checking
enabled = function(root_dir)
return vim.g.lazydev_enabled == nil and true or vim.g.lazydev_enabled
end,
-- Disable integration with cmp
integrations = {
-- Enable lspconfig integration
lspconfig = true,
-- Enable cmp integration
cmp = true,
-- Enable coq integration
coq = false,
},
},
},
{
"Bilal2453/luvit-meta",
lazy = true,
},
}

View File

@@ -0,0 +1,71 @@
return {
{
"williamboman/mason.nvim",
lazy = false,
config = function()
require("mason").setup()
end,
},
{
"williamboman/mason-lspconfig.nvim",
lazy = false,
opts = {
auto_install = true,
},
},
{
"neovim/nvim-lspconfig",
lazy = false,
dependencies = {
"SmiteshP/nvim-navic", -- Add this dependency
},
config = function()
local capabilities = require('cmp_nvim_lsp').default_capabilities()
local navic = require("nvim-navic")
-- Define server configurations
local servers = {
ts_ls = {},
solargraph = {},
html = {},
lua_ls = {
settings = {
Lua = {
diagnostics = {
globals = { "vim" },
},
workspace = {
checkThirdParty = false,
},
telemetry = {
enable = false,
},
},
},
},
pyright = {},
}
-- Setup each server with the new API
for server, config in pairs(servers) do
config.capabilities = capabilities
-- Add navic on_attach for breadcrumbs
config.on_attach = function(client, bufnr)
if client.server_capabilities.documentSymbolProvider then
navic.attach(client, bufnr)
end
end
vim.lsp.config[server] = config
vim.lsp.enable(server)
end
-- LSP keymaps
vim.keymap.set("n", "K", vim.lsp.buf.hover, {})
vim.keymap.set("n", "<leader>gd", vim.lsp.buf.definition, {})
vim.keymap.set("n", "<leader>gr", vim.lsp.buf.references, {})
vim.keymap.set("n", "<leader>ca", vim.lsp.buf.code_action, {})
end,
},
}

View File

@@ -0,0 +1,10 @@
return {
"nvim-lualine/lualine.nvim",
config = function ()
require('lualine').setup({
options = {
theme = 'dracula'
}
})
end
}

View File

@@ -0,0 +1,13 @@
return {
"nvim-neo-tree/neo-tree.nvim",
branch = "v3.x",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons",
"MunifTanjim/nui.nvim",
},
config = function()
vim.keymap.set("n", "<leader>ee", ":Neotree filesystem reveal left<CR>", {})
vim.keymap.set("n", "<leader>bf", ":Neotree buffers reveal float<CR>", {})
end,
}

View File

@@ -0,0 +1,24 @@
return {
{
"NeogitOrg/neogit",
dependencies = {
"nvim-lua/plenary.nvim",
"sindrets/diffview.nvim",
"nvim-telescope/telescope.nvim",
},
opts = {
integrations = {
telescope = true,
diffview = true,
},
kind = "tab",
},
keys = {
{ "<leader>gs", "<cmd>Neogit<cr>", desc = "Neogit Status" },
{ "<leader>gc", "<cmd>Neogit commit<cr>", desc = "Neogit Commit" },
{ "<leader>gp", "<cmd>Neogit pull<cr>", desc = "Neogit Pull" },
{ "<leader>gP", "<cmd>Neogit push<cr>", desc = "Neogit Push" },
{ "<leader>gb", "<cmd>Neogit branch<cr>", desc = "Neogit Branch" },
},
},
}

View File

@@ -0,0 +1,17 @@
return { -- lazy.nvim
{
"folke/noice.nvim",
event = "VeryLazy",
opts = {
-- add any options here
},
dependencies = {
-- if you lazy-load any plugin below, make sure to add proper `module="..."` entries
"MunifTanjim/nui.nvim",
-- OPTIONAL:
-- `nvim-notify` is only needed, if you want to use the notification view.
-- If not available, we use `mini` as the fallback
"rcarriga/nvim-notify",
},
},
}

View File

@@ -0,0 +1,23 @@
return {
"nvimtools/none-ls.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
},
event = { "BufReadPre", "BufNewFile" },
config = function()
local null_ls = require("null-ls")
null_ls.setup({
sources = {
null_ls.builtins.formatting.stylua,
null_ls.builtins.formatting.prettier,
-- null_ls.builtins.diagnostics.eslint_d,
null_ls.builtins.diagnostics.rubocop,
null_ls.builtins.formatting.rubocop,
null_ls.builtins.formatting.black,
null_ls.builtins.formatting.isort,
null_ls.builtins.diagnostics.pylint,
},
})
vim.keymap.set("n", "<leader>gf", vim.lsp.buf.format, {})
end,
}

View File

@@ -0,0 +1,159 @@
return {
{
"nvim-pack/nvim-spectre",
dependencies = {
"nvim-lua/plenary.nvim",
},
config = function()
require("spectre").setup({
-- Optional: customize colors
color_devicons = true,
open_cmd = "vnew",
live_update = false, -- auto execute search again when you write any file
line_sep_start = "┌-----------------------------------------",
result_padding = "¦ ",
line_sep = "└-----------------------------------------",
highlight = {
ui = "String",
search = "DiffChange",
replace = "DiffDelete",
},
mapping = {
["toggle_line"] = {
map = "dd",
cmd = "<cmd>lua require('spectre').toggle_line()<CR>",
desc = "toggle item",
},
["enter_file"] = {
map = "<cr>",
cmd = "<cmd>lua require('spectre.actions').select_entry()<CR>",
desc = "open file",
},
["send_to_qf"] = {
map = "<leader>q",
cmd = "<cmd>lua require('spectre.actions').send_to_qf()<CR>",
desc = "send all items to quickfix",
},
["replace_cmd"] = {
map = "<leader>c",
cmd = "<cmd>lua require('spectre.actions').replace_cmd()<CR>",
desc = "input replace command",
},
["show_option_menu"] = {
map = "<leader>o",
cmd = "<cmd>lua require('spectre').show_options()<CR>",
desc = "show options",
},
["run_current_replace"] = {
map = "<leader>rc",
cmd = "<cmd>lua require('spectre.actions').run_current_replace()<CR>",
desc = "replace current line",
},
["run_replace"] = {
map = "<leader>R",
cmd = "<cmd>lua require('spectre.actions').run_replace()<CR>",
desc = "replace all",
},
["change_view_mode"] = {
map = "<leader>v",
cmd = "<cmd>lua require('spectre').change_view()<CR>",
desc = "change result view mode",
},
["change_replace_sed"] = {
map = "trs",
cmd = "<cmd>lua require('spectre').change_engine_replace('sed')<CR>",
desc = "use sed to replace",
},
["change_replace_oxi"] = {
map = "tro",
cmd = "<cmd>lua require('spectre').change_engine_replace('oxi')<CR>",
desc = "use oxi to replace",
},
["toggle_live_update"] = {
map = "tu",
cmd = "<cmd>lua require('spectre').toggle_live_update()<CR>",
desc = "update when vim writes to file",
},
["toggle_ignore_case"] = {
map = "ti",
cmd = "<cmd>lua require('spectre').change_options('ignore-case')<CR>",
desc = "toggle ignore case",
},
["toggle_ignore_hidden"] = {
map = "th",
cmd = "<cmd>lua require('spectre').change_options('hidden')<CR>",
desc = "toggle search hidden",
},
["resume_last_search"] = {
map = "<leader>l",
cmd = "<cmd>lua require('spectre').resume_last_search()<CR>",
desc = "resume last search",
},
},
find_engine = {
["rg"] = {
cmd = "rg",
args = {
"--color=never",
"--no-heading",
"--with-filename",
"--line-number",
"--column",
},
options = {
["ignore-case"] = {
value = "--ignore-case",
icon = "[I]",
desc = "ignore case",
},
["hidden"] = {
value = "--hidden",
desc = "hidden file",
icon = "[H]",
},
},
},
},
replace_engine = {
["sed"] = {
cmd = "sed",
args = nil,
options = {
["ignore-case"] = {
value = "--ignore-case",
icon = "[I]",
desc = "ignore case",
},
},
},
},
default = {
find = {
cmd = "rg",
options = { "ignore-case" },
},
replace = {
cmd = "sed",
},
},
})
-- Global keymaps
vim.keymap.set("n", "<leader>S", '<cmd>lua require("spectre").toggle()<CR>', {
desc = "Toggle Spectre",
})
vim.keymap.set("n", "<leader>sw", '<cmd>lua require("spectre").open_visual({select_word=true})<CR>', {
desc = "Search current word",
})
vim.keymap.set("v", "<leader>sw", '<esc><cmd>lua require("spectre").open_visual()<CR>', {
desc = "Search current word",
})
vim.keymap.set("n", "<leader>sp", '<cmd>lua require("spectre").open_file_search({select_word=true})<CR>', {
desc = "Search in current file",
})
end,
},
}

View File

@@ -0,0 +1,10 @@
return {
"alexghergh/nvim-tmux-navigation",
config = function()
require('nvim-tmux-navigation').setup({})
vim.keymap.set("n", "<C-h>", "<Cmd>NvimTmuxNavigateLeft<CR>", {})
vim.keymap.set("n", "<C-j>", "<Cmd>NvimTmuxNavigateDown<CR>", {})
vim.keymap.set("n", "<C-k>", "<Cmd>NvimTmuxNavigateUp<CR>", {})
vim.keymap.set("n", "<C-l>", "<Cmd>NvimTmuxNavigateRight<CR>", {})
end,
}

View File

@@ -0,0 +1,88 @@
return {
{
"nvim-tree/nvim-web-devicons",
lazy = true,
config = function()
require("nvim-web-devicons").setup({
-- Globally enable/disable all icons
override = {
-- Override specific file type icons
zsh = {
icon = "",
color = "#428850",
cterm_color = "65",
name = "Zsh"
},
-- Add custom icons
["Dockerfile"] = {
icon = "",
color = "#384d54",
name = "Dockerfile"
},
[".env"] = {
icon = "",
color = "#faf743",
name = "Env"
},
[".gitignore"] = {
icon = "",
color = "#f1502f",
name = "GitIgnore"
},
},
-- Override by file extension
override_by_extension = {
["log"] = {
icon = "",
color = "#81e043",
name = "Log"
},
["rs"] = {
icon = "",
color = "#dea584",
name = "Rust"
},
["md"] = {
icon = "",
color = "#519aba",
name = "Markdown"
},
},
-- Override by filename
override_by_filename = {
["makefile"] = {
icon = "",
color = "#6d8086",
name = "Makefile"
},
["dockerfile"] = {
icon = "",
color = "#384d54",
name = "Dockerfile"
},
[".dockerignore"] = {
icon = "",
color = "#384d54",
name = "DockerIgnore"
},
["package.json"] = {
icon = "",
color = "#e8274b",
name = "PackageJson"
},
["package-lock.json"] = {
icon = "",
color = "#7a0d21",
name = "PackageLockJson"
},
},
-- Use colors by default
color_icons = true,
-- Globally enable default icons (if icon not found)
default = true,
-- Use strict mode (throw error if icon not found)
strict = false,
})
end,
},
}

View File

@@ -0,0 +1,110 @@
return {
{
"epwalsh/obsidian.nvim",
version = "*",
lazy = true,
ft = "markdown",
dependencies = {
"nvim-lua/plenary.nvim",
},
opts = {
workspaces = {
{
name = "nvim",
path = "~/Documents/obsidian/vault", -- Change to your vault path
},
-- {
-- name = "work",
-- path = "~/obsidian/work", -- Optional: add more vaults
-- },
},
-- Daily notes
daily_notes = {
folder = "daily",
date_format = "%Y-%m-%d",
template = nil,
},
-- Templates
templates = {
folder = "templates",
date_format = "%Y-%m-%d",
time_format = "%H:%M",
},
-- Completion
completion = {
nvim_cmp = true,
min_chars = 2,
},
-- Use note title as filename
note_id_func = function(title)
if title ~= nil then
return title
else
return tostring(os.time())
end
end,
-- Disable UI features if you don't want them
ui = {
enable = true, -- Set to false to disable and suppress warning
},
-- Mappings (only active in markdown files)
mappings = {
-- Follow link under cursor
["gf"] = {
action = function()
return require("obsidian").util.gf_passthrough()
end,
opts = { noremap = false, expr = true, buffer = true },
},
-- Toggle checkbox
["<leader>ch"] = {
action = function()
return require("obsidian").util.toggle_checkbox()
end,
opts = { buffer = true },
},
-- Smart action (follow link or toggle checkbox)
["<cr>"] = {
action = function()
return require("obsidian").util.smart_action()
end,
opts = { buffer = true, expr = true },
},
},
},
config = function(_, opts)
require("obsidian").setup(opts)
-- Set conceallevel for markdown files (for UI features)
vim.api.nvim_create_autocmd("FileType", {
pattern = "markdown",
callback = function()
vim.opt_local.conceallevel = 2
end,
})
end,
-- Global keymaps
keys = {
{ "<leader>on", "<cmd>ObsidianNew<cr>", desc = "New Obsidian note" },
{ "<leader>oo", "<cmd>ObsidianQuickSwitch<cr>", desc = "Quick switch notes" },
{ "<leader>os", "<cmd>ObsidianSearch<cr>", desc = "Search notes" },
{ "<leader>ot", "<cmd>ObsidianToday<cr>", desc = "Today's note" },
{ "<leader>oy", "<cmd>ObsidianYesterday<cr>", desc = "Yesterday's note" },
{ "<leader>ob", "<cmd>ObsidianBacklinks<cr>", desc = "Show backlinks" },
{ "<leader>og", "<cmd>ObsidianTags<cr>", desc = "Search tags" },
{ "<leader>ol", "<cmd>ObsidianLink<cr>", mode = "v", desc = "Link selection" },
{ "<leader>oL", "<cmd>ObsidianLinkNew<cr>", mode = "v", desc = "Link to new note" },
{ "<leader>of", "<cmd>ObsidianFollowLink<cr>", desc = "Follow link" },
{ "<leader>oT", "<cmd>ObsidianTemplate<cr>", desc = "Insert template" },
{ "<leader>op", "<cmd>ObsidianOpen<cr>", desc = "Open in Obsidian app" },
},
},
}

View File

@@ -0,0 +1,72 @@
return {
{
"cbochs/portal.nvim",
dependencies = {
"cbochs/grapple.nvim", -- Optional: for grapple integration
"ThePrimeagen/harpoon", -- Optional: for harpoon integration
},
config = function()
-- Setup portal
require("portal").setup({
labels = { "j", "k", "h", "l" },
escape = {
["<esc>"] = true,
},
})
-- Basic navigation keymaps
vim.keymap.set("n", "<leader>u", "<cmd>Portal jumplist backward<cr>", { desc = "Portal: Jump backward" })
vim.keymap.set("n", "<leader>i", "<cmd>Portal jumplist forward<cr>", { desc = "Portal: Jump forward" })
-- Changelist navigation
vim.keymap.set(
"n",
"<leader>po",
"<cmd>Portal changelist backward<cr>",
{ desc = "Portal: Jump backward (changelist)" }
)
vim.keymap.set(
"n",
"<leader>pi",
"<cmd>Portal changelist forward<cr>",
{ desc = "Portal: Jump forward (changelist)" }
)
-- Quickfix navigation
vim.keymap.set(
"n",
"<leader>qo",
"<cmd>Portal quickfix backward<cr>",
{ desc = "Portal: Jump backward (quickfix)" }
)
vim.keymap.set(
"n",
"<leader>qi",
"<cmd>Portal quickfix forward<cr>",
{ desc = "Portal: Jump forward (quickfix)" }
)
-- Optional: Harpoon integration
vim.keymap.set(
"n",
"<leader>ho",
"<cmd>Portal harpoon backward<cr>",
{ desc = "Portal: Jump backward (harpoon)" }
)
vim.keymap.set(
"n",
"<leader>hi",
"<cmd>Portal harpoon forward<cr>",
{ desc = "Portal: Jump forward (harpoon)" }
)
end,
keys = {
{ "<leader>u", desc = "Portal: Jump backward" },
{ "<leader>i", desc = "Portal: Jump forward" },
},
},
}

View File

@@ -0,0 +1,38 @@
return {
{
"gnikdroy/projections.nvim",
dependencies = {
"nvim-telescope/telescope.nvim",
},
config = function()
require("projections").setup({
workspaces = {
"~/projects",
"~/obsidian",
"~/.config",
},
patterns = { ".git", "package.json", "Cargo.toml", "go.mod" },
})
require("telescope").load_extension("projections")
-- Auto-store session on VimExit
local Session = require("projections.session")
vim.api.nvim_create_autocmd({ "VimLeavePre" }, {
callback = function() Session.store(vim.loop.cwd()) end,
})
-- Auto-restore session
vim.api.nvim_create_autocmd({ "VimEnter" }, {
callback = function()
if vim.fn.argc() == 0 then
Session.restore(vim.loop.cwd())
end
end,
})
end,
keys = {
{ "<leader>fp", "<cmd>Telescope projections<cr>", desc = "Find Projects" },
},
},
}

View File

@@ -0,0 +1,28 @@
return {
{
"nvim-telescope/telescope-ui-select.nvim",
},
{
"nvim-telescope/telescope.nvim",
-- tag = "0.1.5",
dependencies = { "nvim-lua/plenary.nvim" },
config = function()
require("telescope").setup({
extensions = {
["ui-select"] = {
require("telescope.themes").get_dropdown({}),
},
},
})
local builtin = require("telescope.builtin")
vim.keymap.set("n", "<C-p>", builtin.find_files, {})
vim.keymap.set("n", "<leader>fg", builtin.live_grep, {})
vim.keymap.set("n", "<leader><leader>", builtin.oldfiles, {})
vim.keymap.set("n", "z=", function()
builtin.spell_suggest(require("telescope.themes").get_cursor({}))
end, {})
require("telescope").load_extension("ui-select")
require("telescope").load_extension("noice")
end,
},
}

View File

@@ -0,0 +1,14 @@
return {
{
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
config = function()
local config = require("nvim-treesitter.configs")
config.setup({
auto_install = true,
highlight = { enable = true },
indent = { enable = true },
})
end,
},
}

View File

@@ -0,0 +1,39 @@
return {
{
"folke/trouble.nvim",
opts = {}, -- for default options, refer to the configuration section for custom setup.
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)",
},
},
}
}

View File

@@ -0,0 +1,14 @@
return {
"vim-test/vim-test",
dependencies = {
"preservim/vimux"
},
config = function()
vim.keymap.set("n", "<leader>t", ":TestNearest<CR>", {})
vim.keymap.set("n", "<leader>T", ":TestFile<CR>", {})
vim.keymap.set("n", "<leader>a", ":TestSuite<CR>", {})
vim.keymap.set("n", "<leader>l", ":TestLast<CR>", {})
vim.keymap.set("n", "<leader>g", ":TestVisit<CR>", {})
vim.cmd("let test#strategy = 'vimux'")
end,
}

View File

@@ -0,0 +1,20 @@
return {
{
"folke/which-key.nvim",
event = "VeryLazy",
opts = {
-- your configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
},
keys = {
{
"<leader>?",
function()
require("which-key").show({ global = false })
end,
desc = "Buffer Local Keymaps (which-key)",
},
},
},
}

View File

@@ -0,0 +1,35 @@
return {
{
"mikavilpas/yazi.nvim",
event = "VeryLazy",
keys = {
-- 👇 in this section, choose your own keymappings!
{
"<leader>-",
"<cmd>Yazi<cr>",
desc = "Open yazi at the current file",
},
{
-- Open in the current working directory
"<leader>cw",
"<cmd>Yazi cwd<cr>",
desc = "Open the file manager in nvim's working directory",
},
{
-- NOTE: this requires a version of yazi that includes
-- https://github.com/sxyazi/yazi/pull/1305 from 2024-07-18
"<c-up>",
"<cmd>Yazi toggle<cr>",
desc = "Resume the last yazi session",
},
},
---@type YaziConfig
opts = {
-- if you want to open yazi instead of netrw, see below for more info
open_for_directories = false,
keymaps = {
show_help = "<f1>",
},
},
},
}

View File

@@ -0,0 +1,18 @@
vim.cmd("set expandtab")
vim.cmd("set tabstop=2")
vim.cmd("set softtabstop=2")
vim.cmd("set shiftwidth=2")
vim.g.mapleader = " "
vim.g.background = "light"
vim.opt.swapfile = false
-- Navigate vim panes better
vim.keymap.set('n', '<c-k>', ':wincmd k<CR>')
vim.keymap.set('n', '<c-j>', ':wincmd j<CR>')
vim.keymap.set('n', '<c-h>', ':wincmd h<CR>')
vim.keymap.set('n', '<c-l>', ':wincmd l<CR>')
vim.keymap.set('n', '<leader>h', ':nohlsearch<CR>')
vim.wo.number = true