dotfiles

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit dbdc3e8f82ca61efb0e399a4d4d422cb846fbb30
parent 7a30b6d1e10f92d73bca20eb78051eb85898615e
Author: Linus Behrens <linus@MacBookPro.fritz.box>
Date:   Tue, 13 May 2025 21:14:04 +0200

new custom

Diffstat:
A.config/fish/.zshrc | 43+++++++++++++++++++++++++++++++++++++++++++
A.config/fish/config.fish | 53+++++++++++++++++++++++++++++++++++++++++++++++++++++
A.config/fish/fish_variables | 31+++++++++++++++++++++++++++++++
A.config/fish/functions/fish_prompt.fish | 25+++++++++++++++++++++++++
D.config/nvim/.DS_Store | 0
D.config/nvim/.gitignore | 8--------
D.config/nvim/.neoconf.json | 15---------------
M.config/nvim/init.lua | 18+-----------------
M.config/nvim/lazy-lock.json | 48++++++++----------------------------------------
A.config/nvim/lua/linus/init.lua | 5+++++
A.config/nvim/lua/linus/keys.lua | 21+++++++++++++++++++++
A.config/nvim/lua/linus/lazy.lua | 18++++++++++++++++++
A.config/nvim/lua/linus/opts.lua | 31+++++++++++++++++++++++++++++++
A.config/nvim/lua/linus/plugins/.DS_Store | 0
A.config/nvim/lua/linus/plugins/comments.lua | 8++++++++
A.config/nvim/lua/linus/plugins/luasnip.lua | 24++++++++++++++++++++++++
A.config/nvim/lua/linus/plugins/neo-tree.lua | 45+++++++++++++++++++++++++++++++++++++++++++++
A.config/nvim/lua/linus/plugins/neotree.lua | 24++++++++++++++++++++++++
R.config/nvim/lua/plugins/no-neck-pain.lua -> .config/nvim/lua/linus/plugins/no-neck-pain.lua | 0
R.config/nvim/lua/plugins/opacity.lua -> .config/nvim/lua/linus/plugins/opacity.lua | 0
A.config/nvim/lua/linus/plugins/persistence.lua | 6++++++
A.config/nvim/lua/linus/plugins/snacks.lua | 24++++++++++++++++++++++++
A.config/nvim/lua/linus/plugins/starter-mini.lua | 53+++++++++++++++++++++++++++++++++++++++++++++++++++++
R.config/nvim/lua/plugins/substitute.lua -> .config/nvim/lua/linus/plugins/substitute.lua | 0
A.config/nvim/lua/linus/plugins/telescope.lua | 27+++++++++++++++++++++++++++
A.config/nvim/lua/linus/plugins/transparent.lua | 16++++++++++++++++
A.config/nvim/lua/linus/plugins/treesitter.lua | 42++++++++++++++++++++++++++++++++++++++++++
A.config/nvim/lua/linus/plugins/trouble.lua | 16++++++++++++++++
A.config/nvim/lua/linus/plugins/which-key.lua | 16++++++++++++++++
A.config/nvim/lua/linus/plugins/zen.lua | 63+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
A.config/nvim/lua/linus/snippets/all.lua | 5+++++
A.config/nvim/lua/linus/snippets/tex.lua | 210+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
A.config/nvim/lua/linus/video.lua | 112+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
D.config/nvim/lua/plugins/bufferline.lua | 42------------------------------------------
D.config/nvim/lua/plugins/snacks.lua | 14--------------
D.config/nvim/lua/plugins/telescope.lua | 41-----------------------------------------
D.config/nvim/stylua.toml | 4----
R.config/nvim/LICENSE -> .config/nvim2/LICENSE | 0
R.config/nvim/README.md -> .config/nvim2/README.md | 0
C.config/nvim/init.lua -> .config/nvim2/init.lua | 0
C.config/nvim/lazy-lock.json -> .config/nvim2/lazy-lock.json | 0
R.config/nvim/lazyvim.json -> .config/nvim2/lazyvim.json | 0
R.config/nvim/lua/.DS_Store -> .config/nvim2/lua/.DS_Store | 0
R.config/nvim/lua/config/autocmds.lua -> .config/nvim2/lua/config/autocmds.lua | 0
R.config/nvim/lua/config/highlite.lua -> .config/nvim2/lua/config/highlite.lua | 0
R.config/nvim/lua/config/keymaps.lua -> .config/nvim2/lua/config/keymaps.lua | 0
R.config/nvim/lua/config/lazy.lua -> .config/nvim2/lua/config/lazy.lua | 0
R.config/nvim/lua/config/options.lua -> .config/nvim2/lua/config/options.lua | 0
R.config/nvim/lua/plugins/disable.lua -> .config/nvim2/lua/plugins/disable.lua | 0
R.config/nvim/lua/plugins/example.lua -> .config/nvim2/lua/plugins/example.lua | 0
R.config/nvim/lua/plugins/lualine.lua -> .config/nvim2/lua/plugins/lualine.lua | 0
R.config/nvim/lua/plugins/markview.lua -> .config/nvim2/lua/plugins/markview.lua | 0
R.config/nvim/lua/plugins/mini.lua -> .config/nvim2/lua/plugins/mini.lua | 0
R.config/nvim/lua/plugins/neotree.lua -> .config/nvim2/lua/plugins/neotree.lua | 0
R.config/nvim/lua/plugins/no-neck-pain.lua -> .config/nvim2/lua/plugins/no-neck-pain.lua | 0
R.config/nvim/lua/plugins/opacity.lua -> .config/nvim2/lua/plugins/opacity.lua | 0
R.config/nvim/lua/plugins/render.lua -> .config/nvim2/lua/plugins/render.lua | 0
A.config/nvim2/lua/plugins/snacks.lua | 14++++++++++++++
R.config/nvim/lua/plugins/starter-mini.lua -> .config/nvim2/lua/plugins/starter-mini.lua | 0
R.config/nvim/lua/plugins/substitute.lua -> .config/nvim2/lua/plugins/substitute.lua | 0
A.config/nvim2/lua/plugins/telescope.lua | 43+++++++++++++++++++++++++++++++++++++++++++
R.config/nvim/lua/plugins/todo-comment.lua -> .config/nvim2/lua/plugins/todo-comment.lua | 0
R.config/nvim/lua/plugins/user/highlights.lua -> .config/nvim2/lua/plugins/user/highlights.lua | 0
M.config/zsh/.zsh_history | 146+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
64 files changed, 1130 insertions(+), 181 deletions(-)

diff --git a/.config/fish/.zshrc b/.config/fish/.zshrc @@ -0,0 +1,43 @@ +########## ALIAS ########## + +alias c='clear' +alias e='exit' +alias v='nvim' +alias n='neofetch' +alias l='ls -lA' +alias ll='ls -la' +alias s='source' +alias zshrc='nvim $HOME/.config/zsh/.zshrc' +alias szshrc='source $HOME/.config/zsh/.zshrc' +alias xi='sudo xbps-install' +alias xr='sudo xbps-remove' +alias ai='sudo apt install' +alias ar='sudo apt remove' +alias p='sudo pacman' +alias ipa='ip a | grep 192.168.10' +alias gc="nvim /Users/linus/Library/Application Support/com.mitchellh.ghostty/" +bindkey -v + +alias gcl='git clone' +alias gclgh='git clone https://github.com/' +alias ga='git add' +alias gc='git commit -m' +alias gp='git push' + +########## PATH ########## + +export GPG_TTY=$(tty) +export PATH="$PATH:/opt/homebrew/bin" +export PLAN9=/Users/linus/.sources/plan9port +export PATH=$PATH:$PLAN9/bin + +########## PS1 ########## + +autoload -Uz vcs_info +precmd() { vcs_info } + +setopt PROMPT_SUBST +PS1=' +%~ ${vcs_info_msg_0_} +%% ' + diff --git a/.config/fish/config.fish b/.config/fish/config.fish @@ -0,0 +1,53 @@ +if status is-interactive + # Commands to run in interactive sessions can go here +end + +###### ALIAS ###### + +alias c='clear' +alias e='exit' +alias l='ls -lA' +alias ll='ls -la' +alias ipa='ip a | grep 192.168.10' + +###### PACKAGE MANAGER ###### + +alias xi='sudo xbps-install' +alias xr='sudo xbps-remove' +alias ai='sudo apt install' +alias ar='sudo apt remove' +alias p='sudo pacman' +alias bi='brew install' + +###### PACKAGES ###### + +alias v='nvim' +alias n='neofetch' +alias g='cage ghostty' +alias gx='pkill cage' + +###### SHELL ###### + +alias zshrc='nvim $HOME/.config/zsh/.zshrc' +alias szshrc='source $HOME/.config/zsh/.zshrc' + +alias bashrc='nvim $HOME/.config/bash/.bashrc' +alias sbashrc='source $HOME/.config/bash/.bashrc' + +alias fishrc='nvim $HOME/.config/fish/config.fish' +alias sfishrc='source $HOME/.config/fish/config.fish' + +###### git ###### + +alias gcl='git clone' +alias gclgh='git clone https://github.com/' +alias ga='git add' +alias gc='git commit -m' +alias gp='git push' + +###### PATH ###### + +set -gx GPG_TTY (tty) +set -gx PATH $PATH /opt/homebrew/bin +set -gx PLAN9 /Users/linus/.sources/plan9port +set -gx PATH $PATH $PLAN9/bin diff --git a/.config/fish/fish_variables b/.config/fish/fish_variables @@ -0,0 +1,31 @@ +# This file contains fish universal variable definitions. +# VERSION: 3.0 +SETUVAR __fish_initialized:3800 +SETUVAR fish_color_autosuggestion:brblack +SETUVAR fish_color_cancel:\x2dr +SETUVAR fish_color_command:normal +SETUVAR fish_color_comment:red +SETUVAR fish_color_cwd:green +SETUVAR fish_color_cwd_root:red +SETUVAR fish_color_end:green +SETUVAR fish_color_error:brred +SETUVAR fish_color_escape:brcyan +SETUVAR fish_color_history_current:\x2d\x2dbold +SETUVAR fish_color_host:normal +SETUVAR fish_color_host_remote:yellow +SETUVAR fish_color_normal:normal +SETUVAR fish_color_operator:brcyan +SETUVAR fish_color_param:cyan +SETUVAR fish_color_quote:yellow +SETUVAR fish_color_redirection:cyan\x1e\x2d\x2dbold +SETUVAR fish_color_search_match:white\x1e\x2d\x2dbackground\x3dbrblack +SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack +SETUVAR fish_color_status:red +SETUVAR fish_color_user:brgreen +SETUVAR fish_color_valid_path:\x2d\x2dunderline +SETUVAR fish_key_bindings:fish_default_key_bindings +SETUVAR fish_pager_color_completion:normal +SETUVAR fish_pager_color_description:yellow\x1e\x2di +SETUVAR fish_pager_color_prefix:normal\x1e\x2d\x2dbold\x1e\x2d\x2dunderline +SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan +SETUVAR fish_pager_color_selected_background:\x2dr diff --git a/.config/fish/functions/fish_prompt.fish b/.config/fish/functions/fish_prompt.fish @@ -0,0 +1,25 @@ +function fish_prompt + # ── Farben ──────────────────────────────── + set -l color_cwd (set_color cyan) + set -l color_reset (set_color normal) + + # ── aktuelles Verzeichnis ───────────────── + printf '%s%s%s' $color_cwd (prompt_pwd) $color_reset + + # ── Git-Segment ─────────────────────────── + set -l git_seg (__fish_git_prompt \ + --always-show \ + --branch-name \ + --dirty-char '✗' \ + --staged-char '●' \ + --untracked-char '…' \ + --up-char '⇡' \ + --down-char '⇣') + + if test -n "$git_seg" + printf ' (%s)' "$git_seg" + end + + # ── Zeilenumbruch + Prompt-Symbol ───────── + printf '\n> ' +end diff --git a/.config/nvim/.DS_Store b/.config/nvim/.DS_Store Binary files differ. diff --git a/.config/nvim/.gitignore b/.config/nvim/.gitignore @@ -1,8 +0,0 @@ -tt.* -.tests -doc/tags -debug -.repro -foo.* -*.log -data diff --git a/.config/nvim/.neoconf.json b/.config/nvim/.neoconf.json @@ -1,15 +0,0 @@ -{ - "neodev": { - "library": { - "enabled": true, - "plugins": true - } - }, - "neoconf": { - "plugins": { - "lua_ls": { - "enabled": true - } - } - } -} diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua @@ -1,18 +1,2 @@ -require("config.lazy") --- local my_theme = require("linus-theme") --- my_theme.setup() +require("linus") -------------------------------------------------------------- - -vim.o.encoding = "utf-8" -vim.o.fileencoding = "utf-8" -vim.opt.spell = true -vim.opt.spelllang = { "en", "de" } - -vim.opt.tabstop = 4 -vim.opt.shiftwidth = 4 -vim.opt.expandtab = true - -------------------------------------------------------------- - -vim.opt.termguicolors = true diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json @@ -1,52 +1,20 @@ { - "LazyVim": { "branch": "main", "commit": "3f034d0a7f58031123300309f2efd3bb0356ee21" }, + "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, "LuaSnip": { "branch": "master", "commit": "458560534a73f7f8d7a11a146c801db00b081df0" }, - "bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" }, - "catppuccin": { "branch": "main", "commit": "1bf070129c0b6f77cc23f6a2212dcdc868308c52" }, - "cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" }, - "cmp-path": { "branch": "main", "commit": "c6635aae33a50d6010bf1aa756ac2398a2d54c32" }, - "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, - "conform.nvim": { "branch": "master", "commit": "374aaf384e2e841607b8e2fe63fa3ad01d111c91" }, - "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" }, - "fzf-lua": { "branch": "main", "commit": "b45881a2043d96506ba628f3bc65a4594b179c4e" }, - "gitsigns.nvim": { "branch": "main", "commit": "43b0c856ae5f32a195d83f4a27fe21d63e6c966c" }, - "grug-far.nvim": { "branch": "main", "commit": "78c8d27c6f3300bfa92bb535236732d8e9bcb614" }, "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, - "lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" }, - "lualine.nvim": { "branch": "master", "commit": "f4f791f67e70d378a754d02da068231d2352e5bc" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "d39a75bbce4b8aad5d627191ea915179c77c100f" }, - "mason.nvim": { "branch": "main", "commit": "7c7318e8bae7e3536ef6b9e86b9e38e74f2e125e" }, - "mini.ai": { "branch": "main", "commit": "e139eb1101beb0250fea322f8c07a42f0f175688" }, - "mini.comment": { "branch": "main", "commit": "fb867a9246f9b892cf51a8c84a3f8479cdf1558c" }, - "mini.icons": { "branch": "main", "commit": "397ed3807e96b59709ef3292f0a3e253d5c1dc0a" }, - "mini.nvim": { "branch": "main", "commit": "ed581c333798e08a68fbe1aecfdf95d3c1432d3f" }, - "mini.pairs": { "branch": "main", "commit": "69864a2efb36c030877421634487fd90db1e4298" }, "mini.starter": { "branch": "main", "commit": "d8038690eadf203a40863c3a9423df880a901d39" }, - "neo-tree.nvim": { "branch": "main", "commit": "73d63376352ac731379892e27ac7b3d9449148e3" }, - "neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" }, - "no-neck-pain.nvim": { "branch": "main", "commit": "53c8ef094c86e8897be2dcce0259d35914f6cdc0" }, - "noice.nvim": { "branch": "main", "commit": "0427460c2d7f673ad60eb02b35f5e9926cf67c59" }, + "neo-tree.nvim": { "branch": "v3.x", "commit": "f481de16a0eb59c985abac8985e3f2e2f75b4875" }, + "no-neck-pain.nvim": { "branch": "main", "commit": "a60021e199b585f560ffb380e8c464ab75d0030b" }, "nui.nvim": { "branch": "main", "commit": "f535005e6ad1016383f24e39559833759453564e" }, - "nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" }, - "nvim-lint": { "branch": "master", "commit": "9dfb77ef6c5092a19502883c02dc5a02ec648729" }, - "nvim-lspconfig": { "branch": "master", "commit": "61e5109c8cf24807e4ae29813a3a82b31821dd45" }, - "nvim-treesitter": { "branch": "master", "commit": "28d480e0624b259095e56f353ec911f9f2a0f404" }, - "nvim-treesitter-textobjects": { "branch": "master", "commit": "0e3be38005e9673d044e994b1e4b123adb040179" }, - "nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" }, - "nvim-ts-context-commentstring": { "branch": "main", "commit": "1b212c2eee76d787bbea6aa5e92a2b534e7b4f8f" }, - "nvim-web-devicons": { "branch": "master", "commit": "4c3a5848ee0b09ecdea73adcd2a689190aeb728c" }, + "nvim-treesitter": { "branch": "master", "commit": "066fd6505377e3fd4aa219e61ce94c2b8bdb0b79" }, + "nvim-web-devicons": { "branch": "master", "commit": "f1420728f59843eb2ef084406b3d0201a0a0932d" }, "persistence.nvim": { "branch": "main", "commit": "166a79a55bfa7a4db3e26fc031b4d92af71d0b51" }, "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, - "render-markdown.nvim": { "branch": "main", "commit": "dfc1299d9f32b53b34b7ac6c3a7553b5fd29977f" }, "snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" }, "substitute.nvim": { "branch": "main", "commit": "9db749a880e3dd3b0eb57f698aa8f1e1630e1f25" }, - "telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" }, - "telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, - "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, - "tokyonight.nvim": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" }, + "telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, "transparent.nvim": { "branch": "main", "commit": "8a2749a2fa74f97fe6557f61b89ac7fd873f3c21" }, "trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" }, - "ts-comments.nvim": { "branch": "main", "commit": "1bd9d0ba1d8b336c3db50692ffd0955fe1bb9f0c" }, - "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" } + "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }, + "zen-mode.nvim": { "branch": "main", "commit": "863f150ca321b3dd8aa1a2b69b5f411a220e144f" } } diff --git a/.config/nvim/lua/linus/init.lua b/.config/nvim/lua/linus/init.lua @@ -0,0 +1,5 @@ +require "linus.opts" +require "linus.keys" +require "linus.lazy" +require "linus.video" + diff --git a/.config/nvim/lua/linus/keys.lua b/.config/nvim/lua/linus/keys.lua @@ -0,0 +1,21 @@ +vim.g.mapleader = " " +vim.keymap.set("n", "<leader>q", ":q<CR>", { desc = "quit neovim" }) +vim.keymap.set("n", "<leader>w", "<CMD>write<CR>", { desc = "write file" }, { silent = true }) + +-- local map = LazyVim.safe_keymap_set + +vim.keymap.set("n", "<leader>z", "<cmd>NoNeckPain<cr>", { desc = "NoNeckPain: zen" }) +vim.keymap.set("n", "<leader>h", "<cmd>TransparentToggle<cr>", { desc = "Transparency: toggle" }) +-- +-- +-- +-- +-- vim.keymap.set("<leader>xx", "<cmd>TroubleToggle document_diagnostics<cr>", { desc = "Document Diagnostics (Trouble)" }) +-- vim.keymap.set("<leader>xX", "<cmd>TroubleToggle workspace_diagnostics<cr>", { desc = "Workspace Diagnostics (Trouble)" }) +-- vim.keymap.set("<leader>xL", "<cmd>TroubleToggle loclist<cr>", { desc = "Open Location List (Trouble)" }) +-- vim.keymap.set("<leader>xQ", "<cmd>TroubleToggle quickfix<cr>", { desc = "Open Quickfix List (Trouble)" }) +-- vim.keymap.set("gr", "<cmd>TroubleToggle lsp_references<cr>", { desc = "LSP References (Trouble)" }) +-- +-- +-- +-- diff --git a/.config/nvim/lua/linus/lazy.lua b/.config/nvim/lua/linus/lazy.lua @@ -0,0 +1,18 @@ +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not vim.loop.fs_stat(lazypath) then + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", + lazypath, + }) +end +vim.opt.rtp:prepend(lazypath) +require("lazy").setup( + { + spec = { import = "linus.plugins" }, + change_detection = { enabled = false }, + } +) diff --git a/.config/nvim/lua/linus/opts.lua b/.config/nvim/lua/linus/opts.lua @@ -0,0 +1,31 @@ +vim.o.encoding = "utf-8" +vim.o.fileencoding = "utf-8" +vim.opt.spell = true +vim.opt.spelllang = { "en", "de" } + +------------------------------------------------------------- + +vim.opt.clipboard = "unnamedplus" + +------------------------------------------------------------- + +vim.opt.tabstop = 4 +vim.opt.shiftwidth = 4 +vim.opt.expandtab = true +vim.opt.smartindent = false +vim.opt.wrap = false + +------------------------------------------------------------- + +vim.opt.number = true +vim.opt.relativenumber = true + +------------------------------------------------------------- + +vim.opt.swapfile = false +vim.opt.backup = false + +------------------------------------------------------------- + +vim.opt.termguicolors = true + diff --git a/.config/nvim/lua/linus/plugins/.DS_Store b/.config/nvim/lua/linus/plugins/.DS_Store Binary files differ. diff --git a/.config/nvim/lua/linus/plugins/comments.lua b/.config/nvim/lua/linus/plugins/comments.lua @@ -0,0 +1,8 @@ +-- add this to your lua/plugins.lua, lua/plugins/init.lua, or the file you keep your other plugins: +return { + 'numToStr/Comment.nvim', + lazy = false, + config = function() + require("Comment").setup() + end +} diff --git a/.config/nvim/lua/linus/plugins/luasnip.lua b/.config/nvim/lua/linus/plugins/luasnip.lua @@ -0,0 +1,24 @@ +return { + "L3MON4D3/LuaSnip", + version = "v2.*", + build = "make install_jsregexp", + config = function() + require("luasnip.loaders.from_lua").load({ paths = "~/.config/nvim/lua/linus/snippets/" }) + + local ls = require("luasnip") + -- vim.keymap.set({ "i", "s" }, "<C-c>", function() + -- ls.setup({ enable_autosnippets = false }) + -- end, { silent = false }) + -- vim.keymap.set({ "i" }, "<Tab>", function() ls.expand() end, { silent = true }) + vim.keymap.set({ "i" }, "<C-e>", function() ls.expand() end, { silent = true}) + vim.keymap.set({ "i", "s" }, "<C-J>", function() ls.jump(1) end, { silent = true }) + vim.keymap.set({ "i", "s" }, "<C-K>", function() ls.jump(-1) end, { silent = true }) + + + ls.config.setup({ + enable_autosnippets = true, + region_check_events = 'InsertEnter', + delete_check_events = 'InsertLeave' + }) + end +} diff --git a/.config/nvim/lua/linus/plugins/neo-tree.lua b/.config/nvim/lua/linus/plugins/neo-tree.lua @@ -0,0 +1,45 @@ +-- lua/plugins/neo-tree.lua +return { + { + "nvim-neo-tree/neo-tree.nvim", + branch = "v3.x", + cmd = "Neotree", + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-tree/nvim-web-devicons", -- file icons + "MunifTanjim/nui.nvim", + }, + keys = { + { "<leader>e", "<cmd>Neotree toggle float<cr>", desc = "Toggle File Explorer (Float)" }, + { "<leader>E", "<cmd>Neotree focus float<cr>", desc = "Focus File Explorer" }, + }, + opts = { + filesystem = { + follow_current_file = true, -- sync tree with open file + use_libuv_file_watcher = true, + }, + window = { + position = "float", + width = 40, + }, + default_component_configs = { + icon = { + folder_closed = "", + folder_open = "", + folder_empty = "", + }, + modified = { symbol = "●" }, + git_status = { + symbols = { + added = "+", -- new file + modified = "~", -- modified file + deleted = "✖", -- deleted file + renamed = "➜", + unstaged = "★", + }, + }, + }, + }, + }, +} + diff --git a/.config/nvim/lua/linus/plugins/neotree.lua b/.config/nvim/lua/linus/plugins/neotree.lua @@ -0,0 +1,24 @@ +return { + "nvim-neo-tree/neo-tree.nvim", + opts = { + filesystem = { + hijack_netrw_behavior = "open_current", -- Keeps Neo-tree from opening automatically + window = { + position = "float", + width = 30, + }, + }, + event_handlers = { + { + event = "file_opened", + handler = function() + require("neo-tree.command").execute({ action = "close" }) + end, + }, + }, + }, + keys = { + { "<leader>e", "<cmd>Neotree toggle float<cr>", desc = "Toggle File Explorer (Float)" }, + { "<leader>E", "<cmd>Neotree focus float<cr>", desc = "Focus File Explorer" }, + }, +} diff --git a/.config/nvim/lua/plugins/no-neck-pain.lua b/.config/nvim/lua/linus/plugins/no-neck-pain.lua diff --git a/.config/nvim/lua/plugins/opacity.lua b/.config/nvim/lua/linus/plugins/opacity.lua diff --git a/.config/nvim/lua/linus/plugins/persistence.lua b/.config/nvim/lua/linus/plugins/persistence.lua @@ -0,0 +1,6 @@ +return { + "folke/persistence.nvim", + event = "BufReadPre", -- load only when needed + opts = {}, +} + diff --git a/.config/nvim/lua/linus/plugins/snacks.lua b/.config/nvim/lua/linus/plugins/snacks.lua @@ -0,0 +1,24 @@ +-- lua/plugins/snacks.lua +return { + -- Disable nvim-notify, since snacks.notifier will handle notifications + { "rcarriga/nvim-notify", enabled = false }, + + { + "folke/snacks.nvim", + lazy = false, -- load snacks on startup (sets up global autocommands) + priority = 1000, -- ensure it loads first + opts = { + bigfile = { enabled = true }, -- better handling of large files + indent = { enabled = true }, -- indent guides and scope highlighting + input = { enabled = true }, -- improved vim.ui.input UI + notifier = { enabled = true }, -- pretty notifications (replaces vim.notify) + quickfile = { enabled = true }, -- faster file opening on startup + scope = { enabled = true }, -- scope-based buffer management + scroll = { enabled = true }, -- smooth scrolling + statuscolumn = { enabled = true }, -- nicer status/number column + words = { enabled = true }, -- highlight and navigate word under cursor + -- (Other snacks like explorer, dashboard, zen, etc. are left disabled to avoid overlap) + }, + }, +} + diff --git a/.config/nvim/lua/linus/plugins/starter-mini.lua b/.config/nvim/lua/linus/plugins/starter-mini.lua @@ -0,0 +1,53 @@ +return { + "echasnovski/mini.starter", + version = false, -- until 0.7.0 release + event = "VimEnter", + opts = function() + local logo = table.concat({ + "neovim", + }, "\n") + local pad = string.rep(" ", 1) + local new_section = function(name, action, section) + return { name = name, action = action, section = pad .. section } + end + + local starter = require("mini.starter") + local config = { + evaluate_single = true, + header = logo, + footer = "", + items = { + new_section("file search", function() vim.cmd("Telescope find_files") end, "Files"), + new_section("text search", function() vim.cmd("Telescope live_grep") end, "Files"), + new_section("recent files", function() vim.cmd("Telescope oldfiles") end, "Files"), + new_section("config", function() vim.cmd("e $MYVIMRC") end, "Config"), + new_section("lazy", function() vim.cmd("Lazy") end, "Config"), + new_section("restore session", function() require("persistence").load() end, "System"), + new_section("new file", function() vim.cmd("ene | startinsert") end, "System"), + new_section("quit", function() vim.cmd("q") end, "System"), + }, + content_hooks = { + starter.gen_hook.adding_bullet(pad .. "░ ", false), + starter.gen_hook.aligning("center", "center"), + }, + } + return config + end, + + config = function(_, config) + local starter = require("mini.starter") + starter.setup(config) + + vim.api.nvim_create_autocmd("User", { + pattern = "VimEnter", + callback = function() + local plugin_count = #vim.tbl_keys(require("lazy.core.config").plugins or {}) + local ms = vim.g.startuptime or 0 + local pad_footer = string.rep(" ", 8) + starter.config.footer = pad_footer .. "Neovim loaded " .. plugin_count .. " plugins" + pcall(starter.refresh, config) + end, + }) + end, +} + diff --git a/.config/nvim/lua/plugins/substitute.lua b/.config/nvim/lua/linus/plugins/substitute.lua diff --git a/.config/nvim/lua/linus/plugins/telescope.lua b/.config/nvim/lua/linus/plugins/telescope.lua @@ -0,0 +1,27 @@ +-- lua/plugins/telescope.lua +return { + { + "nvim-telescope/telescope.nvim", + version = "*", + cmd = "Telescope", + dependencies = { "nvim-lua/plenary.nvim" }, + opts = { + defaults = { + mappings = { + i = { + ["<C-j>"] = require("telescope.actions").move_selection_next, + ["<C-k>"] = require("telescope.actions").move_selection_previous, + }, + }, + }, + }, + keys = { + { "<leader>ff", "<cmd>Telescope find_files theme=dropdown<cr>", desc = "Find Files" }, + { "<leader>fr", "<cmd>Telescope oldfiles<cr>", desc = "Recent Files" }, + { "<leader>fg", "<cmd>Telescope live_grep<cr>", desc = "Find in Files (Grep)" }, + { "<leader>fw", "<cmd>Telescope grep_string<cr>", desc = "Find Word Under Cursor" }, + { "<leader>ft", "<cmd>Telescope grep_string search=TODO<cr>", desc = "Find TODO/FIXME" }, + {"<leader><space>", "<cmd>Telescope find_files<cr>", { desc = "Find Files" }} + }, + }, +} diff --git a/.config/nvim/lua/linus/plugins/transparent.lua b/.config/nvim/lua/linus/plugins/transparent.lua @@ -0,0 +1,16 @@ +-- lua/plugins/transparent.lua +return { + { + "xiyaowong/transparent.nvim", + lazy = false, -- load immediately to apply transparency + opts = { + extra_groups = { + "NormalFloat", -- make floating windows transparent + "NeoTreeNormal", -- neo-tree window + "NeoTreeNormalNC", -- neo-tree (no focus) + }, + exclude_groups = {}, -- no exclusions, all backgrounds cleared + }, + }, +} + diff --git a/.config/nvim/lua/linus/plugins/treesitter.lua b/.config/nvim/lua/linus/plugins/treesitter.lua @@ -0,0 +1,42 @@ +return { + "nvim-treesitter/nvim-treesitter", + build = ":TSUpdate", + config = function() + require("nvim-treesitter.configs").setup({ + ensure_installed = { + "vimdoc", "javascript", "typescript", "c", "lua", "rust", + "jsdoc", "bash", "typst", "svelte", "python", "glsl" + }, + sync_install = false, + auto_install = true, + indent = { + enable = true + }, + highlight = { + enable = true, + disable = function(lang, buf) + if lang == "html" then + print("disabled treesitter for html") + return true + end + local max_filesize = 100 * 1024 -- 100 KB + local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf)) + if ok and stats and stats.size > max_filesize then + vim.notify( + "File larger than 100KB treesitter disabled for performance", + vim.log.levels.WARN, + { title = "Treesitter" } + ) + return true + end + end, + + -- Setting this to true will run `:h syntax` and tree-sitter at the same time. + -- Set this to `true` if you depend on "syntax" being enabled (like for indentation). + -- Using this option may slow down your editor, and you may see some duplicate highlights. + -- Instead of true it can also be a list of languages + -- additional_vim_regex_highlighting = { "markdown" }, + }, + }) + end +} diff --git a/.config/nvim/lua/linus/plugins/trouble.lua b/.config/nvim/lua/linus/plugins/trouble.lua @@ -0,0 +1,16 @@ +-- lua/plugins/trouble.lua +return { + { + "folke/trouble.nvim", + cmd = { "Trouble", "TroubleToggle" }, + opts = { use_diagnostic_signs = true }, -- use icons from lsp diagnostics + keys = { + { "<leader>xx", "<cmd>TroubleToggle document_diagnostics<cr>", desc = "Document Diagnostics (Trouble)" }, + { "<leader>xX", "<cmd>TroubleToggle workspace_diagnostics<cr>", desc = "Workspace Diagnostics (Trouble)" }, + { "<leader>xL", "<cmd>TroubleToggle loclist<cr>", desc = "Open Location List (Trouble)" }, + { "<leader>xQ", "<cmd>TroubleToggle quickfix<cr>", desc = "Open Quickfix List (Trouble)" }, + { "gr", "<cmd>TroubleToggle lsp_references<cr>", desc = "LSP References (Trouble)" }, + }, + }, +} + diff --git a/.config/nvim/lua/linus/plugins/which-key.lua b/.config/nvim/lua/linus/plugins/which-key.lua @@ -0,0 +1,16 @@ +-- lua/plugins/which-key.lua +return { + { + "folke/which-key.nvim", + event = "VeryLazy", -- load which-key after other plugins/modules + init = function() + vim.o.timeout = true + vim.o.timeoutlen = 800 -- time to wait for key sequence (ms) + end, + opts = { + plugins = { spelling = true }, -- show spelling suggestions in which-key + win = { border = "single", }, + }, + }, +} + diff --git a/.config/nvim/lua/linus/plugins/zen.lua b/.config/nvim/lua/linus/plugins/zen.lua @@ -0,0 +1,63 @@ +return { + "folke/zen-mode.nvim", + opts = { + window = { + backdrop = 0.1, -- shade the backdrop of the Zen window. Set to 1 to keep the same as Normal + width = 0.16 * 4, -- width of the Zen window + height = 0.09 * 4, -- height of the Zen window + -- width = 120, + -- height = 1, + options = { + signcolumn = "no", -- disable signcolumn + number = true, -- disable number column + relativenumber = false, -- disable relative numbers + cursorline = false, -- disable cursorline + cursorcolumn = false, -- disable cursor column + foldcolumn = "0", -- disable fold column + list = false, -- disable whitespace characters + }, + }, + plugins = { + options = { + enabled = true, + ruler = false, -- disables the ruler text in the cmd line area + showcmd = false, -- disables the command in the last line of the screen + laststatus = 0, -- turn off the statusline in zen mode + }, + twilight = { enabled = true }, -- enable to start Twilight when zen mode opens + gitsigns = { enabled = false }, -- disables git signs + tmux = { enabled = true }, -- disables the tmux statusline + todo = { enabled = false }, -- if set to "true", todo-comments.nvim highlights will be disabled + kitty = { + enabled = false, + font = "+4", -- font size increment + }, + alacritty = { + enabled = false, + font = "16", -- font size + }, + -- this will change the font size on wezterm when in zen mode + -- See alse also the Plugins/Wezterm section in this projects README + wezterm = { + enabled = false, + -- can be either an absolute font size or the number of incremental steps + font = "+4", -- (10% increase per step) + }, + -- this will change the scale factor in Neovide when in zen mode + -- See alse also the Plugins/Wezterm section in this projects README + neovide = { + enabled = false, + -- Will multiply the current scale factor by this number + scale = 1.2 + -- disable the Neovide animations while in Zen mode + }, + }, + -- callback where you can add custom code when the Zen window opens + on_open = function(win) + end, + -- callback where you can add custom code when the Zen window closes + on_close = function() + end, + } + +} diff --git a/.config/nvim/lua/linus/snippets/all.lua b/.config/nvim/lua/linus/snippets/all.lua @@ -0,0 +1,5 @@ +return { + s("date", t(os.date("%Y/%m/%d"))), + s("mail", t("linus@behrens-familie.de")), +}, { +} diff --git a/.config/nvim/lua/linus/snippets/tex.lua b/.config/nvim/lua/linus/snippets/tex.lua @@ -0,0 +1,210 @@ +local ls = require("luasnip") +local s = ls.snippet +local sn = ls.snippet_node +local t = ls.text_node +local i = ls.insert_node +local f = ls.function_node +local d = ls.dynamic_node +local fmt = require("luasnip.extras.fmt").fmt +local fmta = require("luasnip.extras.fmt").fmta +local rep = require("luasnip.extras").rep + +local in_mathzone = function() + -- The `in_mathzone` function requires the VimTeX plugin + return vim.fn['vimtex#syntax#in_mathzone']() == 1 +end +return { + -- math modes + s({ trig = "mt", snippetType = "autosnippet" }, + fmta("$<>$ <>", { i(1), i(2) }) + ), + s({ trig = "mmt", snippetType = "autosnippet" }, + fmta("$$<>$$ <>", { i(1), i(2) }) + ), + s({ trig = "align", snippetType = "autosnippet" }, + fmta([[ + \begin{align*} + <> + \end{align*} + ]], { i(1) }) + ), + s({ trig = "text", snippetType = "autosnippet" }, + fmta("\\text{<>} ", { i(1) }), + { condition = in_mathzone } + ), + s({ trig = "piecewise", snippetType = "autosnippet" }, + fmta([[ + <>=\begin{cases} + <> & \text{<>} \\ + <> & \text{<>} + \end{cases} + ]], { i(1), i(2), i(3), i(4), i(5) }) + ), + s({ trig = "cases", snippetType = "autosnippet" }, + fmta([[ + \[ + \begin{minipage}{.50\linewidth} + \centering + \textbf{Case} <> + \begin{align*} + \end{align*} + \end{minipage}% + \begin{minipage}{.50\linewidth} + \centering + \textbf{Case} <> + \begin{align*} + \end{align*} + \end{minipage} + \] + ]], { i(1), i(2) }) + ), + s({ trig = "gaussian", snippetType = "autosnippet" }, + fmta([[ + \left[ + \begin{array}{ccc|c} + <> & <> & <> & <> \\ + \end{array} + \right] + ]], { i(1), i(2), i(3), i(4) }) + ), + s({ trig = "linsys", snippetType = "autosnippet" }, + fmta([[ + \[ + \begin{matrix} + <> & \\ + \end{matrix} + \] + ]], { i(1) }) + ), + -- font Modes + s({ trig = "Bld", snippetType = "autosnippet" }, + fmta("\\textbf{<>} ", { i(1) }) + ), + -- Discrete Math + s({ trig = "st.", snippetType = "autosnippet" }, + { t("such that ") } + ), + s({ trig = "fix12", snippetType = "autosnippet" }, + fmta("fix $x_1, x_2 \\in <>$", { i(1) }) + ), + s({ trig = "Rn", snippetType = "autosnippet" }, + { t("\\mathbb{R} ") }, + { t("\\mathbb{R}") }, + { condition = in_mathzone } + ), + s({ trig = "Nn", snippetType = "autosnippet" }, + { t("\\mathbb{N} ") }, + { t("\\mathbb{N}") }, + { condition = in_mathzone } + ), + s({ trig = "Qn", snippetType = "autosnippet" }, + { t("\\mathbb{Q} ") }, + { t("\\mathbb{Q}") }, + { condition = in_mathzone } + ), + s({ trig = "Zn", snippetType = "autosnippet" }, + { t("\\mathbb{Z} ") }, + { t("\\mathbb{Z}") }, + { condition = in_mathzone } + ), + s({ trig = "and", snippetType = "autosnippet" }, + { t("\\land ") }, + { condition = in_mathzone } + ), + s({ trig = "or", snippetType = "autosnippet" }, + { t("\\lor ") }, + { condition = in_mathzone } + ), + s({ trig = "implies", snippetType = "autosnippet" }, + { t("\\implies") }, + { condition = in_mathzone } + ), + s({ trig = "dots", snippetType = "autosnippet" }, + { t("\\dots") }, + { condition = in_mathzone } + ), + s({ trig = "forall", snippetType = "autosnippet" }, + { t("\\forall") }, + { condition = in_mathzone } + ), + s({ trig = "exists", snippetType = "autosnippet" }, + { t("\\exists") }, + { condition = in_mathzone } + ), + -- sets + s({ trig = "set", snippetType = "autosnippet" }, + fmta("\\{<> \\}", { i(1) }), + { condition = in_mathzone } + ), + s({ trig = "ins", snippetType = "autosnippet" }, + { t("\\in ") }, + { condition = in_mathzone } + ), + s({ trig = "sub", snippetType = "autosnippet" }, + { t("\\subseteq") }, + { condition = in_mathzone } + ), + s({ trig = "cross", snippetType = "autosnippet" }, + { t("\\times") }, + { condition = in_mathzone } + ), + s({ trig = "union", snippetType = "autosnippet" }, + { t("\\cup") }, + { condition = in_mathzone } + ), + s({ trig = "inter", snippetType = "autosnippet" }, + { t("\\cap") }, + { condition = in_mathzone } + ), + s({ trig = "empty", snippetType = "autosnippet" }, + { t("\\emptyset") }, + { condition = in_mathzone } + ), + -- general math + s({ trig = "geq", snippetType = "autosnippet" }, + { t("\\geq") }, + { condition = in_mathzone } + ), + s({ trig = "of", snippetType = "autosnippet" }, + { t("\\circ") }, + { condition = in_mathzone } + ), + s({ trig = "sq", snippetType = "autosnippet" }, + fmta("\\sqrt{<>}", { i(1) }), + { condition = in_mathzone } + ), + s({ trig = "FoG", snippetType = "autosnippet" }, + { t("f\\circ g") }, + { condition = in_mathzone } + ), + s({ trig = "GoF", snippetType = "autosnippet" }, + { t("g\\circ f") }, + { condition = in_mathzone } + ), + s({ trig = "neq", snippetType = "autosnippet" }, + { t("\\neq") }, + { condition = in_mathzone } + ), + s({ trig = "leq", snippetType = "autosnippet" }, + { t("\\leq") }, + { condition = in_mathzone } + ), + + -- fractions, subscript, superscript, and other regex triggers + s({ trig = "([%w%p]+)/", regTrig = true, wordTrig = false, snippetType = "autosnippet" }, + fmta("\\frac{<>}{<>}", + { f(function(_, snip) return snip.captures[1] end, {}), + i(1) + }), + { condition = in_mathzone } + ), + s({ trig = "([%a])([%d])", regTrig = true, wordTrig = false, snippetType = "autosnippet" }, + fmta("<>_{<><>}", + { + f(function(_, snip) return snip.captures[1] end, {}), + f(function(_, snip) return snip.captures[2] end, {}), + i(1) + }), + { condition = in_mathzone } + ), +} diff --git a/.config/nvim/lua/linus/video.lua b/.config/nvim/lua/linus/video.lua @@ -0,0 +1,112 @@ +local function aesthetic_record() + local current_file = vim.fn.expand("%:t") + local time = os.date("%H-%M") + local output_filename = string.format('%s(%s).mp4', current_file, time) + local full_path = vim.fn.expand("~/Movies/") .. output_filename + + local cmd = string.format( + [[ffmpeg -y -f avfoundation -r 30 -i "3:none" -filter:v "crop=1920:1080:(in_w-1920)/2:(in_h-1080)/2,unsharp=5:5:1.0:5:5:0.0" -preset ultrafast "%s"]], + full_path + ) + + print("Recording to: " .. full_path) + + local job_id = vim.fn.jobstart(cmd, { detach = true }) + vim.g.recording_job_id = job_id +end + +local function aesthetic_screenshot() + local current_file = vim.fn.expand("%:t") + local time = os.date("%H-%M") + local output_filename = string.format('%s(%s).png', current_file, time) + local full_path = vim.fn.expand("~/Pictures/") .. output_filename + + local cmd = string.format( + [[ffmpeg -y -f avfoundation -frames:v 1 -i "3" -filter:v "crop=1920:1080:(in_w-1920)/2:(in_h-1080)/2,unsharp=5:5:1.0:5:5:0.0" "%s"]], + full_path + ) + + + local result = vim.fn.system(cmd) + local exit_code = vim.v.shell_error + + if exit_code ~= 0 then + vim.notify("Failed to take screenshot:\n" .. result, vim.log.levels.ERROR) + else + vim.notify("Screenshot saved to: " .. full_path, vim.log.levels.INFO) + end +end + + + +local function aesthetic_record_hq() + local current_file = vim.fn.expand("%:t") + local time = os.date("%H-%M") + local output_filename = string.format('%s(%s)_hq.mp4', current_file, time) + local full_path = vim.fn.expand("~/Movies/") .. output_filename + + local cmd = string.format( + [[ffmpeg -y -f avfoundation -r 60 -i "3:none" -filter:v "crop=1920:1080:(in_w-1920)/2:(in_h-1080)/2,unsharp=7:7:1.0:7:7:0.0" -crf 18 -preset veryslow "%s"]], + full_path + ) + + print("High quality recording to: " .. full_path) + + local job_id = vim.fn.jobstart(cmd, { detach = true }) + vim.g.recording_job_id = job_id +end + +local function stop_record() + if vim.g.recording_job_id then + vim.fn.jobstop(vim.g.recording_job_id) + print("Recording stopped.") + vim.g.recording_job_id = nil + else + print("No active recording!") + end +end + +vim.api.nvim_create_user_command("Screenshot", aesthetic_screenshot, {}) +vim.api.nvim_create_user_command("RecordStop", stop_record, {}) +vim.api.nvim_create_user_command("Record", aesthetic_record, {}) +vim.api.nvim_create_user_command("RecordHQ", aesthetic_record_hq, {}) + + +local pickers = require "telescope.pickers" +local finders = require "telescope.finders" +local conf = require("telescope.config").values +local actions = require "telescope.actions" +local action_state = require "telescope.actions.state" + + +local recording_actions = { + "Screenshot", + "RecordStop", + "Record", + "RecordHQ", +} + +local function record_picker() + pickers.new({}, { + prompt_title = "Select Recording Action", + finder = finders.new_table { + results = recording_actions, + }, + sorter = conf.generic_sorter({}), + attach_mappings = function(prompt_bufnr, map) + actions.select_default:replace(function() + actions.close(prompt_bufnr) + local selection = action_state.get_selected_entry() + local cmd = selection[1] + if cmd then + vim.cmd(cmd) + else + vim.notify("No selection made!", vim.log.levels.WARN) + end + end) + return true + end, + }):find() +end + +vim.api.nvim_create_user_command("RecordPicker", record_picker, {}) diff --git a/.config/nvim/lua/plugins/bufferline.lua b/.config/nvim/lua/plugins/bufferline.lua @@ -1,42 +0,0 @@ --- ~/.config/nvim/lua/plugins/catppuccin.lua -return { - -- 1. Add the Catppuccin colourscheme - { - "catppuccin/nvim", - name = "catppuccin", - priority = 1000, -- load first to avoid a flash of default colours - lazy = false, -- start with Neovim, not on demand - opts = { - flavour = "mocha", -- latte | frappe | macchiato | mocha - transparent_background = false, - integrations = { - cmp = true, - telescope = { enabled = true }, - treesitter = true, - which_key = true, - -- add/remove integrations as you like - }, - }, - }, - - -- 2. Tell LazyVim to *use* that colourscheme - { - "LazyVim/LazyVim", - opts = { - colorscheme = "catppuccin", - }, - }, -} - --- return { --- -- add gruvbox --- { "ellisonleao/gruvbox.nvim" }, --- --- -- Configure LazyVim to load gruvbox --- { --- "LazyVim/LazyVim", --- opts = { --- colorscheme = "gruvbox", --- }, --- }, --- } diff --git a/.config/nvim/lua/plugins/snacks.lua b/.config/nvim/lua/plugins/snacks.lua @@ -1,14 +0,0 @@ -return { - "folke/snacks.nvim", - priority = 1000, - lazy = false, - opts = { - 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" }, - }, - }, -} diff --git a/.config/nvim/lua/plugins/telescope.lua b/.config/nvim/lua/plugins/telescope.lua @@ -1,41 +0,0 @@ -return { - "nvim-telescope/telescope.nvim", - branch = "0.1.x", - dependencies = { - "nvim-lua/plenary.nvim", - { "nvim-telescope/telescope-fzf-native.nvim", build = "make" }, - "nvim-tree/nvim-web-devicons", - "folke/todo-comments.nvim", - }, - -- Disable default LazyVim keybindings for Telescope - keys = {}, - - config = function() - local telescope = require("telescope") - local actions = require("telescope.actions") - - telescope.setup({ - defaults = { - path_display = { "smart" }, - mappings = { - i = { - ["<C-k>"] = actions.move_selection_previous, -- move to prev result - ["<C-j>"] = actions.move_selection_next, -- move to next result - ["<C-q>"] = actions.send_selected_to_qflist + actions.open_qflist, - }, - }, - }, - }) - - telescope.load_extension("fzf") - - -- set keymaps - local keymap = vim.keymap -- for conciseness - - keymap.set("n", "<leader>ff", "<cmd>Telescope find_files<cr>", { desc = "Fuzzy find files in cwd" }) - keymap.set("n", "<leader>fr", "<cmd>Telescope oldfiles<cr>", { desc = "Fuzzy find recent files" }) - keymap.set("n", "<leader>fs", "<cmd>Telescope live_grep<cr>", { desc = "Find string in cwd" }) - keymap.set("n", "<leader>fc", "<cmd>Telescope grep_string<cr>", { desc = "Find string under cursor in cwd" }) - keymap.set("n", "<leader>ft", "<cmd>TodoTelescope<cr>", { desc = "Find todos" }) - end, -} diff --git a/.config/nvim/stylua.toml b/.config/nvim/stylua.toml @@ -1,3 +0,0 @@ -indent_type = "Spaces" -indent_width = 2 -column_width = 120 -\ No newline at end of file diff --git a/.config/nvim/LICENSE b/.config/nvim2/LICENSE diff --git a/.config/nvim/README.md b/.config/nvim2/README.md diff --git a/.config/nvim/init.lua b/.config/nvim2/init.lua diff --git a/.config/nvim/lazy-lock.json b/.config/nvim2/lazy-lock.json diff --git a/.config/nvim/lazyvim.json b/.config/nvim2/lazyvim.json diff --git a/.config/nvim/lua/.DS_Store b/.config/nvim2/lua/.DS_Store Binary files differ. diff --git a/.config/nvim/lua/config/autocmds.lua b/.config/nvim2/lua/config/autocmds.lua diff --git a/.config/nvim/lua/config/highlite.lua b/.config/nvim2/lua/config/highlite.lua diff --git a/.config/nvim/lua/config/keymaps.lua b/.config/nvim2/lua/config/keymaps.lua diff --git a/.config/nvim/lua/config/lazy.lua b/.config/nvim2/lua/config/lazy.lua diff --git a/.config/nvim/lua/config/options.lua b/.config/nvim2/lua/config/options.lua diff --git a/.config/nvim/lua/plugins/disable.lua b/.config/nvim2/lua/plugins/disable.lua diff --git a/.config/nvim/lua/plugins/example.lua b/.config/nvim2/lua/plugins/example.lua diff --git a/.config/nvim/lua/plugins/lualine.lua b/.config/nvim2/lua/plugins/lualine.lua diff --git a/.config/nvim/lua/plugins/markview.lua b/.config/nvim2/lua/plugins/markview.lua diff --git a/.config/nvim/lua/plugins/mini.lua b/.config/nvim2/lua/plugins/mini.lua diff --git a/.config/nvim/lua/plugins/neotree.lua b/.config/nvim2/lua/plugins/neotree.lua diff --git a/.config/nvim/lua/plugins/no-neck-pain.lua b/.config/nvim2/lua/plugins/no-neck-pain.lua diff --git a/.config/nvim/lua/plugins/opacity.lua b/.config/nvim2/lua/plugins/opacity.lua diff --git a/.config/nvim/lua/plugins/render.lua b/.config/nvim2/lua/plugins/render.lua diff --git a/.config/nvim2/lua/plugins/snacks.lua b/.config/nvim2/lua/plugins/snacks.lua @@ -0,0 +1,14 @@ +return { + "folke/snacks.nvim", + priority = 1000, + lazy = false, + opts = { + 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" }, + }, + }, +} diff --git a/.config/nvim/lua/plugins/starter-mini.lua b/.config/nvim2/lua/plugins/starter-mini.lua diff --git a/.config/nvim/lua/plugins/substitute.lua b/.config/nvim2/lua/plugins/substitute.lua diff --git a/.config/nvim2/lua/plugins/telescope.lua b/.config/nvim2/lua/plugins/telescope.lua @@ -0,0 +1,43 @@ +return { + "nvim-telescope/telescope.nvim", + branch = "0.1.x", + dependencies = { + "nvim-lua/plenary.nvim", + { "nvim-telescope/telescope-fzf-native.nvim", build = "make" }, + "nvim-tree/nvim-web-devicons", + "folke/todo-comments.nvim", + }, + -- Disable default LazyVim keybindings for Telescope + keys = {}, + + config = function() + local telescope = require("telescope") + local actions = require("telescope.actions") + + telescope.setup({ + defaults = { + path_display = { "smart" }, + mappings = { + i = { + ["<C-k>"] = actions.move_selection_previous, -- move to prev result + ["<C-j>"] = actions.move_selection_next, -- move to next result + ["<C-q>"] = actions.send_selected_to_qflist + actions.open_qflist, + }, + }, + }, + }) + + telescope.load_extension("fzf") + + -- set keymaps + local keymap = vim.keymap -- for conciseness + + keymap.set("n", "<leader>ff", "<cmd>Telescope find_files<cr>", { desc = "Fuzzy find files in cwd" }) + keymap.set("n", "<leader>fr", "<cmd>Telescope oldfiles<cr>", { desc = "Fuzzy find recent files" }) + keymap.set("n", "<leader>fs", "<cmd>Telescope live_grep<cr>", { desc = "Find string in cwd" }) + keymap.set("n", "<leader>fc", "<cmd>Telescope grep_string<cr>", { desc = "Find string under cursor in cwd" }) + keymap.set("n", "<leader>ft", "<cmd>TodoTelescope<cr>", { desc = "Find todos" }) + keymap.set("n", "<leader><space>", "<cmd>Telescope find_files<cr>", { desc = "Find Files" }) + + end, +} diff --git a/.config/nvim/lua/plugins/todo-comment.lua b/.config/nvim2/lua/plugins/todo-comment.lua diff --git a/.config/nvim/lua/plugins/user/highlights.lua b/.config/nvim2/lua/plugins/user/highlights.lua diff --git a/.config/zsh/.zsh_history b/.config/zsh/.zsh_history @@ -54,3 +54,149 @@ mv zsh_* ./.config/zsh mv .zsh_* ./.config/zsh mkdir .config/zsh mv .zsh_* ./.config/zsh +cd +cd dotfiles +l +mkdir .config +l +mv ghostty .config +mv weechat .config +mv yazi .config +l +mv nvim .config +l +cd .config +l +l +l +cd .gnupg +l +cd . +.. +sudo .. +.. +cd .. +l +rm -gnupg +rm .gnupg +rm -rf .gnupg +l +cd .. +ln -s .config ./../ +l +ln -s ./.config ./../ +ln -s ./.config /Users/linus +ln -s /Users/linus/dotfiles/.config /Users/linus +c +git add -A +tree +tree -a +l +cd .sources +l +cd .. +git add -A +git add -A +gc "all .config" +git push +mv ./../.zshenv ./ +ln -s /Users/linus/dotfiles/.zshenv /Users/linus +l +cd .. +l +cd dotfiles +ga +ga -A +gc "zshenv" +gp +cd +c +e +brew install fish\ + +which fish\ + +sudo sh -c 'echo /opt/homebrew/bin/fish >> /etc/shells'\ + +chsh -s /opt/homebrew/bin/fish\ + +v +v +cd .config/zsh +v .zshrc +source .zshrc +v .zshrc +source .zshrc +cd +c +l +mv .gnupg ./.config/ +cd .lesshst +v .lesshst +rm .lesshst +l +rm .viminfo +v +mv .zsh_history ./.config/zsh +c +l +cd .sendme-send-38c604334af1fa92de80c8d958a492aa +l +cd data +l +cd .. +cd temo +cd temp +l +cd .. +tree +cd .. +rm -rf .sendme-send-38c604334af1fa92de80c8d958a492aa +l +cd .config +l +rm yazi +l +rm ghostty +rm nvim +rm weechat +l +cp * ./../dotfiles/.config +cp -r * ./../dotfiles/.config +l +cp -r .gnupg ./../dotfiles/.config +mv .gnupg ./../ +cd ,, +.. +cd .. +l +v zshenv +v .zshenv +rm -rf .config +l +cd .config +rm -rf .config +l +rm -rf .config +l +rm -rf .config +l +cd .config +l +cd +c +l +cd .config/git +l +cd config +l +cd .. +mv config/.gitconfig ./ +l +rm -rf config +cd +c +cd dotfiles +l +v install.sh +c