Compare commits

..

40 Commits

Author SHA1 Message Date
cfc5baa8ad less of a rewrite, more of a restructure 2026-04-07 14:06:49 +01:00
7eae05c8e2 added zsh 2026-04-02 10:49:14 +01:00
5720ab20dc updated flake and some other stuff 2026-04-02 10:47:43 +01:00
3a71912e22 added A to list of shit that indents properly 2026-03-31 09:59:15 +01:00
f5b4ee85a4 added rust nonsense 2026-03-30 11:21:24 +01:00
9e02247d65 fixed weird background on code blocks in neorg 2026-03-29 14:40:26 +01:00
1d69673e62 added scrolloff for end of file and blogging stuff 2026-03-22 11:37:00 +00:00
570ab4dc51 added macro indicator to lualine 2026-03-21 11:28:10 +00:00
86752af3e9 added css formatting 2026-03-20 21:45:55 +00:00
68a7427e80 changed flake.nix 2026-03-05 11:11:10 +00:00
7a05a15b29 made hidden files appear in live grep 2026-03-01 13:14:52 +00:00
ac6d7e8b07 cleaned up new autocommand 2026-02-27 16:44:58 +00:00
93c0eb4679 added git notification 2026-02-27 15:24:51 +00:00
679201030a flake.loxk 2026-02-26 22:22:00 +00:00
7e0dee57fa added flake.nix 2026-02-26 22:19:55 +00:00
d611081d65 changed a load of shit 2026-02-22 16:30:46 +00:00
4f87617051 added inline snacks latex rendering for norg 2026-02-20 15:12:27 +00:00
c43cfedb3b added symbol inserter 2026-02-19 12:20:47 +00:00
de48076947 lots of nonsense, neorg and autosave now in a usable state 2026-02-17 17:15:37 +00:00
eee5b39eb1 i need to get a job wtf even are these changes 2026-02-16 09:35:17 +00:00
83e835bf41 lots of polishing and command mode works again 2026-02-14 13:59:36 +00:00
ea9e351c83 got carried away and now have noice (also neorg works great, theres some shit with python idk 2026-02-13 22:25:54 +00:00
ac4759406c omg neorg works nowww 2026-02-13 20:13:08 +00:00
7f6429312c changed some stuff, still not working :( 2026-02-13 15:25:19 +00:00
voidarclabs
2a39dd7c15 treesitter not working :( 2026-02-12 22:29:48 +00:00
voidarclabs
3833828409 replaced auto-session with mini.session 2026-02-12 11:48:21 +00:00
voidarclabs
ed4b90be18 test 2026-02-12 10:04:55 +00:00
voidarclabs
fccf2bdbae disabled line wrapping 2026-02-08 22:11:54 +00:00
voidarclabs
9d65fdc908 made symlinked files show up in telescope file picker 2026-01-04 19:30:52 +00:00
voidarclabs
e563553a57 added nix formatting 2026-01-04 16:46:53 +00:00
voidarclabs
c1a605ef20 fixed lazydev 2025-11-25 11:46:29 +00:00
voidarclabs
6e88ad861f added nixd 2025-11-22 21:27:16 +00:00
voidarclabs
f24a1029aa major improvements, better stuff overall 2025-11-22 21:22:44 +00:00
voidarclabs
189ba01b97 lsp fix maybe 2025-11-22 17:44:57 +00:00
voidarclabs
24c0f370d0 better scrolloff management 2025-11-04 19:05:15 +00:00
voidarclabs
36a5a0a2c7 fixed C-u and C-d behaviour 2025-11-03 14:15:49 +00:00
voidarclabs
2574ea9578 actual progress omg 2025-10-19 16:42:42 +01:00
voidarclabs
85676d4153 restructure and more plugins 2025-08-22 13:37:35 +01:00
voidarclabs
7afd0cc72f basic theme, mini and completion tools. config still needed 2025-08-21 20:45:04 +01:00
voidarclabs
7f0f2b93f6 fresh start (finally) 2025-08-21 19:15:38 +01:00
33 changed files with 865 additions and 372 deletions

1
.gitignore vendored
View File

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

97
flake.nix Normal file
View File

@@ -0,0 +1,97 @@
{
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-ls
rust-analyzer
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
gnumake
imagemagick
luajitPackages.magick
ghostscript
luarocks
(texlive.combine {
inherit (texlive)
scheme-basic
varwidth
preview
mathtools
amsfonts
amscdx
xcolor
dvisvgm
dvipng
wrapfig
standalone
graphicxbox
amsmath
ulem
hyperref
capt-of
;
})
];
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"
# Trigger zsh
if [[ -z "$ZSH_VERSION" ]]; then
exec zsh
fi
'';
};
};
}

View File

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

44
lua/config/autocmd.lua Normal file
View File

@@ -0,0 +1,44 @@
-- 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,
})
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,
})

29
lua/config/binds.lua Normal file
View File

@@ -0,0 +1,29 @@
-- Keymap function
function Keymap(mode, key, binding)
vim.keymap.set(mode, key, binding, { noremap = true, silent = true })
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 = "i", "a", "A" do -- proper indenting function
Keymap("n", bind, function()
if vim.fn.getline("."):match("^%s*$") then
return [["_cc]]
else
return bind
end
end)
end
Keymap("i", "<C-BS>", "<C-W>") -- C-Backscpace for whole words
-- Open Lazygit
Keymap("n", "<leader>l", function()
Snacks.lazygit.open()
end)
Keymap("n", "<leader>d", "<cmd>lua vim.diagnostic.open_float()<CR>") -- Diagnostics for Linter

View File

@@ -19,17 +19,24 @@ vim.opt.rtp:prepend(lazypath)
-- 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 = "\\"
vim.g.maplocalleader = ","
-- Setup lazy.nvim
require("lazy").setup({
spec = {
-- import your plugins
{ import = "plugins.utils" },
{ import = "plugins" },
{ import = "plugins.ui" },
{ import = "plugins.editing" },
{ import = "plugins.completion" },
},
-- Configure any other settings here. See the documentation for more details.
-- colorscheme that will be used when installing plugins.
install = { colorscheme = { "catppuccin-mocha" } },
install = { colorscheme = { "catppuccin" } },
ui = {
border = "rounded",
},
-- automatically check for plugin updates
checker = { enabled = true },
checker = { enabled = false },
})

View File

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

View File

@@ -0,0 +1,50 @@
return {
"saghen/blink.cmp",
dependencies = {
"L3MON4D3/LuaSnip",
},
opts = {
-- Snippet configuration
snippets = {
preset = "luasnip", -- Tells blink.cmp to use LuaSnip
},
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)
-- "cmdline", -- Generally configured separately, but often included by default
},
providers = {
lazydev = {
name = "LazyDev",
module = "lazydev.integrations.blink",
-- make lazydev completions top priority (see `:h blink.cmp`)
score_offset = 100,
},
},
},
},
}

View File

@@ -0,0 +1,17 @@
return {
"stevearc/conform.nvim",
config = function()
require("conform").setup({
formatters_by_ft = {
lua = { "stylua" },
javascript = { "prettier" },
python = { "black" },
nix = { "nixfmt" },
css = { "prettier" },
rust = { "rustfmt" },
},
format_on_save = true,
undojoin = true,
})
end,
}

View File

@@ -0,0 +1,11 @@
return {
"folke/lazydev.nvim",
ft = "lua", -- only load on lua files
opts = {
library = {
-- See the configuration section for more details
-- Load luvit types when the `vim.uv` word is found
{ path = "${3rd}/luv/library", words = { "vim%.uv" } },
},
},
}

View File

@@ -0,0 +1,44 @@
return {
"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" },
}
-- Only show diagnostics close to the cursor
vim.diagnostic.config({
virtual_text = {
spacing = 4,
-- You can make prefix dynamic based on severity using a function
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", {
pattern = "!*.lua",
callback = function()
local ft = vim.bo.filetype
if lint.linters_by_ft[ft] then
lint.try_lint()
end
end,
})
end,
}

View File

@@ -0,0 +1,39 @@
return {
"neovim/nvim-lspconfig",
config = function()
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_ls", {
-- capabilities = require("cmp_nvim_lsp").default_capabilities(),
filetypes = { "html", "css", "javascriptreact", "typescriptreact" },
init_options = {
html = {
options = {
["bem.enabled"] = true,
},
},
},
})
vim.lsp.enable({
"lua_ls",
"ts_ls",
"pylsp",
"cssls",
"nixd",
"rust_analyzer",
"emmet_ls",
})
end,
}

View File

@@ -0,0 +1,30 @@
return {
"nvim-treesitter/nvim-treesitter",
lazy = false,
branch = "master",
build = ":TSUpdate",
config = function()
require("nvim-treesitter.configs").setup({
highlight = { enable = true },
indent = { enable = true },
ensure_installed = {
"bash",
"html",
"latex",
"javascript",
"json",
"lua",
"norg",
"markdown",
"markdown_inline",
"query",
"regex",
"tsx",
"typescript",
"python",
"vim",
"yaml",
},
})
end,
}

View File

@@ -1,147 +0,0 @@
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

@@ -0,0 +1,40 @@
return {
"folke/flash.nvim",
event = "VeryLazy",
---@type Flash.Config
opts = {},
keys = {
{
"ss",
mode = { "n", "x", "o" },
function()
require("flash").jump()
end,
desc = "Flash",
},
{
"S",
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",
},
},
}

View File

@@ -0,0 +1,106 @@
return {
{
"nvim-neorg/neorg",
lazy = true,
ft = "norg",
version = "*",
dependencies = {
{ "nvim-lua/plenary.nvim" },
{ "nvim-neorg/neorg-telescope" },
{ "benlubas/neorg-interim-ls" },
},
config = function()
require("neorg").setup({
load = {
["core.defaults"] = {},
["core.concealer"] = {},
["core.qol.toc"] = {
config = {
close_after_use = true,
},
},
["core.integrations.treesitter"] = {},
["core.looking-glass"] = {},
["core.itero"] = {
config = {
iterables = {
"unordered_list%d",
"ordered_list%d",
"quote%d",
},
},
},
["core.completion"] = {
config = { engine = { module_name = "external.lsp-completion" } },
},
["core.dirman"] = {
config = {
workspaces = {
notes = "~/Notes",
site = "~/Documents/voidarc/content/",
},
default_workspace = "notes",
},
},
["core.integrations.telescope"] = {
config = {
insert_file_link = {
-- Whether to show the title preview in telescope. Affects performance with a large
-- number of files.
show_title_preview = true,
},
},
},
["external.interim-ls"] = {
config = {
-- default config shown
completion_provider = {
-- Enable or disable the completion provider
enable = true,
-- Show file contents as documentation when you complete a file name
documentation = true,
-- Try to complete categories provided by Neorg Query. Requires `benlubas/neorg-query`
categories = false,
-- suggest heading completions from the given file for `{@x|}` where `|` is your cursor
-- and `x` is an alphanumeric character. `{@name}` expands to `[name]{:$/people:# name}`
},
},
},
},
})
vim.wo.foldlevel = 99
vim.wo.conceallevel = 2
vim.api.nvim_create_autocmd("Filetype", {
pattern = "norg",
callback = function()
vim.keymap.set("n", "<CR>", "<Plug>(neorg.esupports.hop.hop-link.vsplit)", { buffer = true })
vim.keymap.set("i", "<CR>", "<Plug>(neorg.itero.next-iteration)", { buffer = true })
vim.keymap.set("n", "<localleader>m", "<cmd>Neorg inject-metadata<CR>", { buffer = true })
vim.keymap.set("n", "<localleader>f", "<cmd>Telescope neorg insert_link<CR>", { buffer = true })
vim.opt.colorcolumn = "140"
vim.api.nvim_set_hl(0, "@neorg.tags.ranged_verbatim.code_block", { bg = "NONE" })
end,
})
end,
},
{
"folke/snacks.nvim",
config = function()
require("snacks").setup({
bigfile = {},
lazygit = {},
image = {
enabled = true,
math = {
enabled = true,
latex = {},
},
},
})
end,
},
}

View File

@@ -0,0 +1,6 @@
return {
"Aasim-A/scrollEOF.nvim",
event = { "CursorMoved", "WinScrolled" },
opts = {},
}

1
lua/plugins/init.lua Normal file
View File

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

View File

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

View File

@@ -1,57 +0,0 @@
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,
}

View File

@@ -1,63 +0,0 @@
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

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

View File

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

View File

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

View File

@@ -1,12 +0,0 @@
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

@@ -0,0 +1,13 @@
return {
"catppuccin/nvim",
name = "catppuccin",
opts = {
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
}
}

View File

@@ -1,6 +1,6 @@
return {
"nvim-lualine/lualine.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
dependencies = { "nvim-tree/nvim-web-devicons", "archibate/lualine-time" },
config = function()
require("lualine").setup({
options = {
@@ -36,16 +36,27 @@ return {
},
},
sections = {
lualine_a = { "mode" },
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 = { "buffers" },
lualine_x = { "encoding", "fileformat", "filetype" },
lualine_c = { "filename" },
lualine_x = { "filetype" },
lualine_y = { "lsp_status" },
lualine_z = { "location" },
lualine_z = { "ctime" },
},
inactive_sections = {
lualine_a = {},
lualine_b = {},
lualine_b = { "branch", "diff", "diagnostics" },
lualine_c = { "filename" },
lualine_x = { "location" },
lualine_y = {},
@@ -58,3 +69,4 @@ return {
})
end,
}

47
lua/plugins/ui/noice.lua Normal file
View File

@@ -0,0 +1,47 @@
return {
"folke/noice.nvim",
event = "VeryLazy",
config = function()
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
},
})
end,
dependencies = {
-- if you lazy-load any plugin below, make sure to add proper `module="..."` entries
"MunifTanjim/nui.nvim",
"rcarriga/nvim-notify",
},
}

View File

@@ -0,0 +1,8 @@
return {
"tadaa/vimade",
opts = {
recipe = { "minimalist", { animate = true } },
fadelevel = 0.6,
},
}

View File

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

View File

@@ -0,0 +1,55 @@
return {
{
"okuuva/auto-save.nvim",
version = "^1.0.0", -- see https://devhints.io/semver, alternatively use '*' to use the latest tagged release
cmd = "ASToggle", -- optional for lazy loading on command
event = { "InsertLeave", "TextChanged" },
opts = {},
config = function(opts)
require("auto-save").setup({
enabled = true,
trigger_events = { -- See :h events
immediate_save = { "BufLeave", "FocusLost", "QuitPre", "VimSuspend" }, -- vim events that trigger an immediate save
defer_save = { "InsertLeave" }, -- vim events that trigger a deferred save (saves after `debounce_delay`)
cancel_deferred_save = { "InsertEnter" }, -- vim events that cancel a pending deferred save
},
debounce_delay = 1000,
noautocmd = true,
})
local group = vim.api.nvim_create_augroup("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,
})
vim.api.nvim_create_autocmd("User", {
pattern = "AutoSaveEnable",
group = group,
callback = function(opts)
print("AutoSave enabled")
end,
})
vim.api.nvim_create_autocmd("User", {
pattern = "AutoSaveDisable",
group = group,
callback = function(opts)
print("AutoSave disabled")
end,
})
end,
},
{
"vladdoster/remember.nvim",
config = function()
require("remember").setup({})
end,
},
}

View File

@@ -0,0 +1,73 @@
return {
"echasnovski/mini.nvim",
version = "",
config = function()
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 }),
-- },
-- open = {
-- -- Animate for 400 milliseconds with linear easing
-- timing = animate.gen_timing.linear({ duration = 100, unit = "total" }),
-- -- Animate with wiping from nearest edge instead of default static one
-- winconfig = animate.gen_winconfig.wipe({ direction = "from_edge" }),
-- -- Make bigger windows more transparent
-- winblend = animate.gen_winblend.linear({ from = 0, to = 0 }),
-- },
-- close = {
-- -- Animate for 400 milliseconds with linear easing
-- timing = animate.gen_timing.linear({ duration = 100, unit = "total" }),
-- -- Animate with wiping to nearest edge instead of default static one
-- winconfig = animate.gen_winconfig.wipe({ direction = "to_edge" }),
-- -- Make bigger windows more transparent
-- winblend = animate.gen_winblend.linear({ from = 0, to = 0 }),
-- },
-- })
end,
}

View File

@@ -0,0 +1,83 @@
return {
{
"nvim-telescope/telescope.nvim",
tag = "",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-telescope/telescope-symbols.nvim",
"nvim-telescope/telescope-ui-select.nvim",
{ "nvim-telescope/telescope-fzf-native.nvim", build = "make" },
},
config = function()
require("telescope").setup({
defaults = {
file_ignore_patterns = { ".git", ".venv", ".node_modules" },
},
pickers = {
live_grep = {
additional_args = function(opts)
return { "--hidden" }
end,
},
},
extensions = {
file_browser = {
theme = "ivy",
hijack_netrw = true,
},
["ui-select"] = {
require("telescope.themes").get_dropdown({
-- even more opts
}),
},
},
})
local builtin = require("telescope.builtin")
vim.keymap.set("n", "<leader>ff", function()
builtin.find_files({ hidden = true })
end, { desc = "Telescope find files (current file dir)" })
vim.keymap.set("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)
vim.keymap.set("n", "<space>fs", function() -- select sessions
MiniSessions.select()
end)
vim.keymap.set("n", "<space>fd", function() -- select sessions
MiniSessions.select("delete")
end)
vim.keymap.set("n", "<leader>fg", function()
builtin.live_grep({ hidden = true })
end, { desc = "Telescope live grep (current file dir)" })
vim.keymap.set("n", "<leader>fb", function()
builtin.buffers({ cwd = vim.fn.expand("%:p:h") }) -- buffers dont need cwd, but harmless
end, { desc = "Telescope buffers" })
require("telescope").load_extension("file_browser")
require("telescope").load_extension("ui-select")
require("telescope").load_extension("nerdy")
end,
},
{
"nvim-telescope/telescope-file-browser.nvim",
dependencies = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim" },
},
{
"2kabhishek/nerdy.nvim",
cmd = "Nerdy",
opts = {
max_recents = 30, -- Configure recent icons limit
copy_to_clipboard = false, -- Copy glyph to clipboard instead of inserting
copy_register = "+", -- Register to use for copying (if `copy_to_clipboard` is true)
},
},
}