diff options
Diffstat (limited to 'files/config')
-rw-r--r-- | files/config/iris/iris.lock | 158 | ||||
-rw-r--r-- | files/config/iris/iris.toml | 84 | ||||
-rw-r--r-- | files/config/nvim/init.lua | 298 | ||||
-rw-r--r-- | files/config/ssh/config | 12 | ||||
-rw-r--r-- | files/config/xdg/mimeapps.list | 25 | ||||
-rw-r--r-- | files/config/xdg/user-dirs.dirs | 15 | ||||
-rw-r--r-- | files/config/zsh/zprofile | 11 | ||||
-rw-r--r-- | files/config/zsh/zshrc | 73 |
8 files changed, 676 insertions, 0 deletions
diff --git a/files/config/iris/iris.lock b/files/config/iris/iris.lock new file mode 100644 index 0000000..b6a3b40 --- /dev/null +++ b/files/config/iris/iris.lock @@ -0,0 +1,158 @@ +### IRIS - A locking plugin manager for vim +### Copyright © 2025 Freya Murphy <contact@freyacat.org> +### +### This file is part of IRIS +### +### IRIS is free software; you can redistribute it and/or modify it +### under the terms of the GNU General Public License as published by +### the Free Software Foundation; either version 3 of the License, or (at +### your option) any later version. +### +### IRIS is distributed in the hope that it will be useful, but +### WITHOUT ANY WARRANTY; without even the implied warranty of +### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +### GNU General Public License for more details. +### +### You should have received a copy of the GNU General Public License +### along with IRIS. If not, see <http://www.gnu.org/licenses/>. + +[[plugins]] +id = "vim-devicons" +url = "https://github.com/ryanoasis/vim-devicons" +commit = "71f239af28b7214eebb60d4ea5bd040291fb7e33" + +[[plugins]] +id = "nvim-web-devicons" +url = "https://github.com/nvim-tree/nvim-web-devicons" +commit = "aafa5c187a15701a7299a392b907ec15d9a7075f" + +[[plugins]] +id = "plenary" +url = "https://github.com/nvim-lua/plenary.nvim" +commit = "3707cdb1e43f5cea73afb6037e6494e7ce847a66" + +[[plugins]] +id = "lualine" +url = "https://github.com/nvim-lualine/lualine.nvim" +commit = "2a5bae925481f999263d6f5ed8361baef8df4f83" + +[[plugins]] +id = "bufferline" +url = "https://github.com/akinsho/bufferline.nvim" +commit = "17083c826a004bcb87d3a830c7710d0796a73bbf" + +[[plugins]] +id = "nvim-tree" +url = "https://github.com/nvim-tree/nvim-tree.lua" +commit = "d529a99f88e0dff02e0aa275db2f595cd252a2c8" + +[[plugins]] +id = "undotree" +url = "https://github.com/mbbill/undotree" +commit = "2556c6800b210b2096b55b66e74b4cc1d9ebbe4f" + +[[plugins]] +id = "trouble" +url = "https://github.com/folke/trouble.nvim" +commit = "4d36b8979287f5facc03fd6d955ace67db667e1d" + +[[plugins]] +id = "telescope" +url = "https://github.com/nvim-telescope/telescope.nvim" +commit = "415af52339215926d705cccc08145f3782c4d132" + +[[plugins]] +id = "fugitive" +url = "https://github.com/tpope/vim-fugitive" +commit = "174230d6a7f2df94705a7ffd8d5413e27ec10a80" + +[[plugins]] +id = "vsnip" +url = "https://github.com/hrsh7th/vim-vsnip" +commit = "02a8e79295c9733434aab4e0e2b8c4b7cea9f3a9" + +[[plugins]] +id = "vsnip_integ" +url = "https://github.com/hrsh7th/vim-vsnip-integ" +commit = "90ae474e8b05ed41e36d6f58382a9fbfb4b672c4" + +[[plugins]] +id = "friendly-snippets" +url = "https://github.com/rafamadriz/friendly-snippets" +commit = "efff286dd74c22f731cdec26a70b46e5b203c619" + +[[plugins]] +id = "cmp" +url = "https://github.com/hrsh7th/nvim-cmp" +commit = "8c82d0bd31299dbff7f8e780f5e06d2283de9678" + +[[plugins]] +id = "cmp_buffer" +url = "https://github.com/hrsh7th/cmp-buffer" +commit = "3022dbc9166796b644a841a02de8dd1cc1d311fa" + +[[plugins]] +id = "cmp_nvim_lsp" +url = "https://github.com/hrsh7th/cmp-nvim-lsp" +commit = "99290b3ec1322070bcfb9e846450a46f6efa50f0" + +[[plugins]] +id = "cmp_vsnip" +url = "https://github.com/hrsh7th/cmp-vsnip" +commit = "989a8a73c44e926199bfd05fa7a516d51f2d2752" + +[[plugins]] +id = "nvim-surround" +url = "https://github.com/kylechui/nvim-surround" +commit = "9f0cb495f25bff32c936062d85046fbda0c43517" + +[[plugins]] +id = "nerdcommenter" +url = "https://github.com/preservim/nerdcommenter" +commit = "66c07e4083ab02ed2540ac289cc602c70b858c13" + +[[plugins]] +id = "nvim-treesitter" +url = "https://github.com/nvim-treesitter/nvim-treesitter" +commit = "c7dc251cddf2cdef1fa279fa797799728a5bfd78" +run = "TSUpdate" + +[[plugins]] +id = "illuminate" +url = "https://github.com/RRethy/vim-illuminate" +commit = "5eeb7951fc630682c322e88a9bbdae5c224ff0aa" + +[[plugins]] +id = "todo" +url = "https://github.com/folke/todo-comments.nvim" +commit = "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" + +[[plugins]] +id = "catppuccin" +url = "https://github.com/catppuccin/nvim" +commit = "f67b886d65a029f12ffa298701fb8f1efd89295d" + +[[plugins]] +id = "lspconfig" +url = "https://github.com/neovim/nvim-lspconfig" +commit = "0913481440219390969ab56a3c33089679365ef7" + +[[plugins]] +id = "fidget" +url = "https://github.com/j-hui/fidget.nvim" +commit = "a0abbf18084b77d28bc70e24752e4f4fd54aea17" + +[[plugins]] +id = "ident-o-matic" +url = "https://github.com/Darazaki/indent-o-matic" +commit = "4d11e98f523d3c4500b1dc33f0d1a248a4f69719" + +[[plugins]] +id = "hologram" +url = "https://github.com/edluffy/hologram.nvim" +commit = "f5194f71ec1578d91b2e3119ff08e574e2eab542" + +[[plugins]] +id = "virt-column" +url = "https://github.com/lukas-reineke/virt-column.nvim" +commit = "b87e3e0864211a32724a2ebf3be37e24e9e2fa99" diff --git a/files/config/iris/iris.toml b/files/config/iris/iris.toml new file mode 100644 index 0000000..9949818 --- /dev/null +++ b/files/config/iris/iris.toml @@ -0,0 +1,84 @@ + +[plugins] + +# == Dependencies == # + +# provides nerd font glyphs +vim-devicons = "ryanoasis/vim-devicons" +nvim-web-devicons = "nvim-tree/nvim-web-devicons" + +# lua functions +plenary = "nvim-lua/plenary.nvim" + +# == Lines == # + +# mode line +lualine = "nvim-lualine/lualine.nvim" + +# buffer line +bufferline = "akinsho/bufferline.nvim" + +# == Menus == # + +# file menu +nvim-tree = "nvim-tree/nvim-tree.lua" + +# undo menu +undotree = "mbbill/undotree" + +# error menu +trouble = "folke/trouble.nvim" + +# grep and find menu +telescope = "nvim-telescope/telescope.nvim" + +# == Integrations == # + +# git +fugitive = "tpope/vim-fugitive" + +# == Auto complete == # + +# snippets +vsnip = "hrsh7th/vim-vsnip" +vsnip_integ = "hrsh7th/vim-vsnip-integ" +friendly-snippets = "rafamadriz/friendly-snippets" + +# auto completion engine +cmp = "hrsh7th/nvim-cmp" +cmp_buffer = "hrsh7th/cmp-buffer" +cmp_nvim_lsp = "hrsh7th/cmp-nvim-lsp" +cmp_vsnip = "hrsh7th/cmp-vsnip" + +# delimiter auto complete +nvim-surround = "kylechui/nvim-surround" + +# == LSP == # + +# comment functions +nerdcommenter = "preservim/nerdcommenter" + +# hilighter +nvim-treesitter = { url = "nvim-treesitter/nvim-treesitter", run = "TSUpdate" } +illuminate = "RRethy/vim-illuminate" + +# comment hilighter +todo = "folke/todo-comments.nvim" + +# theme +catppuccin = "catppuccin/nvim" + +# lsp auto configs +lspconfig = "neovim/nvim-lspconfig" + +# LSP notifications +fidget = "j-hui/fidget.nvim" + +# auto indent +ident-o-matic = "Darazaki/indent-o-matic" + +# image viewer +hologram = "edluffy/hologram.nvim" + +# 80 column bar +virt-column = "lukas-reineke/virt-column.nvim" diff --git a/files/config/nvim/init.lua b/files/config/nvim/init.lua new file mode 100644 index 0000000..f920e1a --- /dev/null +++ b/files/config/nvim/init.lua @@ -0,0 +1,298 @@ +--[[ CONFIG ]]-- + +-- global config for iris configuration +config = { + -- colorscheme for nvim + colorscheme = "catppuccin", + flavour = "mocha", + -- indentation + tab_width = 4, + expand_tab = false, + -- keybinds to be set to actions + keybinds = { + -- leader key + leader = ' ', + -- toggle menus + menus = { + -- file browser + browser = '<leader>e', + -- active buffers + buffers = '<leader>fb', + -- error list + error = '<leader>t', + -- find files + find = '<leader>ff', + -- grep files + grep = '<leader>fg', + -- help browser + help = '<leader>fh', + -- undo tree + undo = '<leader>u', + }, + -- lsp actions + lsp = { + hover = 'K', + action = '<leader>la', + references = '<leader>lr', + rename = '<leader>ln', + }, + -- completion + cmp = { + -- prev item + prev = '<C-p>', + -- next item + next = '<C-n>', + -- confirm + confirm = '<CR>', + -- complete + complete = '<C-Space>', + }, + -- disable active selection + noh = '<leader>h', + }, + -- treesitter languages + treesitter = { + "c", + "lua", + "rust", + "typescript", + "javascript", + "python", + "vim", + "vimdoc", + "query", + }, + -- lsp servers + lsps = { + -- rust + rust_analyzer = {}, + -- c / c++ + clangd = {}, + -- java + jdtls = {}, + }, +}; + +vim.call('iris#load') + +--[[ IMPORTS ]]-- + +local catppuccin = require('catppuccin') + +--[[ VIM ]]-- + +vim.opt.tabstop = config.tab_width +vim.opt.softtabstop = config.tab_width +vim.opt.shiftwidth = config.tab_width +vim.opt.expandtab = config.expand_tab +vim.opt.mouse = "a" +vim.opt.clipboard = "unnamedplus" +vim.opt.hlsearch = true +vim.opt.autoindent = true +vim.opt.ttyfast = true +vim.opt.number = true +vim.opt.relativenumber = true +vim.opt.rnu = true +vim.opt.swapfile = false +vim.opt.termguicolors = true + +-- remove trailing whitespace on save +vim.api.nvim_create_autocmd({ "BufWritePre" }, { + pattern = { "*" }, + command = [[%s/\s\+$//e]], +}) + +--[[ THEME ]]-- + +catppuccin.setup({ + flavour = config.flavour, + transparent_background = true, + integrations = { + cmp = true, + illuminate = { + enabled = true, + lsp = false + }, + nvimtree = true, + nvim_surround = true, + lsp_trouble = true, + telescope = { + enabled = true, + }, + treesitter = true, + }, +}) + +vim.cmd('colorscheme ' .. config.colorscheme) +vim.o.background = "dark" +vim.api.nvim_set_hl(0, "Normal", { bg = "none" }) +vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" }) +vim.api.nvim_set_hl(0, "NvimTreeNormal", { bg = "none" }) + +--[[ LINES ]]-- + +-- mode line +require('lualine').setup { + options = { + theme = config.colorscheme, + icons_enabled = true, + globalstatus = true, + }, +} + +-- buffer line +require("bufferline").setup {} + +--[[ MENUS ]]-- + +-- file browser +vim.g.loaded_netrw = 1 +vim.g.loaded_netrwPlugin = 1 +vim.opt.termguicolors = true + +require("nvim-tree").setup { + sort = { + sorter = "case_sensitive", + }, + view = { + width = 30, + }, + renderer = { + group_empty = true, + }, + actions = { + open_file = { + quit_on_open = true, + }, + }, + filters = { + dotfiles = false, + }, +} + +--[[ COMPLETION ]]-- + +-- completion engine +--local cmp = require('cmp') +-- +--local cmp_select = {behavior = cmp.SelectBehavior.Select} +--local cmp_mappings = cmp.mapping.preset.insert({ +-- [config.keybinds.cmp.prev] = cmp.mapping.select_prev_item(cmp_select), +-- [config.keybinds.cmp.next] = cmp.mapping.select_next_item(cmp_select), +-- [config.keybinds.cmp.confirm] = cmp.mapping.confirm({ select = true }), +-- [config.keybinds.cmp.complete] = cmp.mapping.complete(), +--}) +-- +--cmp_mappings['<Tab>'] = nil +--cmp_mappings['<S-Tab>'] = nil +-- +--cmp.setup { +-- snippet = { +-- expand = function(args) +-- vim.fn["vsnip#anonymous"](args.body) +-- end, +-- }, +-- sources = cmp.config.sources({ +-- { name = 'nvim_lsp' }, +-- { name = 'vsnip' }, +-- { name = 'buffer' }, +-- }), +-- mapping = cmp_mappings, +--} +-- +-- delimiter completion +require'nvim-surround'.setup {} + +--[[ LSP ]]-- + +local capabilities = require'cmp_nvim_lsp'.default_capabilities() +for lsp,config in pairs(config.lsps) do + config.capabilities = capabilities + require'lspconfig'[lsp].setup(config) +end + +-- treesitter +require'nvim-treesitter.configs'.setup { + ensure_installed = config.treesitter, + sync_install = false, + auto_install = true, + highlight = { + enable = true, + additional_vim_regex_highlighting = false, + }, + indent = { + enable = true + }, +} + +-- illuminate +require'illuminate'.configure { + providers = { + 'lsp', + 'treesitter', + 'regex', + }, +} + +-- todo comments +require('todo-comments').setup() + +-- auto indentation +require('indent-o-matic').setup { + max_lines = 2048, + standard_widths = { 2, 4, 8 }, + skip_multiline = true, +} + +-- image viewer +--require'hologram'.setup { +-- auto_display = true +--} + +-- 80 col bar +require'virt-column'.setup { + enabled = true, + virtcolumn = "80" +} + +-- notifications +require("fidget").setup { + notification = { + window = { + winblend = 0, + }, + }, +} + +--[[ KEYBINDS ]]-- + +vim.g.mapleader = config.keybinds.leader +vim.g.maplocalleader = config.keybinds.leader +vim.keymap.set('', '<leader>', '<Nop>', { noremap = true, silent = true }) + +local function bind(key, action, opts) + opts = opts or {} + vim.keymap.set('n', key, action, opts) +end + +bind(config.keybinds.noh, vim.cmd.noh) +bind(config.keybinds.menus.browser, vim.cmd.NvimTreeToggle) +bind(config.keybinds.menus.undo, vim.cmd.UndotreeToggle) +bind(config.keybinds.menus.error, function() require'trouble'.toggle() end) + +local telescope = require'telescope.builtin' +bind(config.keybinds.menus.buffers, telescope.buffers) +bind(config.keybinds.menus.find, telescope.find_files) +bind(config.keybinds.menus.grep, telescope.live_grep) +bind(config.keybinds.menus.help, telescope.help_tags) + +vim.api.nvim_create_autocmd('LspAttach', { + desc = 'LSP actions', + callback = function(event) + local opts = {buffer = event.buf} + bind(config.keybinds.lsp.hover, function() vim.lsp.buf.hover() end, opts) + bind(config.keybinds.lsp.action, function() vim.lsp.buf.code_action() end, opts) + bind(config.keybinds.lsp.references, function() vim.lsp.buf.references() end, opts) + bind(config.keybinds.lsp.rename, function() vim.lsp.buf.rename() end, opts) + end +}) diff --git a/files/config/ssh/config b/files/config/ssh/config new file mode 100644 index 0000000..4953469 --- /dev/null +++ b/files/config/ssh/config @@ -0,0 +1,12 @@ +Match Host * exec "gpg-connect-agent UPDATESTARTUPTTY /bye" + +Host *.in.freya.cat + User root + +Host *.cs.rit.edu + User tam2214 + +Host * + HostkeyAlgorithms +ssh-rsa + PubkeyAcceptedKeyTypes +ssh-rsa + KexAlgorithms -sntrup761x25519-sha512@openssh.com diff --git a/files/config/xdg/mimeapps.list b/files/config/xdg/mimeapps.list new file mode 100644 index 0000000..fd803cf --- /dev/null +++ b/files/config/xdg/mimeapps.list @@ -0,0 +1,25 @@ +[Default Applications] +text/html=firefox.desktop +image/png=imv.desktop +image/jpeg=imv.desktop +image/webp=imv.desktop +image/tga=imv.desktop +image/bmp=imv.desktop +image/gif=imv.desktop +video/mp4=mpv.desktop +video/x-msvideo=mpv.desktop +video/mkv=mpv.desktop +video/webm=mpv.desktop +audio/mp3=mpv.desktop +audio/wav=mpv.desktop +application/pdf=org.pwmt.zathura.desktop +application/x-shellscript=nvim.desktop +x-scheme-handler/http=firefox.desktop +x-scheme-handler/https=firefox.desktop +x-scheme-handler/about=firefox.desktop +x-scheme-handler/unknown=firefox.desktop +x-scheme-handler/mspa=unofficial-homestuck-collection.desktop + +[Added Associations] +x-scheme-handler/discord=discord.desktop; +x-scheme-handler/slack=slack.desktop; diff --git a/files/config/xdg/user-dirs.dirs b/files/config/xdg/user-dirs.dirs new file mode 100644 index 0000000..c347090 --- /dev/null +++ b/files/config/xdg/user-dirs.dirs @@ -0,0 +1,15 @@ +# This file is written by xdg-user-dirs-update +# If you want to change or add directories, just edit the line you're +# interested in. All local changes will be retained on the next run. +# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped +# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an +# absolute path. No other format is supported. +# +XDG_DESKTOP_DIR="$HOME/" +XDG_DOCUMENTS_DIR="$HOME/documents/" +XDG_DOWNLOAD_DIR="$HOME/downloads/" +XDG_MUSIC_DIR="$HOME/" +XDG_PICTURES_DIR="$HOME/" +XDG_PUBLICSHARE_DIR="$HOME/" +XDG_TEMPLATES_DIR="$HOME/" +XDG_VIDEOS_DIR="$HOME/" diff --git a/files/config/zsh/zprofile b/files/config/zsh/zprofile new file mode 100644 index 0000000..4815b36 --- /dev/null +++ b/files/config/zsh/zprofile @@ -0,0 +1,11 @@ +# dont attempt to launch a graphical +# env in tmux +if [ -n "$TMUX" ]; then + return +fi + +# only launch hyprland on tty 1 +if [ -z "${WAYLAND_DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ]; then + export XDG_CURRENT_DESKTOP=Hyprland + exec dbus-run-session Hyprland +fi diff --git a/files/config/zsh/zshrc b/files/config/zsh/zshrc new file mode 100644 index 0000000..b42d2bd --- /dev/null +++ b/files/config/zsh/zshrc @@ -0,0 +1,73 @@ +# zsh initalization file + +# export 'SHELL' and 'EDITOR' to child processes +export SHELL +export EDITOR="nvim" + +if [[ $- != *i* ]] +then + # We are being invoked from a non-interactive shell. If this + # is an SSH session (as in "ssh host command"), source + # /etc/profile so we get PATH and other essential variables. + [[ -n "$SSH_CLIENT" ]] && source /etc/profile + + # Don't do anything else. + return +fi + +# update PATH +PATH=$PATH:$HOME/.local/bin +PATH=$PATH:$HOME/.cargo/bin + +# vim mode >:) +# no ryan i am not copying you +set -o vi +set show-mode-in-prompt on + +# Set shell prompt using starship +if command -v "starship" > /dev/null; then + eval "$(starship init zsh)" +else + export PS1="$$USER: " +fi + +# aliases +alias rf="rm -fr" # remove le french hon hon hon +alias ls="ls --color=auto" +alias ip="ip --color=auto" +alias grep="grep --color=auto" +alias diff="diff --color=auto" +alias vim="nvim" +alias ssh='TERM=xterm-256color ssh' # xterm-kitty bad + +# nix rebuild +alias reconfigure="sudo nixos-rebuild switch --flake ~/.config/nix#$(hostname)" + +# manpages +export LESS_TERMCAP_md=$'\e[1;36m' +export LESS_TERMCAP_me=$'\e[0m' +export LESS_TERMCAP_se=$'\e[0m' +export LESS_TERMCAP_so=$'\e[1;92m' +export LESS_TERMCAP_ue=$'\e[0m' +export LESS_TERMCAP_us=$'\e[1;35m' +export GROFF_NO_SGR=1 + +# compinit +autoload compinit && compinit + +# keybinds +bindkey "\e[1;5D" backward-word +bindkey "\e[1;5C" forward-word +bindkey "\e[3;5~" kill-word +bindkey "\C-_" backward-kill-word +bindkey "\e[3~" delete-char +bindkey "\e[H" beginning-of-line +bindkey "\e[F" end-of-line +bindkey "\e\d" undo + +# gpg +export GPG_TTY=$(tty) +export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) + +# ricing +pfetch |