Compare commits

1 Commits
main ... old

Author SHA1 Message Date
voidarclabs
5190c45daf telescope, rebuild incoming 2025-08-21 19:14:34 +01:00
29 changed files with 439 additions and 915 deletions

1
.gitignore vendored
View File

@@ -1,2 +1 @@
lazy-lock.json lazy-lock.json
.session

27
flake.lock generated
View File

@@ -1,27 +0,0 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1777578337,
"narHash": "sha256-Ad49moKWeXtKBJNy2ebiTQUEgdLyvGmTeykAQ9xM+Z4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "15f4ee454b1dce334612fa6843b3e05cf546efab",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

View File

@@ -1,70 +0,0 @@
{
description = "Neovim with LSP dev shell";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs =
{ self, nixpkgs }:
let
system = "x86_64-linux"; # change if needed
pkgs = import nixpkgs { inherit system; };
pkgList = with pkgs; [
# LSPs
lua-language-server
vscode-langservers-extracted
emmet-language-server
svelte-language-server
rust-analyzer
ast-grep
prettier
black
nixfmt
rustfmt
nil
python313Packages.python-lsp-server
typescript-language-server
tailwindcss-language-server
stylua
nixd
# other tools
lua5_1
tree-sitter
ripgrep
gcc
fzf
gnumake
imagemagick
luarocks
];
nvim-wrapped = pkgs.symlinkJoin {
name = "nvim-with-lsp";
paths = [ pkgs.neovim ];
buildInputs = [ pkgs.makeWrapper ];
postBuild = ''
wrapProgram $out/bin/nvim \
--prefix PATH : ${pkgs.lib.makeBinPath pkgList} \
--set TREE_SITTER_LIB_PATH "${pkgs.tree-sitter}/lib"
'';
};
in
{
packages.${system}.default = nvim-wrapped;
devShells.${system}.default = pkgs.mkShell {
packages = [
nvim-wrapped
];
shellHook = ''
export TREE_SITTER_LIB_PATH="${pkgs.tree-sitter}/lib"
echo "Neovim LSP environment loaded"
export DEVSHELL_NAME="󱄅 flake/#89dceb"
'';
};
};
}

View File

@@ -1,51 +1,49 @@
vim.g.mapleader = " " vim.g.mapleader = "<Space>"
vim.g.maplocalleader = ","
-- Scrolloff require("config.lazy")
local scrolloff = math.floor(vim.o.lines / 2) - 3
vim.opt.scrolloff = scrolloff
require("plugins.init") vim.opt.splitbelow = true
require("config.autocmd")
require("config.binds")
-- Colorcheme
vim.cmd.colorscheme("catppuccin-mocha") vim.cmd.colorscheme("catppuccin-mocha")
-- Line numbers vim.opt.splitright = true
vim.opt.cursorline = true vim.opt.cursorline = true
vim.wo.relativenumber = true vim.wo.relativenumber = true
vim.wo.number = true vim.wo.number = true
vim.api.nvim_set_hl(0, "LineNr", { fg = "#6c7086" }) -- overlay0 vim.api.nvim_set_hl(0, "LineNr", { fg = "#6c7086" }) -- overlay0
vim.api.nvim_set_hl(0, "CursorLineNr", { fg = "#cba6f7", bold = true }) -- mauve vim.api.nvim_set_hl(0, "CursorLineNr", { fg = "#cba6f7", bold = true }) -- mauve
-- Windows vim.keymap.set("n", "<left>", '<cmd>echo "Use h to move!!"<CR>')
vim.opt.splitbelow = true vim.keymap.set("n", "<right>", '<cmd>echo "Use l to move!!"<CR>')
vim.opt.splitright = true vim.keymap.set("n", "<up>", '<cmd>echo "Use k to move!!"<CR>')
vim.o.winborder = "rounded" vim.keymap.set("n", "<down>", '<cmd>echo "Use j to move!!"<CR>')
-- Sane tab management vim.keymap.set("n", "<leader>w", "<C-w>")
vim.opt.tabstop = 2 vim.keymap.set("n", "<leader>wd", "<cmd>lua Snacks.dashboard()<CR>")
vim.opt.softtabstop = 2 vim.keymap.set("n", "<leader>l", "<cmd>bnext<CR>")
vim.opt.shiftwidth = 2 vim.keymap.set("n", "<leader>h", "<cmd>bprev<CR>")
vim.opt.expandtab = false vim.keymap.set("n", "<leader>j", "<cmd>lua MiniFiles.open()<CR>")
vim.keymap.set("n", "<leader>f", "<cmd>Pick files<cr>")
vim.keymap.set("n", "<leader>g", "<cmd>Pick grep_live<cr>")
vim.keymap.set("n", "<leader>u", "<cmd>UndotreeToggle<cr><cmd>UndotreeFocus<cr>")
vim.keymap.set("n", "<leader>k", "<cmd>lua Snacks.lazygit()<CR>")
vim.keymap.set("n", "<leader>x", "<cmd>FloatermKill<CR>")
vim.keymap.set("i", "jj", "<Esc>")
vim.opt.tabstop = 4
vim.opt.softtabstop = 4
vim.opt.shiftwidth = 4
vim.opt.expandtab = true
-- Undo management
vim.opt.swapfile = false vim.opt.swapfile = false
vim.opt.backup = false vim.opt.backup = false
vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir" vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir"
vim.opt.undofile = true vim.opt.undofile = true
-- Better Highlighting
vim.opt.hlsearch = false vim.opt.hlsearch = false
vim.opt.incsearch = true vim.opt.incsearch = true
-- Nowrap require("leap").set_default_mappings()
vim.opt.wrap = false
-- Indent
vim.o.autoindent = true
-- Undotree
vim.cmd("packadd nvim.undotree")
vim.keymap.set("n", "<leader>u", require("undotree").open)

View File

@@ -1,82 +0,0 @@
-- Autocommand to check git status
vim.api.nvim_create_autocmd("VimEnter", {
callback = function()
-- Verify if the current directory is a git repo
local is_git = os.execute("git rev-parse --is-inside-work-tree > /dev/null 2>&1")
if is_git ~= 0 then
return
end
-- Perform an async fetch to avoid startup lag
vim.fn.jobstart("git fetch", {
on_exit = function()
-- Get the number of commits the remote is ahead of local HEAD
local count = vim.fn.system("git rev-list --count HEAD..@{u} 2>/dev/null"):gsub("%s+", "")
if count ~= "" and tonumber(count) > 0 then
vim.schedule(function()
vim.notify(
"󰊢 " .. count .. " new commit(s) available on remote.",
vim.log.levels.INFO,
{ title = "Git Status", icon = "󰊢" }
)
end)
end
end,
})
end,
})
vim.api.nvim_create_autocmd("FileType", {
pattern = { "svelte" },
callback = function()
vim.treesitter.start()
end,
})
local cursorline_group = vim.api.nvim_create_augroup("CursorLineControl", { clear = true })
vim.api.nvim_create_autocmd({ "WinEnter", "BufEnter" }, {
group = cursorline_group,
callback = function()
vim.opt_local.cursorline = true
end,
})
vim.api.nvim_create_autocmd({ "WinLeave" }, {
group = cursorline_group,
callback = function()
vim.opt_local.cursorline = false
end,
})
local group = vim.api.nvim_create_augroup("autosave", {})
-- Notification to say when a file is saved by autosave
vim.api.nvim_create_autocmd("User", {
pattern = "AutoSaveWritePre",
group = group,
callback = function(opts)
if opts.data.saved_buffer ~= nil then
local filename = vim.fn.expand("%:t")
print("Saved '" .. filename .. "' at " .. vim.fn.strftime("%H:%M:%S"))
end
end,
})
-- Notification when enabling/disabling autosave for a buffer
vim.api.nvim_create_autocmd("User", {
pattern = "AutoSaveEnable",
group = group,
callback = function()
print("AutoSave enabled")
end,
})
vim.api.nvim_create_autocmd("User", {
pattern = "AutoSaveDisable",
group = group,
callback = function()
print("AutoSave disabled")
end,
})

View File

@@ -1,104 +0,0 @@
-- Keymap function
function Keymap(mode, key, binding, opts)
local options = { noremap = true, silent = true }
if opts then
options = vim.tbl_extend("force", options, opts)
end
vim.keymap.set(mode, key, binding, options)
end
Keymap("n", "q:", ":") -- remove nonsense command
Keymap("n", "<leader>bd", function() -- delete buffer
vim.cmd("bd")
vim.cmd("echo 'Buffer deleted'")
end)
for _, bind in ipairs({ "i", "a", "A" }) do
-- Pass { expr = true } as the fourth argument
Keymap("n", bind, function()
if vim.fn.getline("."):match("^%s*$") then
return [["_cc]]
else
return bind
end
end, { expr = true })
end
Keymap("i", "<C-BS>", "<C-W>") -- C-Backscpace for whole words
Keymap("n", "<leader>d", "<cmd>lua vim.diagnostic.open_float()<CR>") -- Diagnostics for Linter
Keymap("n", "gd", "<cmd>lua vim.lsp.buf.definition()<CR>") -- Diagnostics for Linter
-- Flash keymaps
Keymap("n", "ss", function()
require("flash").jump()
end)
Keymap("n", "S", function()
require("flash").treesitter()
end)
Keymap("n", "<leader>r", function()
require("flash").remote()
end)
Keymap("n", "<leader>R", function()
require("flash").treesitter_search()
end)
-- Mini Session Keybinds
Keymap("n", "<leader>qj", function() -- quit and save session local
require("mini.sessions").write(".session")
vim.cmd("wqa")
end)
Keymap("n", "<leader>qd", function() -- quit and delete session
require("mini.sessions").delete(".session")
vim.cmd("wqa")
end)
-- Telescope
local builtin = require("telescope.builtin")
Keymap("n", "<leader>ff", function()
builtin.find_files({ hidden = true })
end)
Keymap("n", "<space>fn", function()
local full_path = vim.api.nvim_buf_get_name(0)
local dir = vim.fn.fnamemodify(full_path, ":h")
require("telescope").extensions.file_browser.file_browser({
path = dir,
})
end)
Keymap("n", "<space>fs", function() -- select sessions
MiniSessions.select()
end)
Keymap("n", "<space>fd", function() -- select sessions
MiniSessions.select("delete")
end)
Keymap("n", "<leader>fg", function()
builtin.live_grep({ hidden = true })
end)
Keymap("n", "<leader>fb", function()
builtin.buffers({ show_all_buffers = true })
end)
-- Tab binds
Keymap("n", "<C-T>l", function()
vim.cmd("tabnext")
end)
Keymap("n", "<C-T>h", function()
vim.cmd("tabprevious")
end)
Keymap("n", "<C-T>j", function()
vim.cmd("tabnew")
end)
Keymap("n", "<C-T>q", function()
vim.cmd("tabclose")
end)

35
lua/config/lazy.lua Normal file
View File

@@ -0,0 +1,35 @@
-- 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("lazy").setup({
spec = {
-- import your plugins
{ import = "plugins" },
},
-- Configure any other settings here. See the documentation for more details.
-- colorscheme that will be used when installing plugins.
install = { colorscheme = { "catppuccin-mocha" } },
-- automatically check for plugin updates
checker = { enabled = true },
})

View File

@@ -0,0 +1,5 @@
return {
{ "catppuccin/nvim", name = "catppuccin", priority = 1000, opts = {
transparent_background = true,
} },
}

View File

@@ -1,51 +0,0 @@
vim.pack.add({
{ src = "https://github.com/stevearc/conform.nvim", name = "conform" },
{ src = "https://github.com/mfussenegger/nvim-lint", name = "lint" },
})
require("conform").setup({
formatters_by_ft = {
lua = { "stylua" },
javascript = { "prettier" },
typescript = { "prettier" },
html = { "prettier" },
svelte = { "prettier" },
python = { "black" },
nix = { "nixfmt" },
css = { "prettier" },
rust = { "rustfmt" },
},
format_on_save = true,
undojoin = true,
})
local lint = require("lint")
-- Only show diagnostics close to the cursor
vim.diagnostic.config({
virtual_text = {
spacing = 4,
prefix = function(diagnostic)
local icons = {
[vim.diagnostic.severity.ERROR] = "",
[vim.diagnostic.severity.WARN] = "󰉀 ",
[vim.diagnostic.severity.INFO] = "",
[vim.diagnostic.severity.HINT] = "󰌵 ",
}
return icons[diagnostic.severity] or ""
end,
},
signs = false,
underline = true,
update_in_insert = false,
})
-- Auto-run the linter only for the configured filetypes
vim.api.nvim_create_autocmd("BufWritePost", {
callback = function()
local ft = vim.bo.filetype
if lint.linters_by_ft[ft] then
lint.try_lint()
end
end,
})

View File

@@ -1,112 +0,0 @@
vim.pack.add({
{ src = "https://github.com/neovim/nvim-lspconfig", name = "lspconfig" },
{ src = "https://github.com/saghen/blink.cmp", name = "blink" },
{ src = "https://github.com/saghen/blink.lib", name = "blink-lib" },
})
vim.lsp.config("lua_ls", {
settings = {
Lua = {
-- Tell the server to let Neovim handle snippet expansion
completion = {
callSnippet = "Replace",
},
-- Use LuaJIT (which Neovim uses)
runtime = {
version = "LuaJIT",
},
},
},
})
-- vim.lsp.config("emmet_language_server", {
-- -- capabilities = require("cmp_nvim_lsp").default_capabilities(),
-- filetypes = { "html", "css", "javascriptreact", "typescriptreact" },
-- init_options = {
-- preferences = {},
-- show_expanded_abbreviation = "always",
-- show_abbreviation_suggestions = true,
-- show_suggestions_as_snippets = true,
-- html = {
-- options = {
-- ["bem.enabled"] = true,
-- ["output.selfClosingStyle"] = "xhtml",
-- },
-- },
-- },
-- })
vim.lsp.enable({
"lua_ls",
"ts_ls",
"pylsp",
"cssls",
"svelte",
"nixd",
"rust_analyzer",
"emmet_language_server",
})
vim.o.pumborder = "rounded"
require("blink.cmp").setup({
fuzzy = { implementation = "lua" },
signature = {
enabled = true,
},
completion = {
list = {
selection = {
preselect = false,
auto_insert = true,
},
},
},
-- Keymaps
keymap = {
["<Tab>"] = { "select_next", "snippet_forward", "fallback" },
},
sources = {
default = {
-- "lazydev",
"lsp", -- (Equivalent to cmp-nvim-lsp)
"snippets", -- (Handled by the snippets config, replaces cmp_luasnip source)
"buffer", -- (Equivalent to cmp-buffer)
"path", -- (Equivalent to cmp-path)
},
providers = {
-- lazydev = {
-- name = "LazyDev",
-- module = "lazydev.integrations.blink",
-- -- make lazydev completions top priority (see `:h blink.cmp`)
-- score_offset = 100,
-- },
},
},
})
vim.api.nvim_create_autocmd("FileType", { -- Lazy load lazydev when in lua file (no pun intended)
pattern = "lua",
callback = function()
vim.pack.add({
{ src = "https://github.com/folke/lazydev.nvim", name = "lazydev" },
})
require("lazydev").setup()
require("blink.cmp").setup({ -- Reload blink with lazydev as a source
sources = {
-- add lazydev to your completion providers
default = { "lazydev", "lsp", "path", "snippets", "buffer" },
providers = {
lazydev = {
name = "LazyDev",
module = "lazydev.integrations.blink",
-- make lazydev completions top priority (see `:h blink.cmp`)
score_offset = 100,
},
},
},
})
end,
})

View File

@@ -1,25 +0,0 @@
vim.pack.add({ { src = "https://github.com/nvim-treesitter/nvim-treesitter", name = "treesitter" } })
require("nvim-treesitter").setup({
highlight = { enable = true },
indent = { enable = true },
})
require("nvim-treesitter").install({
"bash",
"html",
"svelte",
"latex",
"javascript",
"json",
"lua",
"markdown",
"markdown_inline",
"query",
"regex",
"tsx",
"typescript",
"python",
"vim",
"yaml",
})

147
lua/plugins/correction.lua Normal file
View File

@@ -0,0 +1,147 @@
return {
-- LSP Configuration
{
"neovim/nvim-lspconfig",
dependencies = {
"williamboman/mason.nvim",
"williamboman/mason-lspconfig.nvim",
},
config = function()
require("mason").setup()
require("mason-lspconfig").setup({
ensure_installed = { "ts_ls", "lua_ls", "pyright", "rust_analyzer", "eslint" }, -- Add your desired LSPs
automatic_installation = true,
})
local lspconfig = require("lspconfig")
lspconfig.lua_ls.setup({})
--Enable (broadcasting) snippet capability for completion
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities.textDocument.completion.completionItem.snippetSupport = true
vim.lsp.config("qmlls", {
default_config = {
cmd = { "qmlls" },
filetypes = { "qml" },
root_dir = lspconfig.util.root_pattern(".git", "."),
}
}
)
vim.lsp.config("cssls", {
capabilities = capabilities,
})
lspconfig.pyright.setup({})
lspconfig.cssls.setup({})
lspconfig.qmlls.setup({})
lspconfig.ts_ls.setup({
capabilities = capabilities,
})
lspconfig.rust_analyzer.setup({})
lspconfig.emmet_ls.setup({
capabilities = require("cmp_nvim_lsp").default_capabilities(),
filetypes = { "html", "css", "javascriptreact", "typescriptreact" }, -- Add more if needed
init_options = {
html = {
options = {
["bem.enabled"] = true,
},
},
},
})
end,
},
-- Autocompletion
{
"hrsh7th/nvim-cmp",
dependencies = {
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-path",
"hrsh7th/cmp-cmdline",
"L3MON4D3/LuaSnip",
"saadparwaiz1/cmp_luasnip", -- Completion for snippets
},
config = function()
local cmp = require("cmp")
local luasnip = require("luasnip")
cmp.setup({
snippet = {
expand = function(args)
luasnip.lsp_expand(args.body)
end,
},
mapping = cmp.mapping.preset.insert({
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif luasnip.expand_or_jumpable() then
luasnip.expand_or_jump()
else
fallback()
end
end, { "i", "s" }),
["<S-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif luasnip.jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end, { "i", "s" }),
["<CR>"] = cmp.mapping.confirm({ select = true }), -- Confirm selection with Enter
}),
sources = cmp.config.sources({
{ name = "nvim_lsp" }, -- This should provide LSP completions like for ESLint
-- { name = "luasnip" },
{ name = "buffer" },
{ name = "path" },
}),
})
end,
},
-- Linting
{
"mfussenegger/nvim-lint",
config = function()
local lint = require("lint")
-- Explicitly define linters for each file type (without ast_grep)
lint.linters_by_ft = {
python = { "flake8" },
javascript = { "eslint" },
typescript = { "eslint" },
}
-- Auto-run the linter only for the configured filetypes
vim.api.nvim_create_autocmd("BufWritePost", {
pattern = "!*.lua",
callback = function()
local ft = vim.bo.filetype
if lint.linters_by_ft[ft] then
lint.try_lint()
end
end,
})
end,
},
-- autoformatting
{
"stevearc/conform.nvim",
config = function()
require("conform").setup({
formatters_by_ft = {
lua = { "stylua" },
javascript = { "prettier" },
python = { "black" },
},
format_on_save = true,
})
end,
},
}

View File

@@ -1,35 +0,0 @@
local plugins = {}
-- 1. Setup paths
local lua_path = vim.fn.stdpath("config") .. "/lua"
local plugin_dir = lua_path .. "/plugins"
-- 2. Use ** to search recursively for all .lua files
local files = vim.fn.split(vim.fn.globpath(plugin_dir, "**/*.lua"), "\n")
for _, file in ipairs(files) do
-- Get path relative to the 'lua' directory
-- Example: /home/user/.config/nvim/lua/plugins/ui/statusline.lua
-- Becomes: plugins/ui/statusline.lua
local relative_path = file:sub(#lua_path + 2)
-- Remove the .lua extension
local module_path = relative_path:gsub("%.lua$", "")
-- Convert path slashes to Lua dots (plugins/ui/statusline -> plugins.ui.statusline)
module_path = module_path:gsub("/", ".")
-- 3. The Guard: Don't require the current file (plugins.init)
if not module_path:match("%.init$") and module_path ~= "plugins" then
local status_ok, module_content = pcall(require, module_path)
if status_ok then
table.insert(plugins, module_content)
else
-- Optional: notify if a file failed to load
vim.notify("Error loading " .. module_path .. ": " .. module_content, vim.log.levels.ERROR)
end
end
end
return plugins

View File

@@ -0,0 +1,3 @@
return {
"ggandor/leap.nvim",
}

60
lua/plugins/lualine.lua Normal file
View File

@@ -0,0 +1,60 @@
return {
"nvim-lualine/lualine.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
config = function()
require("lualine").setup({
options = {
icons_enabled = true,
theme = "auto",
component_separators = { left = "", right = "" },
section_separators = { left = "", right = "" },
disabled_filetypes = {
statusline = {},
winbar = {},
},
ignore_focus = {},
always_divide_middle = true,
always_show_tabline = true,
globalstatus = false,
refresh = {
statusline = 1000,
tabline = 1000,
winbar = 1000,
refresh_time = 16, -- ~60fps
events = {
"WinEnter",
"BufEnter",
"BufWritePost",
"SessionLoadPost",
"FileChangedShellPost",
"VimResized",
"Filetype",
"CursorMoved",
"CursorMovedI",
"ModeChanged",
},
},
},
sections = {
lualine_a = { "mode" },
lualine_b = { "branch", "diff", "diagnostics" },
lualine_c = { "buffers" },
lualine_x = { "encoding", "fileformat", "filetype" },
lualine_y = { "lsp_status" },
lualine_z = { "location" },
},
inactive_sections = {
lualine_a = {},
lualine_b = {},
lualine_c = { "filename" },
lualine_x = { "location" },
lualine_y = {},
lualine_z = {},
},
tabline = {},
winbar = {},
inactive_winbar = {},
extensions = {},
})
end,
}

57
lua/plugins/mini.lua Normal file
View File

@@ -0,0 +1,57 @@
return {
"echasnovski/mini.nvim",
version = "*", -- or a specific tag
config = function()
-- Only load the modules you want
require("mini.animate").setup({
cursor = {
enable = false,
},
})
require("mini.pairs").setup()
require("mini.files").setup()
require("mini.cursorword").setup({
content = {
active = true,
},
})
require("mini.notify").setup()
require("mini.move").setup({
mappings = {
down = "J",
up = "K",
},
})
require("mini.surround").setup({
mappings = {
add = "<leader>sa",
delete = "<leader>sd", -- Delete surrounding
find = "<leader>sf", -- Find surrounding (to the right)
find_left = "<leader>sF", -- Find surrounding (to the left)
highlight = "<leader>sh", -- Highlight surrounding
replace = "<leader>sr", -- Replace surrounding
update_n_lines = "<leader>sn", -- Update `n_lines`
},
})
require("mini.ai").setup({
mappings = {
-- Main textobject prefixes
around = "a",
inside = "i",
-- Next/last variants
-- NOTE: These override built-in LSP selection mappings on Neovim>=0.12
-- Map LSP selection manually to use it (see `:h MiniAi.config`)
around_next = "<leader>an",
inside_next = "<leader>in",
around_last = "<leader>al",
inside_last = "<leader>il",
-- Move cursor to corresponding edge of `a` textobject
goto_left = "<leader>g[",
goto_right = "<leader>g]",
},
})
require("mini.pick").setup({})
end,
}

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

@@ -0,0 +1,63 @@
return {
"folke/snacks.nvim",
priority = 1000,
lazy = false,
---@type snacks.Config
opts = {
lazygit = { enabled = true },
bigfile = { enabled = true },
picker = {},
dashboard = {
enabled = true,
width = 100,
preset = {
keys = {
{ icon = "", key = "f", desc = "Find File", action = ":Pick files" },
{ icon = "", key = "n", desc = "New File", action = ":ene | startinsert" },
{
icon = "",
key = "g",
desc = "Find Text",
action = ":Pick live_grep",
},
{
icon = "",
key = "r",
desc = "Recent Files",
action = ":lua Snacks.dashboard.pick('oldfiles')",
},
{
icon = "",
key = "c",
desc = "Config",
action = ":lua Snacks.dashboard.pick('files', {cwd = vim.fn.stdpath('config')})",
},
{ icon = "", key = "U", desc = "Restore Session", section = "session" },
{
icon = "󰒲 ",
key = "L",
desc = "Lazy",
action = ":Lazy",
enabled = package.loaded.lazy ~= nil,
},
{ icon = "", key = "q", desc = "Quit", action = ":qa" },
},
header = [[
░ ░░░░ ░░░ ░░░ ░░ ░░░░ ░░░ ░░░░ ░░
▒ ▒▒▒▒ ▒▒ ▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒▒ ▒▒▒▒ ▒▒ ▒▒▒▒ ▒▒ ▒▒▒▒ ▒▒ ▒▒▒▒ ▒
▓▓ ▓▓ ▓▓▓ ▓▓▓▓ ▓▓▓▓▓ ▓▓▓▓▓ ▓▓▓▓ ▓▓ ▓▓▓▓ ▓▓ ▓▓▓ ▓▓▓▓▓▓▓
███ ████ ████ █████ █████ ████ ██ ██ ███ ███ ████ █
████ ██████ ███ ██ ███ ████ ██ ████ ███ ██
]],
},
sections = {
{ section = "header" },
{ icon = "", title = "Keymaps", section = "keys", indent = 2, padding = 1 },
{ icon = "", title = "Recent Files", section = "recent_files", indent = 2, padding = 1 },
{ icon = "", title = "Projects", section = "projects", indent = 2, padding = 1 },
{ section = "startup" },
},
},
},
}

View File

@@ -0,0 +1,4 @@
return {
'nvim-telescope/telescope.nvim',
dependencies = { 'nvim-lua/plenary.nvim' }
}

8
lua/plugins/tint.lua Normal file
View File

@@ -0,0 +1,8 @@
return {
{
"levouh/tint.nvim",
config = function()
require("tint").setup()
end,
},
}

View File

@@ -0,0 +1,13 @@
return {
{
"akinsho/toggleterm.nvim",
version = "*",
opts = {--[[ things you want to change go here]]
},
config = function()
require("toggleterm").setup({
open_mapping = [[<c-\>]],
})
end,
},
}

View File

@@ -0,0 +1,12 @@
return {
"nvim-treesitter/nvim-treesitter",
run = ":TSUpdate",
config = function()
require("nvim-treesitter.configs").setup({
ensure_installed = { "javascript", "lua", "python", "html", "css", "typescript", "rust" }, -- Add JavaScript here
highlight = {
enable = true, -- Enable syntax highlighting
},
})
end,
}

View File

@@ -1,18 +0,0 @@
vim.pack.add({
{ src = "https://github.com/catppuccin/nvim", name = "catppuccin" },
{ src = "https://github.com/tadaa/vimade", name = "vimade" },
})
require("catppuccin").setup({
transparent_background = true, -- disables setting the background color.
float = {
transparent = true, -- enable transparent floating windows
solid = false, -- use solid styling for floating windows, see |winborder|
},
show_end_of_buffer = true, -- shows the '~' characters after the end of buffers
})
require("vimade").setup({
recipe = { "minimalist", { animate = true } },
fadelevel = 0.6,
})

View File

@@ -1,71 +0,0 @@
vim.pack.add({
{ src = "https://github.com/nvim-lualine/lualine.nvim", name = "lualine" },
{ src = "https://github.com/nvim-tree/nvim-web-devicons", name = "devicons" },
{ src = "https://github.com/archibate/lualine-time", name = "lualine-time" },
})
require("lualine").setup({
options = {
icons_enabled = true,
theme = "auto",
component_separators = { left = "", right = "" },
section_separators = { left = "", right = "" },
disabled_filetypes = {
statusline = {},
winbar = {},
},
ignore_focus = {},
always_divide_middle = true,
always_show_tabline = true,
globalstatus = false,
refresh = {
statusline = 1000,
tabline = 1000,
winbar = 1000,
refresh_time = 16, -- ~60fps
events = {
"WinEnter",
"BufEnter",
"BufWritePost",
"SessionLoadPost",
"FileChangedShellPost",
"VimResized",
"Filetype",
"CursorMoved",
"CursorMovedI",
"ModeChanged",
},
},
},
sections = {
lualine_a = {
"mode",
{
function()
local reg = vim.fn.reg_recording()
if reg == "" then
return ""
end -- not recording
return "MACRO " .. string.upper(tostring(reg))
end,
},
},
lualine_b = { "branch", "diff", "diagnostics" },
lualine_c = { "filename" },
lualine_x = { "filetype" },
lualine_y = { "lsp_status" },
lualine_z = { "ctime" },
},
inactive_sections = {
lualine_a = {},
lualine_b = { "branch", "diff", "diagnostics" },
lualine_c = { "filename" },
lualine_x = { "location" },
lualine_y = {},
lualine_z = {},
},
tabline = {},
winbar = {},
inactive_winbar = {},
extensions = {},
})

View File

@@ -1,41 +0,0 @@
vim.pack.add({
{ src = "https://github.com/folke/noice.nvim", name = "noice" },
{ src = "https://github.com/MunifTanjim/nui.nvim", name = "nui" },
{ src = "https://github.com/rcarriga/nvim-notify", name = "notify" },
})
vim.notify = require("notify").setup({
background_colour = "#000000",
render = "compact",
stages = "slide",
})
require("noice").setup({
messages = {
enabled = true,
view = "mini",
view_error = "notify", -- view for errors
view_warn = "notify", -- view for warnings
view_history = "messages", -- view for :messages
view_search = "virtualtext", -- view for search count messages. Set to `false` to disable
},
notify = {
enabled = true,
view = "notify",
},
hover = {
enabled = false,
},
lsp = {
hover = {
enabled = false,
},
signature = {
enabled = false,
},
},
presets = {
long_message_to_split = true, -- long messages will be sent to a split
inc_rename = false, -- enables an input dialog for inc-rename.nvim
lsp_doc_border = false, -- add a border to hover docs and signature help
},
})

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

@@ -0,0 +1,4 @@
return {
"mbbill/undotree",
lazy = false,
}

View File

@@ -1,35 +0,0 @@
vim.pack.add({
{ src = "https://github.com/okuuva/auto-save.nvim", name = "autosave" },
{ src = "https://github.com/vladdoster/remember.nvim", name = "remember" },
{ src = "https://github.com/Aasim-A/scrollEOF.nvim", name = "scrolleof" },
{ src = "https://github.com/folke/flash.nvim", name = "flash" },
})
require("auto-save").setup({
enabled = true,
trigger_events = {
immediate_save = { "BufLeave", "FocusLost", "QuitPre", "VimSuspend" },
defer_save = { "InsertLeave" }, -- save after debounce
cancel_deferred_save = { "InsertEnter" }, -- cancel pending save
},
debounce_delay = 1000,
noautocmd = true,
})
-- enable remember
require("remember").setup({})
-- enable scrolleof
require("scrollEOF").setup({
-- The pattern used for the internal autocmd to determine
-- where to run scrollEOF. See https://neovim.io/doc/user/autocmd.html#autocmd-pattern
pattern = "*",
-- Whether or not scrollEOF should be enabled in insert mode
insert_mode = false,
-- Whether or not scrollEOF should be enabled in floating windows
floating = true,
-- List of filetypes to disable scrollEOF for.
disabled_filetypes = { "terminal" },
-- List of modes to disable scrollEOF for. see https://neovim.io/doc/user/builtin.html#mode()
disabled_modes = { "t", "nt" },
})

View File

@@ -1,52 +0,0 @@
vim.pack.add({ { src = "https://github.com/echasnovski/mini.nvim", name = "mini" } })
require("mini.pairs").setup() -- Bracket pairs and stuff
require("mini.ai").setup() -- Around and In extension for visual mode
require("mini.cursorword").setup() -- Underline current word below cursor (makes it easier to c and d)
require("mini.indentscope").setup({ -- shows indents
symbol = "",
draw = {
delay = 10,
animation = require("mini.indentscope").gen_animation.linear({
duration = 15,
unit = "step",
easing = "out",
}),
},
})
require("mini.trailspace").setup() -- Shows useless spaces
require("mini.sessions").setup({ -- dir based session management
autoread = true,
autowrite = true,
file = ".session",
force = { read = false, write = true, delete = true },
})
require("mini.surround").setup() -- Suround selections with characters
require("mini.move").setup({ -- move selection in visual mode
mappings = {
down = "J",
up = "K",
},
})
require("mini.icons").setup() -- Icon provider
local animate = require("mini.animate") -- animations ovs
require("mini.animate").setup({
cursor = {
enable = false,
},
scroll = {
-- Animate for 200 milliseconds with linear easing
timing = animate.gen_timing.linear({ duration = 100, unit = "total" }),
-- Animate equally but with at most 120 steps instead of default 60
subscroll = animate.gen_subscroll.equal({ max_output_steps = 60 }),
},
})

View File

@@ -1,49 +0,0 @@
vim.pack.add({
{ src = "https://github.com/nvim-telescope/telescope.nvim", name = "telescope" },
{ src = "https://github.com/nvim-lua/plenary.nvim", name = "plenary" },
{ src = "https://github.com/nvim-telescope/telescope-symbols.nvim", name = "telescope-symbols" },
{ src = "https://github.com/nvim-telescope/telescope-ui-select.nvim", name = "telescope-ui-select" },
{ src = "https://github.com/nvim-telescope/telescope-fzf-native.nvim", name = "telescope-fzf" },
{ src = "https://github.com/nvim-telescope/telescope-file-browser.nvim", name = "telescope-file-browser" },
{ src = "https://github.com/2kabhishek/nerdy.nvim", name = "telescope-nerdy" },
})
local actions = require("telescope.actions")
require("telescope").setup({
defaults = {
file_ignore_patterns = { ".git", ".venv", ".node_modules", "node_modules", ".svelte-kit", ".vscode" },
},
pickers = {
buffers = {
show_all_buffers = true,
mappings = {
i = {
["<CR>"] = actions.select_drop,
},
n = {
["<CR>"] = actions.select_drop,
},
},
},
live_grep = {
additional_args = function()
return { "--hidden" }
end,
},
},
extensions = {
file_browser = {
theme = "ivy",
hijack_netrw = true,
},
["ui-select"] = {
require("telescope.themes").get_dropdown({
-- even more opts
}),
},
},
})
require("telescope").load_extension("file_browser")
require("telescope").load_extension("ui-select")
require("telescope").load_extension("nerdy")

View File

@@ -1,112 +0,0 @@
{
"plugins": {
"autosave": {
"rev": "9aabcb8396224dcbf8d51c0c1d620d88a46e89d7",
"src": "https://github.com/okuuva/auto-save.nvim"
},
"blink": {
"rev": "2ef3db111181c5eef22a462aa0122349a6027f28",
"src": "https://github.com/saghen/blink.cmp"
},
"blink-lib": {
"rev": "f29d8bac6549bc1e7d699c83f680823d7def98bd",
"src": "https://github.com/saghen/blink.lib"
},
"catppuccin": {
"rev": "426dbebe06b5c69fd846ceb17b42e12f890aedf1",
"src": "https://github.com/catppuccin/nvim"
},
"conform": {
"rev": "dca1a190aa85f9065979ef35802fb77131911106",
"src": "https://github.com/stevearc/conform.nvim"
},
"devicons": {
"rev": "2795c26c916bb3c57dde308b82be51971fa92747",
"src": "https://github.com/nvim-tree/nvim-web-devicons"
},
"flash": {
"rev": "fcea7ff883235d9024dc41e638f164a450c14ca2",
"src": "https://github.com/folke/flash.nvim"
},
"lazydev": {
"rev": "ff2cbcba459b637ec3fd165a2be59b7bbaeedf0d",
"src": "https://github.com/folke/lazydev.nvim"
},
"lint": {
"rev": "eab58b48eb11d7745c11c505e0f3057165902461",
"src": "https://github.com/mfussenegger/nvim-lint"
},
"lspconfig": {
"rev": "451d4ef9abd4f0f08e379ef0d55d1c391b6125a7",
"src": "https://github.com/neovim/nvim-lspconfig"
},
"lualine": {
"rev": "131a558e13f9f28b15cd235557150ccb23f89286",
"src": "https://github.com/nvim-lualine/lualine.nvim"
},
"lualine-time": {
"rev": "8838875e2e787293bb905d23dbb91ef4bde188ea",
"src": "https://github.com/archibate/lualine-time"
},
"mini": {
"rev": "a5fda91040763cf9ad70bdce1c656b0f4ba1d16e",
"src": "https://github.com/echasnovski/mini.nvim"
},
"noice": {
"rev": "7bfd942445fb63089b59f97ca487d605e715f155",
"src": "https://github.com/folke/noice.nvim"
},
"notify": {
"rev": "8701bece920b38ea289b457f902e2ad184131a5d",
"src": "https://github.com/rcarriga/nvim-notify"
},
"nui": {
"rev": "de740991c12411b663994b2860f1a4fd0937c130",
"src": "https://github.com/MunifTanjim/nui.nvim"
},
"plenary": {
"rev": "74b06c6c75e4eeb3108ec01852001636d85a932b",
"src": "https://github.com/nvim-lua/plenary.nvim"
},
"remember": {
"rev": "85aff6dc0a5adab088ef6b9210585ded31c32c7b",
"src": "https://github.com/vladdoster/remember.nvim"
},
"scrolleof": {
"rev": "e462b9a07b8166c3e8011f1dcbc6bf68b67cd8d7",
"src": "https://github.com/Aasim-A/scrollEOF.nvim"
},
"telescope": {
"rev": "f04ab730b8f9c6bf3f54a206d0dcddfd70c52d59",
"src": "https://github.com/nvim-telescope/telescope.nvim"
},
"telescope-file-browser": {
"rev": "3610dc7dc91f06aa98b11dca5cc30dfa98626b7e",
"src": "https://github.com/nvim-telescope/telescope-file-browser.nvim"
},
"telescope-fzf": {
"rev": "b25b749b9db64d375d782094e2b9dce53ad53a40",
"src": "https://github.com/nvim-telescope/telescope-fzf-native.nvim"
},
"telescope-nerdy": {
"rev": "97b0914dece80204a777f04c94b9980da0f7ac88",
"src": "https://github.com/2kabhishek/nerdy.nvim"
},
"telescope-symbols": {
"rev": "a6d0127a53d39b9fc2af75bd169d288166118aec",
"src": "https://github.com/nvim-telescope/telescope-symbols.nvim"
},
"telescope-ui-select": {
"rev": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2",
"src": "https://github.com/nvim-telescope/telescope-ui-select.nvim"
},
"treesitter": {
"rev": "4916d6592ede8c07973490d9322f187e07dfefac",
"src": "https://github.com/nvim-treesitter/nvim-treesitter"
},
"vimade": {
"rev": "9b2eacd9c97c0bb547f6f3a27e8b5b7a70ad4d03",
"src": "https://github.com/tadaa/vimade"
}
}
}