Compare commits

...

25 Commits

Author SHA1 Message Date
80a2b12793 [Snacks] Try to get indent to use correct char 2025-11-17 10:41:12 +01:00
695fade431 [LSP] Already load at start 2025-11-14 15:02:40 +01:00
20e1efe3e1 [Events] Improve startup 2025-11-14 11:07:38 +01:00
53ecdf21de [Telescope] Make load on BufRead 2025-11-14 10:58:52 +01:00
12cf4195f3 [Binds] Make latex binds neater 2025-11-12 15:29:52 +01:00
afd1633b4a [General] Fixes 2025-11-12 15:27:33 +01:00
ae8c9a875d [Spell] Add new spelling files 2025-11-11 12:07:37 +01:00
b13d7d7fde [Telescope] Fix bind 2025-11-11 12:07:19 +01:00
ae0ba73a95 [Perf] Half launch time again 2025-11-10 20:02:34 +01:00
3d8232d8fd [Perf] Further improvements 2025-11-10 19:48:11 +01:00
2e3601f2cb [Perf] Improve startup performance by over 2x 2025-11-10 19:46:05 +01:00
3b9e90ea5a [Perf] Start performance improvements 2025-11-10 15:26:18 +01:00
5dfca5bb8b [Snacks] Update indent char 2025-11-10 13:54:37 +01:00
76b571569c [Snacks] Update colors, disable scope anim 2025-11-07 12:06:47 +01:00
053a7f2ba2 [Snacks] Recent files picker 2025-11-07 11:51:09 +01:00
125b0d72cc [Snacks] Increase recent files limit 2025-11-07 11:31:42 +01:00
04ea4ec6e5 [Snacks] Add, remove now obsolete plugins 2025-11-07 10:55:34 +01:00
28d52cf668 [None] Add larger timeout for eslint 2025-11-06 14:57:48 +01:00
8cb6f8bc8f [Snippets] Update latex 2025-11-06 09:37:33 +01:00
856b67cee5 [Colors] Swap builtins 2025-11-05 16:11:06 +01:00
54cb737ad1 [Colors] Make coherent again 2025-11-05 15:50:42 +01:00
0e21a35592 [Colors] Update 2025-11-05 15:32:09 +01:00
290abe97bd [Colors] More updates 2025-11-05 13:26:31 +01:00
48809c55b4 [Colors] Even more updates to colours 2025-11-05 13:24:09 +01:00
080be95de9 [Colors] Update some too dark colours 2025-11-05 13:20:01 +01:00
45 changed files with 831 additions and 844 deletions

View File

@@ -1,4 +1,5 @@
local opts = require("utils").opts
local utils = require("utils")
local opts = utils.opts
local keymap = vim.keymap
@@ -38,12 +39,9 @@ keymap.set("n", "Q", ":q!<CR>", opts("quit file"))
keymap.set("n", "<leader>dd", ":t.<CR>", opts("Duplicate line"))
-- LaTeX mappings
keymap.set("n", "<leader>lc", ":VimtexCompile<CR>", opts("Compile latex document")) -- Compile LaTeX file
keymap.set("n", "<leader>lv", ":VimtexView<CR>", opts("View compiled latex pdf")) -- View compiled PDF
keymap.set("n", "<leader>lq", ":VimtexStop<CR>", opts("Stop Compiling document")) -- Stop compilation
-- Markdown-Preview
keymap.set("n", "<leader><leader>m", ":MarkdownPreview<CR>", opts("Preview Markdown document in browser")) -- Stop compilation
keymap.set("n", "<leader>lc", utils.run_vim_cmd("VimtexCompile"), opts("Compile latex document")) -- Compile LaTeX file
keymap.set("n", "<leader>lv", utils.run_vim_cmd("VimtexView"), opts("View compiled latex pdf")) -- View compiled PDF
keymap.set("n", "<leader>lq", utils.run_vim_cmd("VimtexStop"), opts("Stop Compiling document")) -- Stop compilation
-- window navigation
keymap.set("n", "<A-h>", "<C-w>h", opts())

View File

@@ -14,7 +14,6 @@ vim.opt.rtp:prepend(lazypath)
require("lazy").setup({
spec = {
{ import = "plugins.nav" },
{ import = "plugins.nav.telescope" },
{ import = "plugins.lsp" },
{ import = "plugins.style" },
{ import = "plugins.util" },

View File

@@ -2,6 +2,7 @@ vim.g.mapleader = " "
vim.g.maplocalleader = " "
vim.opt.backspace = "2"
vim.opt.termguicolors = true
-- title
vim.opt.title = true

View File

@@ -1,19 +1,16 @@
return {
"aznhe21/actions-preview.nvim",
config = function()
-- Configure actions-preview.nvim
require("actions-preview").setup({
opts = {
-- Floating window configuration (optional)
max_width = 80, -- Max width of the preview window
max_height = 12, -- Max height of the preview window
min_width = 20, -- Minimum width for the preview window
min_height = 4, -- Minimum height for the preview window
-- Keymaps (optional)
keymaps = {
-- Trigger code action preview with a keybinding (example using <leader>a)
{ "n", "<leader>ca", vim.lsp.buf.code_action },
},
})
end,
event = {
"LspAttach"
},
keys = {
{ "<leader>ca", vim.lsp.buf.code_action, desc = "View code actions" },
},
}

View File

@@ -1,7 +1,7 @@
return {
-- competion
"hrsh7th/nvim-cmp",
event = "InsertEnter",
event = { "InsertEnter", "LspAttach" },
dependencies = {
{ "hrsh7th/cmp-buffer" }, -- source for text in buffer
{ "hrsh7th/cmp-path" }, -- source for file system paths
@@ -10,7 +10,6 @@ return {
{ "rafamadriz/friendly-snippets" }, -- useful snippets
{ "onsails/lspkind.nvim" }, -- icons for cmp
},
config = function()
local cmp = require("cmp")
local lspkind = require("lspkind")

View File

@@ -5,15 +5,12 @@
return {
-- lsp configuration
"neovim/nvim-lspconfig",
event = { "BufReadPre", "BufNewFile" },
dependencies = {
"hrsh7th/cmp-nvim-lsp",
{ "antosha417/nvim-lsp-file-operations", config = true },
"mfussenegger/nvim-jdtls",
},
config = function()
local enable = vim.lsp.enable
-- Change the Diagnostic symbols in the sign column (gutter)
local signs = { Error = "󰅚 ", Warn = "󰀪 ", Hint = "󰌶", Info = "󰋽 " }
for type, icon in pairs(signs) do

View File

@@ -6,6 +6,7 @@ return {
dependencies = {
"nvimtools/none-ls-extras.nvim",
},
event = { "BufReadPre", "BufNewFile" },
config = function()
local null_ls = require("null-ls")
@@ -55,7 +56,9 @@ return {
null_ls.builtins.code_actions.proselint,
require("none-ls.diagnostics.eslint_d"),
require("none-ls.code_actions.eslint_d"),
require("none-ls.formatting.eslint_d"),
require("none-ls.formatting.eslint_d").with( {
timeout = 4000
} ),
null_ls.builtins.formatting.black,
null_ls.builtins.formatting.clang_format
},

View File

@@ -1,5 +1,6 @@
return {
"lervag/vimtex",
event = "BufRead",
config = function()
-- vimtex settings
-- vim.g.vimtex_view_method = 'zathura' -- PDF viewer (example: zathura, or use 'skim' for macOS)

View File

@@ -3,6 +3,7 @@ return {
"akinsho/bufferline.nvim",
version = "*",
dependencies = "nvim-tree/nvim-web-devicons",
event = "BufRead",
config = function()
local bufferline = require("bufferline")
bufferline.setup({

View File

@@ -1,12 +0,0 @@
return {
"echasnovski/mini.bufremove",
config = function()
_G.MiniBufremove = require("mini.bufremove")
vim.keymap.set(
"n",
"<C-x>",
":lua MiniBufremove.delete()<CR>",
{ silent = true, noremap = true, desc = "Remove buffer" }
)
end,
}

View File

@@ -1,8 +1,8 @@
return {
-- git buffer integration
"lewis6991/gitsigns.nvim",
config = function()
require("gitsigns").setup({
event = "BufRead",
opts = {
count_chars = { "¹", "²", "³", "", "", "", "", "", "", ["+"] = "" },
signs = {
add = { show_count = true },
@@ -13,6 +13,5 @@ return {
untracked = { show_count = true },
},
numhl = true,
})
end,
},
}

View File

@@ -1,7 +1,6 @@
return {
-- open file at previous position
"ethanholz/nvim-lastplace",
config = function()
require("nvim-lastplace").setup({})
end,
event = { "BufReadPre", "BufNewFile" },
opts = {},
}

View File

@@ -5,6 +5,9 @@ return {
"MunifTanjim/nui.nvim",
},
opts = { lsp = { auto_attach = true } },
keys = {
{ "<leader><leader>n", ":Navbuddy<CR>", desc = "open navbuddy menu" }
},
config = function()
local actions = require("nvim-navbuddy.actions")
require("nvim-navbuddy").setup({
@@ -140,7 +143,5 @@ return {
},
custom_hl_group = nil, -- "Visual" or any other hl group to use instead of inverted colors
})
vim.keymap.set("n", "<leader><leader>n", ":Navbuddy<CR>", { silent = true, desc = "open navbuddy menu" })
end,
}

View File

@@ -6,10 +6,15 @@ return {
"MunifTanjim/nui.nvim",
-- {"3rd/image.nvim", opts = {}}, -- Optional image support in preview window: See `# Preview Mode` for more information
},
lazy = false, -- neo-tree will lazily load itself
config = function()
-- Automatically open up
require("neo-tree").setup({
keys = {
{ "<leader>e", "<Cmd>Neotree<CR>", desc = "Open Neotree" },
{
"<leader><leader>gg",
"<Cmd>Neotree source=git_status position=float<CR>",
desc = "Open git view",
},
},
opts = {
close_if_last_window = true, -- Close Neo-tree if it is the last window left in the tab
popup_border_style = "rounded",
enable_git_status = true,
@@ -323,14 +328,5 @@ return {
},
},
},
})
vim.keymap.set("n", "<leader>e", "<Cmd>Neotree<CR>", { silent = true, desc = "Open Neotree" })
vim.keymap.set(
"n",
"<leader><leader>gg",
"<Cmd>Neotree source=git_status position=float<CR>",
{ silent = true, desc = "Open git view" }
)
end,
},
}

View File

@@ -0,0 +1,140 @@
return {
-- fuzzy finder
"nvim-telescope/telescope.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
{
"nvim-telescope/telescope-live-grep-args.nvim",
-- This will not install any breaking changes.
-- For major updates, this must be adjusted manually.
version = "^1.0.0",
},
},
event = { "LspAttach" },
keys = {
{
"<leader>ff",
function()
require("telescope.builtin").find_files()
end,
desc = "Telescope find files",
},
{
"<leader>flg",
function()
require("telescope.builtin").live_grep()
end,
desc = "Telescope live grep",
},
{
"<leader>fg",
function()
require("telescope").extensions.live_grep_args.live_grep_args()
end,
desc = "Telescope live grep args",
},
{
"<leader>fb",
function()
require("telescope.builtin").buffers()
end,
desc = "Telescope buffers",
},
{
"<leader>fh",
function()
require("telescope.builtin").help_tags()
end,
desc = "Telescope nvim functions",
},
{ "<leader>ft", ":TodoTelescope<CR>", desc = "Telescope TODOs" },
-- Git
{
"<leader>fld",
function()
require("telescope.builtin").git_status()
end,
desc = "Telescope git diff",
},
{
"<leader>flc",
function()
require("telescope.builtin").git_commits()
end,
desc = "Telescope git commits",
},
{
"<leader>flf",
function()
require("telescope.builtin").git_files()
end,
desc = "Telescope git files",
},
-- Recent Commands
{ "<leader>foc", ":Telescope command_history<CR>", desc = "Telescope recent commands" },
-- Recent Searches
{ "<leader>fos", ":Telescope search_history<CR>", desc = "Telescope recent searches" },
-- Old Files
{
"<leader>fr",
function()
require("telescope.builtin").oldfiles()
end,
desc = "Telescope recent files",
},
-- Quickfix Items
{ "<leader>fq", ":Telescope quickfix<CR>", desc = "Telescope quickfix items" },
-- Spell Suggestions
{ "<leader>fs", ":Telescope spell_suggest<CR>", desc = "Telescope spellsuggestions" },
-- Diagnostics
{ "<leader>fd", ":Telescope diagnostics<CR>", desc = "Telescope Diagnostics" },
-- Notifications
{ "<leader>fn", ":Telescope notify<CR>", desc = "Telescope Notifications" },
-- Implementations
{ "<leader>fi", ":Telescope lsp_implementations<CR>", desc = "Telescope lsp implementations" },
},
config = function()
local actions = require("telescope.actions")
local telescope = require("telescope")
local lga_actions = require("telescope-live-grep-args.actions")
telescope.setup({
defaults = {
mappings = {
i = {
["<C-j>"] = actions.move_selection_next,
["<C-k>"] = actions.move_selection_previous,
["<C-q>"] = actions.smart_add_to_qflist,
["<C-A-q>"] = actions.smart_send_to_qflist,
["<C-Space>"] = lga_actions.quote_prompt(),
},
},
path_display = { "truncate" },
},
extensions = {
frecency = {
db_safe_mode = false,
matcher = "fuzzy",
},
},
})
telescope.load_extension("live_grep_args")
end,
}

View File

@@ -1,8 +0,0 @@
return {
"nvim-telescope/telescope-frecency.nvim",
-- install the latest stable version
version = "*",
config = function()
require("telescope").load_extension("frecency")
end,
}

View File

@@ -1,120 +0,0 @@
return {
-- fuzzy finder
"nvim-telescope/telescope.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
{
"nvim-telescope/telescope-live-grep-args.nvim",
-- This will not install any breaking changes.
-- For major updates, this must be adjusted manually.
version = "^1.0.0",
},
},
config = function()
local builtin = require("telescope.builtin")
local actions = require("telescope.actions")
local opts = { silent = true }
local telescope = require("telescope")
local lga_actions = require("telescope-live-grep-args.actions")
telescope.setup({
defaults = {
mappings = {
i = {
["<C-j>"] = actions.move_selection_next,
["<C-k>"] = actions.move_selection_previous,
["<C-q>"] = actions.smart_add_to_qflist,
["<C-A-q>"] = actions.smart_send_to_qflist,
["<C-Space>"] = lga_actions.quote_prompt(),
},
},
path_display = { "truncate" },
},
extensions = {
frecency = {
db_safe_mode = false,
matcher = "fuzzy"
},
},
})
telescope.load_extension("live_grep_args")
opts.desc = "telescope find files"
vim.keymap.set("n", "<leader>ff", builtin.find_files, opts)
opts.desc = "telescope live grep"
vim.keymap.set("n", "<leader>flg", builtin.live_grep, opts)
opts.desc = "telescope live grep args"
local function start_live_grep_args()
telescope.extensions.live_grep_args.live_grep_args()
end
vim.keymap.set("n", "<leader>fg", start_live_grep_args, opts)
opts.desc = "telescope buffers"
vim.keymap.set("n", "<leader>fb", builtin.buffers, opts)
opts.desc = "Show nvim functions"
vim.keymap.set("n", "<leader>fh", builtin.help_tags, opts)
opts.desc = "Telescope TODOs"
vim.keymap.set("n", "<leader>ft", ":TodoTelescope<CR>", opts)
-- Git
opts.desc = "Show git diff"
vim.keymap.set("n", "<leader>fld", builtin.git_status, opts)
opts.desc = "Show git commits"
vim.keymap.set("n", "<leader>flc", builtin.git_commits, opts)
opts.desc = "Show git files"
vim.keymap.set("n", "<leader>flf", builtin.git_files, opts)
-- Recent Commands
opts.desc = "Show recent commands"
vim.keymap.set("n", "<leader>foc", ":Telescope command_history<CR>", opts)
-- Recent Searches
opts.desc = "Show recent searches"
vim.keymap.set("n", "<leader>fos", ":Telescope search_history<CR>", opts)
-- Old Files
opts.desc = "Show recent files"
vim.keymap.set("n", "<leader>fof", builtin.oldfiles, opts)
-- Frecency (Old files, but better)
local function run_frecency()
require("telescope").extensions.frecency.frecency({
workspace = "CWD",
})
end
opts.desc = "Show recent files (Frecency algorithm)"
vim.keymap.set("n", "<leader>fr", run_frecency, opts)
-- Quickfix Items
opts.desc = "Show quickfix items"
vim.keymap.set("n", "<leader>fq", ":Telescope quickfix<CR>", opts)
-- Spell Suggestions
opts.desc = "Show spell suggestions"
vim.keymap.set("n", "<leader>fs", ":Telescope spell_suggest<CR>", opts)
-- Diagnostics
opts.desc = "Show diagnostics"
vim.keymap.set("n", "<leader>fd", ":Telescope diagnostics<CR>", opts)
-- Notifications
opts.desc = "Show notifications"
vim.keymap.set("n", "<leader>fn", ":Telescope notify<CR>", opts)
-- Implementations
opts.desc = "Show implementations"
vim.keymap.set("n", "<leader>fi", ":Telescope lsp_implementations<CR>", opts)
-- quickfix
opts.desc = "Show quickfix list"
vim.keymap.set("n", "<leader>fq", ":Telescope quickfix<CR>", opts)
end,
}

View File

@@ -2,8 +2,7 @@ return {
-- literally the name, quick term toggle
"akinsho/toggleterm.nvim",
version = "*",
config = function()
require("toggleterm").setup({
opts = {
insert_mappings = false,
terminal_mappings = false,
open_mapping = "<leader>t",
@@ -11,7 +10,9 @@ return {
float_opts = {
border = "curved",
},
})
vim.keymap.set("t", "<S-Esc>", [[<cmd>ToggleTerm<CR>]], {}) -- close terminal wih esc
end,
},
keys = {
{ "<S-Esc>", "<CMD>ToggleTerm<CR>", desc = "Close Terminal", mode = "t" }, -- close terminal wih esc
{ "<leader>t", "<CMD>ToggleTerm<CR>", desc = "Open Terminal" }, -- close terminal wih esc
},
}

View File

@@ -1,7 +1,7 @@
return {
-- colorizes colors in code
"NvChad/nvim-colorizer.lua",
--cmd = 'ColorizerToggle',
event = "BufRead",
config = function()
require("colorizer").setup({
filetypes = { "*" },

View File

@@ -33,9 +33,10 @@ return {
magenta = Shade.new("#C02490", 0.30, -0.15),
pink = Shade.new("#ff82c2", 0.15, -0.15),
purple = Shade.new("#761464", 0.15, -0.15),
turquoise = Shade.new("#3fffb0", 0.15, -0.15),
cyan = Shade.new("#7ac9ff", 0.15, -0.15),
lightblue = Shade.new("#5c77ff", 0.15, -0.15),
softblue = Shade.new("#10ddff", 0.15, -0.15),
lightblue = Shade.new("#add8e6", 0.15, -0.15),
softblue = Shade.new("#10aaff", 0.15, -0.15),
brown = Shade.new("#664010", 0.15, -0.15),
bg0 = "#0f1512", -- Dark bg (status line and float)
@@ -60,9 +61,9 @@ return {
syntax = {
comment = "comment",
bracket = "darkyellow",
builtin0 = "softblue",
builtin1 = "brown",
builtin2 = "sel1",
builtin0 = "turquoise",
builtin1 = "cyan",
builtin2 = "lightblue",
conditional = "darkblue",
const = "gray",
dep = "darkred",
@@ -75,14 +76,14 @@ return {
preproc = "strongred",
regex = "purple",
statement = "magenta",
string = "cyan",
string = "softblue",
type = "red",
variable = "orange",
},
diag = {
error = "darkred",
warn = "yellow",
info = "lightblue",
info = "softblue",
hint = "fg3",
ok = "darkgreen",
},
@@ -96,13 +97,13 @@ return {
diff = {
add = "darkgreen",
delete = "darkred",
changed = "lightblue",
changed = "softblue",
text = "fg0",
},
git = {
add = "darkgreen",
removed = "darkred",
changed = "lightblue",
changed = "softblue",
conflict = "orange",
ignored = "gray",
},
@@ -115,20 +116,17 @@ return {
EndOfBuffer = { link = "WinSeparator" }, -- filler lines (~) after the end of the buffer. By default, this is highlighted like |hl-NonText|.
CursorLine = { bg = "palette.bg1" },
CursorLineNr = { fg = "palette.cyan", style = "bold" }, -- Like LineNr when 'cursorline' or 'relativenumber' is set for the cursor line.
Search = { fg = "palette.lightblue", bg = "#00513b" }, -- Last search pattern highlighting (see 'hlsearch'). Also used for similar items that need to stand out.
IncSearch = { fg = "palette.lightblue", bg = "#1a6b51" }, -- 'incsearch' highlighting; also used for the text replaced with ":s///c"
Search = { fg = "palette.softblue", bg = "#00513b" }, -- Last search pattern highlighting (see 'hlsearch'). Also used for similar items that need to stand out.
IncSearch = { fg = "palette.softblue", bg = "#1a6b51" }, -- 'incsearch' highlighting; also used for the text replaced with ":s///c"
ModeMsg = { fg = "palette.fg3", style = "bold" }, -- 'showmode' message (e.g., "-- INSERT --")
NvimTreeRootFolder = { fg = "palette.lightblue", style = "bold" },
NvimTreeFolderName = { fg = "palette.lightblue" },
NvimTreeFolderIcon = { fg = "palette.lightblue" },
NvimTreeOpenedFolderName = { fg = "palette.lightblue" },
NvimTreeSymlinkFolderName = { fg = "palette.magenta" },
NvimTreeExecFile = { fg = "palette.red" },
NvimTreeImageFile = { fg = "palette.white" },
NvimTreeSpecialFile = { fg = "palette.yellow" },
NvimTreeSymlink = { fg = "palette.magenta" },
SnacksDashboardNormal = { fg = "palette.green" },
SnacksDashboardDesc = { fg = "palette.softblue" },
SnacksDashboardFile = { fg = "palette.softblue" },
SnacksDashboardIcon = { fg = "palette.orange" },
SnacksDashboardHeader = { fg = "palette.darkred" },
SnacksDashboardTitle = { fg = "palette.turquoise" },
SnacksIndentScope = { fg = "palette.lightblue" }
},
},
})

View File

@@ -41,21 +41,13 @@ return {
box_width = 50,
line_width = 70,
})
local opts = { silent = true }
opts.desc = "comment text box"
vim.keymap.set({ "n", "v" }, "<leader>cb", ":CBccbox<CR>", opts)
opts.desc = "comment text line"
vim.keymap.set({ "n", "v" }, "<leader>cl", ":CBllline<CR>", opts)
opts.desc = "comment line"
vim.keymap.set({ "n", "v" }, "<leader>ce", ":CBline<CR>", opts)
opts.desc = "comment highlight"
vim.keymap.set({ "n", "v" }, "<leader>ch", ":CBlcbox18<CR>", opts)
opts.desc = "delete comment box"
vim.keymap.set({ "n", "v" }, "<leader>cd", ":CBd<CR>", opts)
opts.desc = "yank comment box contents"
vim.keymap.set({ "n", "v" }, "<leader>cy", ":CBy<CR>", opts)
end,
keys = {
{ "<leader>cb", ":CBccbox<CR>", mode = { "n", "v" }, desc = "Comment text box" },
{ "<leader>cl", ":CBllline<CR>", mode = { "n", "v" }, desc = "Comment text line" },
{ "<leader>ce", ":CBline<CR>", mode = { "n", "v" }, desc = "Comment line" },
{ "<leader>ch", ":CBlcbox18<CR>", mode = { "n", "v" }, desc = "Comment highlight" },
{ "<leader>cd", ":CBd<CR>", mode = { "n", "v" }, desc = "Delete comment box" },
{ "<leader>cy", ":CBy<CR>", mode = { "n", "v" }, desc = "Yank comment box content" }
},
}

View File

@@ -2,7 +2,7 @@ return {
-- add comment keybinds
"numToStr/Comment.nvim",
opts = {},
lazy = false,
event = "BufRead",
config = function()
require("Comment").setup()
require("Comment.ft").set("hyprlang", "#%s")

View File

@@ -2,6 +2,7 @@ return {
-- status line
"nvim-lualine/lualine.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
event = "BufRead",
config = function()
local function getWords()
local wc = vim.api.nvim_eval("wordcount()")

View File

@@ -1,9 +1,6 @@
return {
"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",
@@ -13,7 +10,7 @@ return {
require("notify").setup({
max_width = 60,
minimum_width = 30,
render = "wrapped-default", -- default, minimal, simple, compact, wrapped-compact or wrapped-default
render = "wrapped-compact", -- default, minimal, simple, compact, wrapped-compact or wrapped-default
stages = "slide", -- fade_in_slide_out, fade, slide, static
})
require("noice").setup({

View File

@@ -1,77 +0,0 @@
return {
"startup-nvim/startup.nvim",
dependencies = {
"nvim-telescope/telescope.nvim",
"nvim-lua/plenary.nvim",
"nvim-telescope/telescope-file-browser.nvim",
},
config = function()
require("startup").setup({
title = {
type = "text",
align = "center",
content = {
[[]],
[[]],
[[]],
[[ ]],
[[ ██████ █████ █████ █████ ███ ]],
[[ ░░██████ ░░███ ░░███ ░░███ ░░░ ]],
[[ ░███░███ ░███ ██████ ██████ ░███ ░███ ████ █████████████ ]],
[[ ░███░░███░███ ███░░███ ███░░███ ░███ ░███ ░░███ ░░███░░███░░███ ]],
[[ ░███ ░░██████ ░███████ ░███ ░███ ░░███ ███ ░███ ░███ ░███ ░███ ]],
[[ ░███ ░░█████ ░███░░░ ░███ ░███ ░░░█████░ ░███ ░███ ░███ ░███ ]],
[[ █████ ░░█████░░██████ ░░██████ ░░███ █████ █████░███ █████ ]],
[[ ░░░░░ ░░░░░ ░░░░░░ ░░░░░░ ░░░ ░░░░░ ░░░░░ ░░░ ░░░░░ ]],
[[ ]],
},
highlight = "String",
default_color = "#010155",
},
quotes = {
type = "text",
align = "center",
content = function()
local handle = io.popen("pwd")
if handle then
local cwd = handle:read("*l")
handle:close()
return { "Currently in " .. cwd }
else
return { "Error running command" }
end
end,
highlight = "String",
default_color = "#FFFFFF",
},
old = {
type = "oldfiles",
oldfiles_directory = true,
align = "center",
title = "Old files",
oldfiles_amount = 10,
highlight = "String",
default_color = "#FFFFFF",
content = "",
},
options = {
mapping_keys = false,
},
colors = {
background = "#000000",
folded_section = "#100000",
},
mappings = {
execute_command = "<C-r>",
open_file = "<CR>",
},
parts = { "title", "quotes", "old" },
})
end,
}

View File

@@ -1,6 +1,7 @@
return {
"folke/todo-comments.nvim",
dependencies = { "nvim-lua/plenary.nvim" },
event = "BufRead",
opts = {
{
signs = true, -- show icons in the signs column
@@ -13,7 +14,7 @@ return {
alt = { "FIXME", "BUG", "FIXIT", "ISSUE" }, -- a set of other keywords that all map to this FIX keywords
-- signs = false, -- configure signs for some keywords individually
},
TODO = { icon = "", color = "info" },
TODO = { icon = "", color = "todo" },
HACK = { icon = "", color = "warning" },
WARN = { icon = "", color = "warning", alt = { "WARNING", "XXX" } },
PERF = { icon = "", alt = { "OPTIM", "PERFORMANCE", "OPTIMIZE" } },
@@ -46,7 +47,7 @@ return {
colors = {
error = { "DiagnosticError", "ErrorMsg", "#DC2626" },
warning = { "DiagnosticWarn", "WarningMsg", "#FBBF24" },
info = { "DiagnosticInfo", "#2563EB" },
todo = { "DiagnosticInfo", "#2563EB" },
hint = { "DiagnosticHint", "#10B981" },
default = { "Identifier", "#7C3AED" },
test = { "Identifier", "#FF00FF" },

View File

@@ -9,9 +9,36 @@ return {
"orjangj/neotest-ctest",
"rouge8/neotest-rust",
},
keys = {
-- Run nearest test
{ "<leader><leader>tr", '<cmd>lua require("neotest").run.run()<cr>', desc = "Run nearest test" },
-- Run all tests in the current file
{
"<leader><leader>tf",
'<cmd>lua require("neotest").run.run(vim.fn.expand("%"))<cr>',
desc = "Run all tests in current file",
},
-- Stop running tests
{ "<leader><leader>ts", '<cmd>lua require("neotest").run.stop()<cr>', desc = "Stop tests" },
{ "<leader><leader>ta", '<cmd>lua require("neotest").run.attach()<cr>', desc = "Attach to nearest test" },
{ "<leader><leader>tn", "<cmd>Neotest jump next<cr>", desc = "Jump to next test" },
{ "<leader><leader>tp", "<cmd>Neotest jump prev<cr>", desc = "Jump to previous test" },
-- Show test summary
{ "<leader><leader>tv", "<cmd>Neotest summary<cr>", desc = "Show neotest test summary" },
-- Toggle the Neotest panel
{ "<leader><leader>to", "<cmd>Neotest output<cr>", desc = "Show neotest output" },
{ "<leader><leader>tn", "<cmd>Neotest output-panel<cr>", desc = "Show neotest output as panel" },
},
config = function()
local neotest = require("neotest")
local keymap = vim.keymap.set
-- General setup for neotest
neotest.setup({
@@ -30,38 +57,5 @@ return {
})
-- Keybinding Setup
local opts = { noremap = true, silent = true }
-- Run nearest test
opts.desc = "Run nearest test"
keymap("n", "<leader><leader>tr", '<cmd>lua require("neotest").run.run()<cr>', opts)
-- Run all tests in the current file
opts.desc = "Run all tests in current file"
keymap("n", "<leader><leader>tf", '<cmd>lua require("neotest").run.run(vim.fn.expand("%"))<cr>', opts)
-- Stop running tests
opts.desc = "Stop tests"
keymap("n", "<leader><leader>ts", '<cmd>lua require("neotest").run.stop()<cr>', opts)
opts.desc = "Attach to nearest test"
keymap("n", "<leader><leader>ta", '<cmd>lua require("neotest").run.attach()<cr>', opts)
opts.desc = "Jump to next test"
keymap("n", "<leader><leader>tn", "<cmd>Neotest jump next<cr>", opts)
opts.desc = "Jump to previous test"
keymap("n", "<leader><leader>tp", "<cmd>Neotest jump prev<cr>", opts)
-- Show test summary
opts.desc = "Show neotest test summary"
keymap("n", "<leader><leader>tv", "<cmd>Neotest summary<cr>", opts)
-- Toggle the Neotest panel
opts.desc = "Show neotest output"
keymap("n", "<leader><leader>to", "<cmd>Neotest output<cr>", opts)
opts.desc = "Show neotest output as panel"
keymap("n", "<leader><leader>tn", "<cmd>Neotest output-panel<cr>", opts)
end,
}

View File

@@ -1,13 +1,12 @@
return {
"windwp/nvim-ts-autotag",
config = function()
require("nvim-ts-autotag").setup({
event = "InsertEnter",
opts = {
opts = {
-- Defaults
enable_close = true, -- Auto close tags
enable_rename = true, -- Auto rename pairs of tags
enable_close_on_slash = true, -- Auto close on trailing </
},
})
end,
}
}

View File

@@ -1,21 +1,16 @@
return {
"uga-rosa/ccc.nvim",
config = function()
local ccc = require("ccc")
vim.opt.termguicolors = true
ccc.setup({
opts = {
highlighter = {
auto_enable = false,
lsp = true,
},
})
local keymap = vim.keymap
keymap.set(
"n",
},
keys = {
{
"<leader>cp",
"<cmd>CccPick<CR>",
{ noremap = true, silent = true, desc = "Toggle colour picker" }
)
end,
desc = "Toggle colour picker",
},
},
}

View File

@@ -1,4 +1,5 @@
return {
-- similar to sticky scroll in vscode
"nvim-treesitter/nvim-treesitter-context",
event = "BufRead"
}

View File

@@ -1,11 +1,10 @@
return {
-- Diffview
"sindrets/diffview.nvim",
config = function()
local opts = require('utils').opts
vim.keymap.set("n", "<leader><leader>gd", ":DiffviewOpen<CR>", opts("Start diffview"))
vim.keymap.set("n", "<leader><leader>gf", ":DiffviewFileHistory<CR>", opts("View file history"))
vim.keymap.set("n", "<leader><leader>gc", ":DiffviewClose<CR>", opts("Close diffview"))
vim.keymap.set("n", "<leader><leader>gr", ":DiffviewRefresh<CR>", opts("Refresh diffview"))
end
keys = {
{ "<leader><leader>gd", ":DiffviewOpen<CR>", desc = "Open diffview" },
{ "<leader><leader>gf", ":DiffviewFileHistory<CR>", desc = "View file history" },
{ "<leader><leader>gc", ":DiffviewClose<CR>", desc = "Close diffview" },
{ "<leader><leader>gr", ":DiffviewRefresh<CR>", desc = "Refresh diffview" },
},
}

View File

@@ -1,9 +0,0 @@
return {
-- indent lines
"lukas-reineke/indent-blankline.nvim",
opts = {},
main = "ibl",
config = function()
require("ibl").setup()
end,
}

View File

@@ -3,6 +3,9 @@ return {
"iamcco/markdown-preview.nvim",
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
ft = { "markdown" },
keys = {
{ "<leader><leader>m", ":MarkdownPreview<CR>", desc = "Preview Markdown document in browser" },
},
build = function(plugin)
if vim.fn.executable("npx") then
vim.cmd("!cd " .. plugin.dir .. " && cd app && npx --yes yarn install")

View File

@@ -1,22 +1,19 @@
local utils = require("utils")
return {
opts = {},
"fedepujol/move.nvim",
config = function()
local opts = require("utils").opts
require("move").setup({})
local keymap = vim.keymap
-- Move lines up and down
keymap.set("n", "<A-S-k>", ":MoveLine(-1)<CR>", opts("Move line up"))
keymap.set("n", "<A-S-j>", ":MoveLine(1)<CR>", opts("Move line down"))
keymap.set("n", "<leader>mk", ":MoveLine(-1)<CR>", opts("Move line up"))
keymap.set("n", "<leader>mj", ":MoveLine(1)<CR>", opts("Move line down"))
keys = {
{ "<A-S-k>", utils.run_vim_cmd("MoveLine(-1)"), desc = "Move line up" },
{ "<A-S-j>", utils.run_vim_cmd("MoveLine(1)"), desc = "Move line down" },
{ "<leader>mk", utils.run_vim_cmd("MoveLine(-1)"), desc = "Move line up" },
{ "<leader>mj", utils.run_vim_cmd("MoveLine(1)"), desc = "Move line down" },
-- Move blocks in visual mode
keymap.set("v", "<A-k>", ":MoveBlock(-1)<CR>", opts("Move line up"))
keymap.set("v", "<A-j>", ":MoveBlock(1)<CR>", opts("Move line down"))
{ "<A-k>", utils.run_vim_cmd("MoveBlock(-1)"), desc = "Move line up" },
{ "<A-j>", utils.run_vim_cmd("MoveBlock(1)"), desc = "Move line down" },
-- Move lines in insert mode
keymap.set("i", "<A-k>", "<C-o>:MoveLine(-1)<CR>", opts("Move line up"))
keymap.set("i", "<A-j>", "<C-o>:MoveLine(1)<CR>", opts("Move line down"))
end,
{ "<A-k>", utils.run_vim_cmd("MoveLine(-1)"), desc = "Move line up" },
{ "<A-j>", utils.run_vim_cmd("MoveLine(1)"), desc = "Move line down" },
},
}

View File

@@ -1,6 +1,6 @@
local utils = require("utils")
return {
"smoka7/multicursors.nvim",
event = "VeryLazy",
dependencies = {
"nvimtools/hydra.nvim",
},
@@ -10,7 +10,7 @@ return {
{
mode = { "v", "n" },
"<leader><leader>c",
"<cmd>MCstart<cr>",
utils.run_vim_cmd("MCstart(-1)"),
desc = "Create a selection for selected text or word under the cursor",
},
},

View File

@@ -1,19 +1,15 @@
return {
"danymat/neogen",
config = function()
local opts = { noremap = true, silent = true, desc = "Generate docs" }
vim.keymap.set("n", "<leader>gd", ":lua require('neogen').generate()<CR>", opts)
opts.desc = "Generate function docs"
vim.keymap.set("n", "<leader>gg", ":lua require('neogen').generate( { type = 'func' } )<CR>", opts)
opts.desc = "Generate type docs"
vim.keymap.set("n", "<leader>gt", ":lua require('neogen').generate( { type = 'type' } )<CR>", opts)
opts.desc = "Generate class docs"
vim.keymap.set("n", "<leader>gc", ":lua require('neogen').generate( { type = 'class' } )<CR>", opts)
require("neogen").setup({
opts = {
snippet_engine = "luasnip",
})
end,
},
keys = {
{ "<leader>gd", ":lua require('neogen').generate()<CR>", desc = "Autogenerate docs" },
{ "<leader>gg", ":lua require('neogen').generate( { type = 'func' } )<CR>", desc = "Generate function docs" },
{ "<leader>gt", ":lua require('neogen').generate( { type = 'type' } )<CR>", desc = "Generate type docs" },
{ "<leader>gc", ":lua require('neogen').generate( { type = 'class' } )<CR>", desc = "Generate class docs" },
},
}

View File

@@ -1,9 +1,6 @@
return {
"LintaoAmons/scratch.nvim",
event = "VeryLazy",
config = function()
local opts = require("utils").opts
vim.keymap.set("n", "<leader><leader>+", ":Scratch<CR>", opts("Open a scratchpad"))
end,
keys = {
{ "<leader><leader>+", ":Scratch<CR>", desc = "Open a scratchpad" }
}
}

View File

@@ -0,0 +1,108 @@
return {
"folke/snacks.nvim",
priority = 1000,
lazy = false,
---@type snacks.Config
opts = {
-- your configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
animate = { enabled = true },
bigfile = { enabled = true },
bufdelete = { enabled = true },
dashboard = {
enabled = true,
sections = {
{ section = "header", hl = "SnacksDashboardHeader" },
{
pane = 2,
section = "terminal",
cmd = "colorscript -e square",
height = 5,
padding = 1,
},
{ section = "keys", hl = "SnacksDashboardPrimary", gap = 1, padding = 1 },
{
pane = 2,
icon = "",
title = "Recent Files (in project)",
section = "recent_files",
indent = 2,
limit = 5,
padding = 1,
cwd = true,
},
{
pane = 2,
icon = "",
title = "Projects",
section = "projects",
indent = 2,
padding = 1,
limit = 4,
},
{
pane = 2,
icon = "",
title = "Git Status",
section = "terminal",
enabled = function()
return Snacks.git.get_root() ~= nil
end,
cmd = "git status --short --branch --renames",
height = 5,
padding = 1,
ttl = 5 * 60,
indent = 3,
},
{ section = "startup" },
},
},
indent = {
enabled = true,
priority = 1,
char = "",
animate = {
enabled = false,
},
},
lazygit = { enabled = true },
picker = { enabled = true },
quickfile = { enabled = true },
statuscolumn = { enabled = true },
},
keys = {
{
"<leader><leader>gl",
function()
Snacks.lazygit()
end,
desc = "Open LazyGit",
mode = "n",
},
{
"<leader>fcs",
function()
Snacks.picker.highlights({ pattern = "hl_group:^Snacks" })
end,
desc = "Show Snacks highlights",
mode = "n",
},
{
"<leader>fca",
function()
Snacks.picker.highlights()
end,
desc = "Show highlight groups",
mode = "n",
},
{
"<C-x>",
function()
Snacks.bufdelete()
end,
desc = "Close buffer",
mode = "n",
},
},
}

View File

@@ -1,8 +1,6 @@
return {
"kylechui/nvim-surround",
version = "*",
event = "VeryLazy",
config = function()
require("nvim-surround").setup()
end,
event = "InsertEnter",
opts = {}
}

View File

@@ -1,6 +1,7 @@
return {
-- syntax highlighting
"nvim-treesitter/nvim-treesitter",
event = { "BufRead", "BufNewFile" },
build = ":TSUpdate",
config = function()
require("nvim-treesitter.configs").setup({

View File

@@ -1,14 +1,13 @@
return {
-- view buffer w/o distractions
"folke/zen-mode.nvim",
config = function()
require("zen-mode").setup({
opts = {
window = {
width = 1,
height = 1,
},
})
vim.keymap.set("n", "<leader>z", ":ZenMode<CR>", { silent = true, desc = "open current buffer in zen mode" })
end,
},
keys = {
{ "<leader>z", ":ZenMode<CR>", desc = "open current buffer in zen mode" },
},
}

View File

@@ -10,6 +10,12 @@ M.opts = function(desc)
end
end
M.run_vim_cmd = function(cmd)
return function()
vim.cmd(cmd)
end
end
M.sudo_exec = function(cmd, print_output)
vim.fn.inputsave()
local password = vim.fn.inputsecret("Password: ")

View File

@@ -3,9 +3,7 @@
"prefix": "latex-prepare",
"body": [
"\\documentclass{article}\n",
"\\newcommand{\\dir}{~/projects/latex} % IMPORTANT: No trailing slashes!",
"\\input{\\dir/include.tex}",
"\\load{recommended}\n",
"\\input{~/projects/latex/dist/recommended.tex}\n",
"\\setup{$1}\n",
"\\begin{document}",
"\\startDocument",
@@ -430,9 +428,7 @@
"prefix": "latex-letter",
"body": [
"\\documentclass[12pt,a4paper]{scrlttr2}\n",
"\\newcommand{\\dir}{~/projects/latex} % IMPORTANT: No trailing slashes!",
"\\input{\\dir/include.tex}",
"\\load{letter}\n",
"\\input{~/projects/latex/dist/letter.tex}\n",
"% Subject",
"\\setkomavar{subject}{$1}",
"\\begin{document}\\raggedright",

View File

@@ -6,3 +6,6 @@ Quadraturgewichte
Interpolationspolynom
aufzählbare
aufzählbar
Konvergenzordnung
Konvergenzrate
Konvergenzkurve

Binary file not shown.