commit e9bf29cf0420a1199006fde7a856ba36339c1d54 Author: Eduardo Cueto-Mendoza Date: Thu Dec 19 12:03:05 2024 +0000 Initial commit diff --git a/.config/alacritty/alacritty.toml b/.config/alacritty/alacritty.toml new file mode 100755 index 0000000..2d4f30b --- /dev/null +++ b/.config/alacritty/alacritty.toml @@ -0,0 +1,32 @@ +[general] +live_config_reload = true + +import = [ + "~/.config/alacritty/themes/Homebrew.toml" +] + +[cursor.style] +shape = "Block" + +[font] +size = 20 +normal = { family = "Terminess Nerd Font", style = "Regular" } +bold = { family = "Terminess Nerd Font", style = "Bold" } +italic = { family = "Terminess Nerd Font", style = "Italic" } +bold_italic = { family = "Terminess Nerd Font", style = "Bold Italic" } +builtin_box_drawing = false + +[scrolling] +history = 100000 + +[selection] +save_to_clipboard = true + +[window] +opacity = 0.85 +startup_mode = "Maximized" + +[keyboard] +bindings = [ + {key="Space", mods="Command | Shift", mode="AppCursor | AppKeypad | ~Search | Alt | Vi", command="ToggleViMode"}, +] diff --git a/.config/alacritty/themes/Homebrew.toml b/.config/alacritty/themes/Homebrew.toml new file mode 100644 index 0000000..36cb7e2 --- /dev/null +++ b/.config/alacritty/themes/Homebrew.toml @@ -0,0 +1,35 @@ +# Colors (Homebrew) + +[colors.bright] +black = '#666666' +#blue = '#0000ff' +blue = '#0000b2' +cyan = '#00e5e5' +green = '#00d900' +magenta = '#e500e5' +red = '#e50000' +white = '#e5e5e5' +yellow = '#e5e500' + +[colors.cursor] +cursor = '#23ff18' +text = '#ff0018' + +[colors.normal] +black = '#000000' +#blue = '#0000b2' +blue = '#0000ff' +cyan = '#00a6b2' +green = '#00a600' +magenta = '#b200b2' +red = '#990000' +white = '#bfbfbf' +yellow = '#999900' + +[colors.primary] +background = '#000000' +foreground = '#00ff00' + +[colors.selection] +background = '#083905' +text = '#ffffff' diff --git a/.config/alacritty/themes/github_dark.toml b/.config/alacritty/themes/github_dark.toml new file mode 100755 index 0000000..dc3a338 --- /dev/null +++ b/.config/alacritty/themes/github_dark.toml @@ -0,0 +1,36 @@ +# github Alacritty Colors + +# Default colors +[colors.primary] +background = '#24292e' +foreground = '#d1d5da' + +# Normal colors +[colors.normal] +black = '#586069' +red = '#ea4a5a' +green = '#34d058' +yellow = '#ffea7f' +blue = '#2188ff' +magenta = '#b392f0' +cyan = '#39c5cf' +white = '#d1d5da' + +# Bright colors +[colors.bright] +black = '#959da5' +red = '#f97583' +green = '#85e89d' +yellow = '#ffea7f' +blue = '#79b8ff' +magenta = '#b392f0' +cyan = '#56d4dd' +white = '#fafbfc' + +[[colors.indexed_colors]] +index = 16 +color = '#d18616' + +[[colors.indexed_colors]] +index = 17 +color = '#f97583' diff --git a/.config/alacritty/themes/github_dark_colorblind.toml b/.config/alacritty/themes/github_dark_colorblind.toml new file mode 100755 index 0000000..76bb4f2 --- /dev/null +++ b/.config/alacritty/themes/github_dark_colorblind.toml @@ -0,0 +1,36 @@ +# github Alacritty Colors + +# Default colors +[colors.primary] +background = '#0d1117' +foreground = '#b3b1ad' + +# Normal colors +[colors.normal] +black = '#484f58' +red = '#ff7b72' +green = '#3fb950' +yellow = '#d29922' +blue = '#58a6ff' +magenta = '#bc8cff' +cyan = '#39c5cf' +white = '#b1bac4' + +# Bright colors +[colors.bright] +black = '#6e7681' +red = '#ffa198' +green = '#56d364' +yellow = '#e3b341' +blue = '#79c0ff' +magenta = '#d2a8ff' +cyan = '#56d4dd' +white = '#f0f6fc' + +[[colors.indexed_colors]] +index = 16 +color = '#d18616' + +[[colors.indexed_colors]] +index = 17 +color = '#ffa198' diff --git a/.config/alacritty/themes/github_dark_default.toml b/.config/alacritty/themes/github_dark_default.toml new file mode 100755 index 0000000..76bb4f2 --- /dev/null +++ b/.config/alacritty/themes/github_dark_default.toml @@ -0,0 +1,36 @@ +# github Alacritty Colors + +# Default colors +[colors.primary] +background = '#0d1117' +foreground = '#b3b1ad' + +# Normal colors +[colors.normal] +black = '#484f58' +red = '#ff7b72' +green = '#3fb950' +yellow = '#d29922' +blue = '#58a6ff' +magenta = '#bc8cff' +cyan = '#39c5cf' +white = '#b1bac4' + +# Bright colors +[colors.bright] +black = '#6e7681' +red = '#ffa198' +green = '#56d364' +yellow = '#e3b341' +blue = '#79c0ff' +magenta = '#d2a8ff' +cyan = '#56d4dd' +white = '#f0f6fc' + +[[colors.indexed_colors]] +index = 16 +color = '#d18616' + +[[colors.indexed_colors]] +index = 17 +color = '#ffa198' diff --git a/.config/alacritty/themes/github_dark_dimmed.toml b/.config/alacritty/themes/github_dark_dimmed.toml new file mode 100755 index 0000000..851cbfe --- /dev/null +++ b/.config/alacritty/themes/github_dark_dimmed.toml @@ -0,0 +1,36 @@ +# github Alacritty Colors + +# Default colors +[colors.primary] +background = '#22272e' +foreground = '#768390' + +# Normal colors +[colors.normal] +black = '#545d68' +red = '#f47067' +green = '#57ab5a' +yellow = '#c69026' +blue = '#539bf5' +magenta = '#b083f0' +cyan = '#39c5cf' +white = '#909dab' + +# Bright colors +[colors.bright] +black = '#636e7b' +red = '#ff938a' +green = '#6bc46d' +yellow = '#daaa3f' +blue = '#6cb6ff' +magenta = '#dcbdfb' +cyan = '#56d4dd' +white = '#cdd9e5' + +[[colors.indexed_colors]] +index = 16 +color = '#d18616' + +[[colors.indexed_colors]] +index = 17 +color = '#ff938a' diff --git a/.config/alacritty/themes/github_dark_high_contrast.toml b/.config/alacritty/themes/github_dark_high_contrast.toml new file mode 100755 index 0000000..e1b1b3e --- /dev/null +++ b/.config/alacritty/themes/github_dark_high_contrast.toml @@ -0,0 +1,33 @@ +# (Github Dark High Contrast) Colors for Alacritty + +# Default colors +[colors.primary] +background = '#0a0c10' +foreground = '#f0f3f6' + +# Cursor colors +[colors.cursor] +text = '#0a0c10' +cursor = '#f0f3f6' + +# Normal colors +[colors.normal] +black = '#7a828e' +red = '#ff9492' +green = '#26cd4d' +yellow = '#f0b72f' +blue = '#71b7ff' +magenta = '#cb9eff' +cyan = '#39c5cf' +white = '#d9dee3' + +# Bright colors +[colors.bright] +black = '#9ea7b3' +red = '#ffb1af' +green = '#4ae168' +yellow = '#f7c843' +blue = '#91cbff' +magenta = '#cb9eff' +cyan = '#39c5cf' +white = '#d9dee3' diff --git a/.config/alacritty/themes/github_dark_tritanopia.toml b/.config/alacritty/themes/github_dark_tritanopia.toml new file mode 100755 index 0000000..e24c822 --- /dev/null +++ b/.config/alacritty/themes/github_dark_tritanopia.toml @@ -0,0 +1,33 @@ +# (Github Dark Tritanopia) Colors for Alacritty + +# Default colors +[colors.primary] +background = '#0d1117' +foreground = '#c9d1d9' + +# Cursor colors +[colors.cursor] +text = '#0d1117' +cursor = '#c9d1d9' + +# Normal colors +[colors.normal] +black = '#484f58' +red = '#ff7b72' +green = '#58a6ff' +yellow = '#d29922' +blue = '#58a6ff' +magenta = '#bc8cff' +cyan = '#39c5cf' +white = '#b1bac4' + +# Bright colors +[colors.bright] +black = '#6e7681' +red = '#ffa198' +green = '#79c0ff' +yellow = '#e3b341' +blue = '#79c0ff' +magenta = '#bc8cff' +cyan = '#39c5cf' +white = '#b1bac4' diff --git a/.config/alacritty/themes/github_light.toml b/.config/alacritty/themes/github_light.toml new file mode 100755 index 0000000..4c6524a --- /dev/null +++ b/.config/alacritty/themes/github_light.toml @@ -0,0 +1,36 @@ +# github Alacritty Colors + +# Default colors +[colors.primary] +background = '#ffffff' +foreground = '#24292f' + +# Normal colors +[colors.normal] +black = '#24292e' +red = '#d73a49' +green = '#28a745' +yellow = '#dbab09' +blue = '#0366d6' +magenta = '#5a32a3' +cyan = '#0598bc' +white = '#6a737d' + +# Bright colors +[colors.bright] +black = '#959da5' +red = '#cb2431' +green = '#22863a' +yellow = '#b08800' +blue = '#005cc5' +magenta = '#5a32a3' +cyan = '#3192aa' +white = '#d1d5da' + +[[colors.indexed_colors]] +index = 16 +color = '#d18616' + +[[colors.indexed_colors]] +index = 17 +color = '#cb2431' diff --git a/.config/alacritty/themes/github_light_colorblind.toml b/.config/alacritty/themes/github_light_colorblind.toml new file mode 100755 index 0000000..4e02300 --- /dev/null +++ b/.config/alacritty/themes/github_light_colorblind.toml @@ -0,0 +1,36 @@ +# github Alacritty Colors + +# Default colors +[colors.primary] +background = '#ffffff' +foreground = '#0E1116' + +# Normal colors +[colors.normal] +black = '#24292f' +red = '#cf222e' +green = '#116329' +yellow = '#4d2d00' +blue = '#0969da' +magenta = '#8250df' +cyan = '#1b7c83' +white = '#6e7781' + +# Bright colors +[colors.bright] +black = '#57606a' +red = '#a40e26' +green = '#1a7f37' +yellow = '#633c01' +blue = '#218bff' +magenta = '#a475f9' +cyan = '#3192aa' +white = '#8c959f' + +[[colors.indexed_colors]] +index = 16 +color = '#d18616' + +[[colors.indexed_colors]] +index = 17 +color = '#a40e26' diff --git a/.config/alacritty/themes/github_light_default.toml b/.config/alacritty/themes/github_light_default.toml new file mode 100755 index 0000000..4e02300 --- /dev/null +++ b/.config/alacritty/themes/github_light_default.toml @@ -0,0 +1,36 @@ +# github Alacritty Colors + +# Default colors +[colors.primary] +background = '#ffffff' +foreground = '#0E1116' + +# Normal colors +[colors.normal] +black = '#24292f' +red = '#cf222e' +green = '#116329' +yellow = '#4d2d00' +blue = '#0969da' +magenta = '#8250df' +cyan = '#1b7c83' +white = '#6e7781' + +# Bright colors +[colors.bright] +black = '#57606a' +red = '#a40e26' +green = '#1a7f37' +yellow = '#633c01' +blue = '#218bff' +magenta = '#a475f9' +cyan = '#3192aa' +white = '#8c959f' + +[[colors.indexed_colors]] +index = 16 +color = '#d18616' + +[[colors.indexed_colors]] +index = 17 +color = '#a40e26' diff --git a/.config/alacritty/themes/github_light_high_contrast.toml b/.config/alacritty/themes/github_light_high_contrast.toml new file mode 100755 index 0000000..ee5b9c7 --- /dev/null +++ b/.config/alacritty/themes/github_light_high_contrast.toml @@ -0,0 +1,33 @@ +# (Github Light High Contrast) Colors for Alacritty + +# Default colors +[colors.primary] +background = '#ffffff' +foreground = '#010409' + +# Cursor colors +[colors.cursor] +text = '#ffffff' +cursor = '#0e1116' + +# Normal colors +[colors.normal] +black = '#0e1116' +red = '#a0111f' +green = '#024c1a' +yellow = '#3f2200' +blue = '#0349b4' +magenta = '#622cbc' +cyan = '#1b7c83' +white = '#66707b' + +# Bright colors +[colors.bright] +black = '#4b535d' +red = '#86061d' +green = '#055d20' +yellow = '#4e2c00' +blue = '#1168e3' +magenta = '#622cbc' +cyan = '#1b7c83' +white = '#66707b' diff --git a/.config/alacritty/themes/github_light_tritanopia.toml b/.config/alacritty/themes/github_light_tritanopia.toml new file mode 100755 index 0000000..6b68f6a --- /dev/null +++ b/.config/alacritty/themes/github_light_tritanopia.toml @@ -0,0 +1,33 @@ +# (Github Light Tritanopia) Colors for Alacritty + +# Default colors +[colors.primary] +background = '#ffffff' +foreground = '#1b1f24' + +# Cursor colors +[colors.cursor] +text = '#ffffff' +cursor = '#24292f' + +# Normal colors +[colors.normal] +black = '#24292f' +red = '#cf222e' +green = '#0550ae' +yellow = '#4d2d00' +blue = '#0969da' +magenta = '#8250df' +cyan = '#1b7c83' +white = '#6e7781' + +# Bright colors +[colors.bright] +black = '#57606a' +red = '#a40e26' +green = '#0969da' +yellow = '#633c01' +blue = '#218bff' +magenta = '#8250df' +cyan = '#1b7c83' +white = '#6e7781' diff --git a/.config/alacritty/themes/green-all.toml b/.config/alacritty/themes/green-all.toml new file mode 100755 index 0000000..479bb34 --- /dev/null +++ b/.config/alacritty/themes/green-all.toml @@ -0,0 +1,30 @@ +# Default colors +[colors.primary] +background = '#000000' +foreground = '#19a33a' + +[colors.cursor] +text = '#122637' +cursor = '#14f105' + +# Normal colors +[colors.normal] +black = '#282e2a' +red = '#70a542' +green = '#00ca07' +yellow = '#5fde6d' +blue = '#5f9d75' +magenta = '#678f71' +cyan = '#5e8d87' +white = '#718070' + +# Bright colors +[colors.bright] +black = '#394738' +red = '#66cc7b' +green = '#03e880' +yellow = '#74f0a3' +blue = '#81beba' +magenta = '#94bb9b' +cyan = '#8abeb7' +white = '#b2cab6' diff --git a/.config/fish/config.fish b/.config/fish/config.fish new file mode 100755 index 0000000..68996f6 --- /dev/null +++ b/.config/fish/config.fish @@ -0,0 +1,108 @@ +switch (uname) + case FreeBSD NetBSD DragonFly + echo Hi Beastie! + case Linux + echo Hi Tux! + case Darwin + #echo Hi Hexley! + fish_vi_key_bindings + set ID (id -u) + # Start tmux + if not set -q TMUX; and [ $ID != 0 ] + echo "Setting tmux" + set -g TMUX tmux new-session -d -s base + eval $TMUX + tmux attach-session -d -t base + end + + # PATH + # Local PATH + #export PATH=$PATH:$HOME/.local/bin + + ## Ruby PATH + #export PATH="/opt/homebrew/opt/ruby/bin:$PATH" + + ## Homebrew binaries PATH + #export PATH="/opt/homebrew/bin:$PATH" + #export PATH="/opt/homebrew/sbin:$PATH" + #eval "$(brew shellenv)" + + ## pyenv + #export PYENV_ROOT="$HOME/.pyenv" + #export PATH="$PYENV_ROOT/bin:$PATH" + pyenv init - | source + status --is-interactive; and pyenv virtualenv-init - | source + + # VARIABLES + if [ $ID != 0 ] + # ssh and gpg + set -x GPG_TTY (tty) + set -x SSH_AUTH_SOCK (gpgconf --list-dirs agent-ssh-socket) + gpgconf --launch gpg-agent + gpg-connect-agent updatestartuptty /bye > /dev/null + end + + # Editor + export EDITOR='nvim' + + # Manpager + export PAGER='nvim +Man!' + + # Term for ssh + #export TERM='xterm-256color' + + # Homebrew + export HOMEBREW_NO_AUTO_UPDATE=1 + export HOMEBREW_NO_ENV_HINTS=1 + + # DBUS for zathura + #export DBUS_LAUNCHD_SESSION_BUS_SOCKET=/tmp/(id -u) + #export DBUS_SESSION_BUS_ADDRESS='unix:path='$DBUS_LAUNCHD_SESSION_BUS_SOCKET + #if pgrep -x dbus-daemon &> /dev/null + # printf (_ "%sdbus-daemon%s is running\n") (set_color red) (set_color normal) + #else + # #echo "dbus-daemon is not running" + # dbus-daemon --fork --session --address=$DBUS_SESSION_BUS_ADDRESS + #end + + + # ALIAS + # convinience + alias doas='sudo' + + # ls + alias ls='colorls' + + # neovim + alias vi='nvim' + alias vim='nvim' + + # mutt + #alias mutt='neomutt' + + # rsync + alias rsync='rsync -h -v -r -P -p -t --stats' + + # wget folder + alias wget_f='wget -r -np -R "index.html*"' + + # btop + alias top='btop' + + # git signed + function git --wraps git + switch $argv[1] + case commit + /usr/bin/git commit -S + case tag + /usr/bin/git tag -S + case '*' + /usr/bin/git $argv + end + end + + + case '*' + echo Hi, stranger! +end + diff --git a/.config/fish/fish_variables b/.config/fish/fish_variables new file mode 100755 index 0000000..76e2248 --- /dev/null +++ b/.config/fish/fish_variables @@ -0,0 +1,33 @@ +# This file contains fish universal variable definitions. +# VERSION: 3.0 +SETUVAR --export PYENV_ROOT:/Users/administrator/\x2epyenv +SETUVAR __fish_initialized:3400 +SETUVAR fish_color_autosuggestion:brblack +SETUVAR fish_color_cancel:\x2dr +SETUVAR fish_color_command:blue +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:bryellow\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_vi_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 +SETUVAR fish_user_paths:/Users/administrator/\x2elocal/bin\x1e/opt/homebrew/opt/ruby/bin\x1e/opt/homebrew/sbin\x1e/opt/homebrew/bin diff --git a/.config/fish/functions/fish_greeting.fish b/.config/fish/functions/fish_greeting.fish new file mode 100755 index 0000000..84d3d12 --- /dev/null +++ b/.config/fish/functions/fish_greeting.fish @@ -0,0 +1,21 @@ +function fish_greeting + if not set -q fish_greeting + set -l line1 (printf (_ 'Welcome %sEduardo%s, remember to drink water!') (set_color yellow) (set_color normal)) + set -g fish_greeting "$line1" + end + + if set -q fish_private_mode + set -l line (_ "fish is running in private mode, history will not be persisted.") + if set -q fish_greeting[1] + set -g fish_greeting $fish_greeting\n$line + else + set -g fish_greeting $line + end + end + + # The greeting used to be skipped when fish_greeting was empty (not just undefined) + # Keep it that way to not print superfluous newlines on old configuration + test -n "$fish_greeting" + and echo $fish_greeting +end + diff --git a/.config/nvim/.gitignore b/.config/nvim/.gitignore new file mode 100755 index 0000000..21c7ff5 --- /dev/null +++ b/.config/nvim/.gitignore @@ -0,0 +1,2 @@ +*.json +config/* diff --git a/.config/nvim/LICENSE b/.config/nvim/LICENSE new file mode 100755 index 0000000..1b9c40c --- /dev/null +++ b/.config/nvim/LICENSE @@ -0,0 +1,28 @@ +BSD 3-Clause License + +Copyright (c) 2023, Eduardo Cueto Mendoza + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/.config/nvim/README.md b/.config/nvim/README.md new file mode 100755 index 0000000..8e5a1d7 --- /dev/null +++ b/.config/nvim/README.md @@ -0,0 +1,2 @@ +# nvim +my neovim configuration diff --git a/.config/nvim/TODO.md b/.config/nvim/TODO.md new file mode 100755 index 0000000..c97fd22 --- /dev/null +++ b/.config/nvim/TODO.md @@ -0,0 +1,6 @@ +# TODO + +- [ ] config + - [ ] better git integration + - [ ] renew LaTeX configuration for Lazy + - [ ] set better key maps and options diff --git a/.config/nvim/after/plugin/color.lua b/.config/nvim/after/plugin/color.lua new file mode 100755 index 0000000..169b298 --- /dev/null +++ b/.config/nvim/after/plugin/color.lua @@ -0,0 +1,16 @@ +--require("tokyonight").setup { +-- transparent = false, +-- -- styles = { +-- -- sidebars = "transparent", +-- -- floats = "transparent", +-- -- } +--} +-- +--vim.cmd [[colorscheme tokyonight-night]] +---- vim.cmd [[colorscheme tokyonight-day]] +---- vim.cmd [[hi Normal guibg=none]] + +--vim.cmd [[colorscheme xterm16]] +--vim.cmd [[Brightness low standard]] +vim.cmd [[set notermguicolors]] +vim.cmd [[hi Normal guibg=none]] diff --git a/.config/nvim/after/plugin/dictionary-gb.txt b/.config/nvim/after/plugin/dictionary-gb.txt new file mode 100755 index 0000000..936a363 --- /dev/null +++ b/.config/nvim/after/plugin/dictionary-gb.txt @@ -0,0 +1,17 @@ +CIFAR +MNIST +LeNet +MUL +BCNN +Grangegorman +Cueto +Mendoza +Maynooth +Frobenius +Neuromorphic +neuromorphic +NN +pytorch +Pytorch +SOTA + diff --git a/.config/nvim/after/plugin/harpoon.lua b/.config/nvim/after/plugin/harpoon.lua new file mode 100755 index 0000000..9142d91 --- /dev/null +++ b/.config/nvim/after/plugin/harpoon.lua @@ -0,0 +1,10 @@ +local mark = require("harpoon.mark") +local ui = require("harpoon.ui") + +vim.keymap.set("n", "a", mark.add_file, { desc = "Harpoon: Mark File"}) +vim.keymap.set("n", "", ui.toggle_quick_menu, { desc = "Toggle Harpoon Menu"}) + +vim.keymap.set("n", "", function() ui.nav_file(1) end) +vim.keymap.set("n", "", function() ui.nav_file(2) end) +vim.keymap.set("n", "", function() ui.nav_file(3) end) +vim.keymap.set("n", "", function() ui.nav_file(4) end) diff --git a/.config/nvim/after/plugin/lsp.lua b/.config/nvim/after/plugin/lsp.lua new file mode 100755 index 0000000..a62a8e5 --- /dev/null +++ b/.config/nvim/after/plugin/lsp.lua @@ -0,0 +1,415 @@ +local lsp = require('lsp-zero') + +local f = io.popen("uname -s") +if (f ~= nil) then + MY_OS = f:read("*a") + MY_OS = string.gsub(MY_OS, "%s+", "") + f:close() +end + +local f = io.popen("uname -m") +if (f ~= nil) then + MY_ARCH = f:read("*a") + MY_ARCH = string.gsub(MY_ARCH, "%s+", "") + f:close() +end + +lsp.preset("recommended") + +if (MY_OS == 'Linux') +then + if (MY_ARCH == 'aarch64') + then + lsp.ensure_installed({ + -- Replace these with whatever servers you want to install + 'bashls', + 'julials', + 'ltex', + 'pylsp', + 'rust_analyzer', + }) + else + lsp.ensure_installed({ + -- Replace these with whatever servers you want to install + 'bashls', + 'clangd', + 'cmake', + 'julials', + 'lua_ls', + 'ltex', + 'pylsp', + 'rust_analyzer', + }) + + end +elseif (MY_OS == 'FreeBSD') or (MY_OS == 'OpenBSD') +then + lsp.ensure_installed({ + -- Replace these with whatever servers you want to install + 'bashls', + 'pylsp' + }) +elseif (MY_OS == 'Darwin') +then + lsp.ensure_installed({ + -- Replace these with whatever servers you want to install + 'clangd', + 'cmake', + 'julials', + 'lua_ls', + 'ltex', + 'pylsp', + 'rust_analyzer', + }) +else + print('Should never be here LSP') +end + +vim.cmd([[ +set rtp^=~/.opam/default/share/ocp-indent/vim +]]) + +local cmp = require("cmp") +local cmp_select = { behavior = cmp.SelectBehavior.Select } +local cmp_mappings = lsp.defaults.cmp_mappings({ + [""] = cmp.mapping.select_prev_item(cmp_select), + [""] = cmp.mapping.select_next_item(cmp_select), + [""] = cmp.mapping.confirm({ select = true }), + [""] = cmp.mapping.confirm({ select = true }), + [''] = cmp.mapping.complete(), +}) + +lsp.setup_nvim_cmp({ + mapping = cmp_mappings +}) + +lsp.on_attach(function(client, bufnr) + local opts = { buffer = bufnr, remap = false } + + vim.keymap.set("n", "gr", function() vim.lsp.buf.references() end, opts, { desc = "LSP Goto Reference" }) + vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts, { desc = "LSP Goto Definition" }) + vim.keymap.set("n", "K", function() vim.lsp.buf.hover() end, opts, { desc = "LSP Hover" }) + vim.keymap.set("n", "vws", function() vim.lsp.buf.workspace_symbol() end, opts, + { desc = "LSP Workspace Symbol" }) + vim.keymap.set("n", "vd", function() vim.diagnostic.setloclist() end, opts, { desc = "LSP Show Diagnostics" }) + vim.keymap.set("n", "[d", function() vim.diagnostic.goto_next() end, opts, { desc = "Next Diagnostic" }) + vim.keymap.set("n", "]d", function() vim.diagnostic.goto_prev() end, opts, { desc = "Previous Diagnostic" }) + vim.keymap.set("n", "vca", function() vim.lsp.buf.code_action() end, opts, { desc = "LSP Code Action" }) + vim.keymap.set("n", "vrr", function() vim.lsp.buf.references() end, opts, { desc = "LSP References" }) + vim.keymap.set("n", "vrn", function() vim.lsp.buf.rename() end, opts, { desc = "LSP Rename" }) + vim.keymap.set("i", "", function() vim.lsp.buf.signature_help() end, opts, { desc = "LSP Signature Help" }) +end) + + +if (MY_OS == 'Linux') +then + -- Installed for Linux + require('lspconfig').bashls.setup({}) + + require('lspconfig').clangd.setup({}) + + require('lspconfig').cmake.setup({}) + + --require('lspconfig').gopls.setup({}) + + require('lspconfig').julials.setup({}) + + --require('lspconfig').lua_ls.setup(lsp.nvim_lua_ls()) + require('lspconfig').lua_ls.setup({ + settings = { + Lua = { + runtime = { + -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim) + version = 'LuaJIT', + }, + diagnostics = { + -- Get the language server to recognize the `vim` global + globals = { 'vim' }, + neededFileStatus = { + ["codestyle-check"] = "Any", + }, + }, + workspace = { + -- Make the server aware of Neovim runtime files + library = vim.api.nvim_get_runtime_file("", true), + }, + -- Do not send telemetry data containing a randomized but unique identifier + telemetry = { + enable = false, + }, + format = { + enable = true, + -- Put format options here + -- NOTE: the value should be STRING!! + defaultConfig = { + indent_style = "space", + indent_size = "4", + } + }, + }, + }, + }) + + local path = vim.fn.stdpath("config") .. "/after/plugin/dictionary-gb.txt" + local words = {} + + for word in io.open(path, "r"):lines() do + table.insert(words, word) + end + + require('lspconfig').ltex.setup({ + settings = { + ltex = { + language = "en-GB", + dictionary = { + ["en-GB"] = words, + }, + }, + }, + }) + + require('lspconfig').pylsp.setup { + settings = { + pylsp = { + plugins = { + -- formatter options + black = { enabled = true }, + autopep8 = { enabled = false }, + yapf = { enabled = false }, + -- linter options + pylint = { enabled = false, executable = "pylint" }, + pyflakes = { enabled = false }, + pycodestyle = { enabled = true, maxLineLength = 110 }, + -- type checker + pylsp_mypy = { enabled = true }, + -- auto-completion options + jedi_completion = { fuzzy = true }, + -- import sorting + pyls_isort = { enabled = true }, + }, + }, + }, + flags = { + debounce_text_changes = 200, + }, + } + + require('lspconfig').rust_analyzer.setup({ + settings = { + ["rust-analyzer"] = { + diagnostics = { + enable = false; + } + } + } + }) + + +elseif (MY_OS == 'FreeBSD') or (MY_OS == 'OpenBSD') +then + -- Installed for BSD + require('lspconfig').bashls.setup({}) + + require('lspconfig').clangd.setup({}) + + require('lspconfig').cmake.setup({}) + + require('lspconfig').ltex.setup({ + settings = { + ltex = { + language = "en-GB", + dictionary = { + ["en-GB"] = words, + }, + }, + }, + }) + + require('lspconfig').pylsp.setup { + settings = { + pylsp = { + plugins = { + -- formatter options + black = { enabled = true }, + autopep8 = { enabled = false }, + yapf = { enabled = false }, + -- linter options + pylint = { enabled = false, executable = "pylint" }, + pyflakes = { enabled = false }, + pycodestyle = { enabled = true, maxLineLength = 110 }, + -- type checker + pylsp_mypy = { enabled = true }, + -- auto-completion options + jedi_completion = { fuzzy = true }, + -- import sorting + pyls_isort = { enabled = true }, + }, + }, + }, + flags = { + debounce_text_changes = 200, + }, + } + + require('lspconfig').rust_analyzer.setup({ + settings = { + ["rust-analyzer"] = { + diagnostics = { + enable = false; + } + } + } + }) + + +elseif (MY_OS == 'Darwin') +then + -- Installed for Linux + require('lspconfig').clangd.setup({}) + + require('lspconfig').cmake.setup({}) + + --require('lspconfig').gopls.setup({}) + + require('lspconfig').julials.setup({}) + + --require('lspconfig').lua_ls.setup(lsp.nvim_lua_ls()) + require('lspconfig').lua_ls.setup({ + settings = { + Lua = { + runtime = { + -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim) + version = 'LuaJIT', + }, + diagnostics = { + -- Get the language server to recognize the `vim` global + globals = { 'vim' }, + neededFileStatus = { + ["codestyle-check"] = "Any", + }, + }, + workspace = { + -- Make the server aware of Neovim runtime files + library = vim.api.nvim_get_runtime_file("", true), + }, + -- Do not send telemetry data containing a randomized but unique identifier + telemetry = { + enable = false, + }, + format = { + enable = true, + -- Put format options here + -- NOTE: the value should be STRING!! + defaultConfig = { + indent_style = "space", + indent_size = "4", + } + }, + }, + }, + }) + + local path = vim.fn.stdpath("config") .. "/after/plugin/dictionary-gb.txt" + local words = {} + + for word in io.open(path, "r"):lines() do + table.insert(words, word) + end + + require('lspconfig').ltex.setup({ + settings = { + ltex = { + language = "en-GB", + dictionary = { + ["en-GB"] = words, + }, + }, + }, + }) + + require('lspconfig').pylsp.setup { + settings = { + pylsp = { + plugins = { + -- formatter options + black = { enabled = true }, + autopep8 = { enabled = false }, + yapf = { enabled = false }, + -- linter options + pylint = { enabled = false, executable = "pylint" }, + pyflakes = { enabled = false }, + pycodestyle = { enabled = true, maxLineLength = 110 }, + -- type checker + pylsp_mypy = { enabled = true }, + -- auto-completion options + jedi_completion = { fuzzy = true }, + -- import sorting + pyls_isort = { enabled = true }, + }, + }, + }, + flags = { + debounce_text_changes = 200, + }, + } + + require('lspconfig').rust_analyzer.setup({ + settings = { + ["rust-analyzer"] = { + diagnostics = { + enable = false; + } + } + } + }) + +else + print('Should never be here LSP config') +end + + + +lsp.setup() + +local cmp_action = require('lsp-zero').cmp_action() + +require('luasnip.loaders.from_vscode').lazy_load() + +-- `/` cmdline setup. +cmp.setup.cmdline('/', { + mapping = cmp.mapping.preset.cmdline(), + sources = { + { name = 'buffer' } + } +}) + +-- `:` cmdline setup. +cmp.setup.cmdline(':', { + mapping = cmp.mapping.preset.cmdline(), + sources = cmp.config.sources({ + { name = 'path' } + }, { + { + name = 'cmdline', + option = { + ignore_cmds = { 'Man', '!' } + } + } + }) +}) + +cmp.setup({ + sources = { + { name = 'nvim_lsp' }, + { name = 'luasnip', keyword_length = 2 }, + { name = 'buffer', keyword_length = 3 }, + { name = 'path' }, + }, + mapping = { + [''] = cmp_action.luasnip_jump_forward(), + [''] = cmp_action.luasnip_jump_backward(), + [''] = cmp_action.luasnip_supertab(), + [''] = cmp_action.luasnip_shift_supertab(), + }, +}) + diff --git a/.config/nvim/after/plugin/neoclip.lua b/.config/nvim/after/plugin/neoclip.lua new file mode 100755 index 0000000..c7f339a --- /dev/null +++ b/.config/nvim/after/plugin/neoclip.lua @@ -0,0 +1,59 @@ +require('neoclip').setup({ + history = 1000, + enable_persistent_history = false, + length_limit = 1048576, + continuous_sync = false, + db_path = vim.fn.stdpath("data") .. "/databases/neoclip.sqlite3", + filter = nil, + preview = true, + prompt = nil, + default_register = '"', + default_register_macros = 'q', + enable_macro_history = true, + content_spec_column = false, + disable_keycodes_parsing = false, + on_select = { + move_to_front = false, + close_telescope = true, + }, + on_paste = { + set_reg = false, + move_to_front = false, + close_telescope = true, + }, + on_replay = { + set_reg = false, + move_to_front = false, + close_telescope = true, + }, + on_custom_action = { + close_telescope = true, + }, + keys = { + telescope = { + i = { + select = '', + paste = '', + paste_behind = '', + replay = '', -- replay a macro + delete = '', -- delete an entry + edit = '', -- edit an entry + custom = {}, + }, + n = { + select = '', + paste = 'p', + --- It is possible to map to more than one key. + -- paste = { 'p', '' }, + paste_behind = 'P', + replay = 'q', + delete = 'd', + edit = 'e', + custom = {}, + }, + }, + }, +}) + +vim.keymap.set("n", "o", "Telescope neoclip", { desc = "Telescope Neoclip"}) + diff --git a/.config/nvim/after/plugin/nvim-tree.lua b/.config/nvim/after/plugin/nvim-tree.lua new file mode 100755 index 0000000..1bf0d0c --- /dev/null +++ b/.config/nvim/after/plugin/nvim-tree.lua @@ -0,0 +1,18 @@ +-- empty setup using defaults +-- require("nvim-tree").setup() + +-- OR setup with some options +require("nvim-tree").setup({ + sort = { + sorter = "case_sensitive", + }, + view = { + width = 30, + }, + renderer = { + group_empty = true, + }, + filters = { + dotfiles = true, + }, +}) diff --git a/.config/nvim/after/plugin/parenthesis.lua b/.config/nvim/after/plugin/parenthesis.lua new file mode 100755 index 0000000..8554b43 --- /dev/null +++ b/.config/nvim/after/plugin/parenthesis.lua @@ -0,0 +1,25 @@ +require("autoclose").setup({ + keys = { + ["("] = { escape = false, close = true, pair = "()" }, + ["["] = { escape = false, close = true, pair = "[]" }, + ["{"] = { escape = false, close = true, pair = "{}" }, + + [">"] = { escape = true, close = false, pair = "<>" }, + [")"] = { escape = true, close = false, pair = "()" }, + ["]"] = { escape = true, close = false, pair = "[]" }, + ["}"] = { escape = true, close = false, pair = "{}" }, + + ['"'] = { escape = true, close = true, pair = '""' }, + ["'"] = { escape = true, close = true, pair = "''" }, + ["`"] = { escape = true, close = true, pair = "``" }, + ["$"] = { escape = true, close = true, pair = "$$", disabled_filetypes = {} }, + }, + options = { + disabled_filetypes = { "text" }, + disable_when_touch = false, + touch_regex = "[%w(%[{]", + pair_spaces = true, + auto_indent = true, + disable_command_mode = false, + }, +}) diff --git a/.config/nvim/after/plugin/telescope.lua b/.config/nvim/after/plugin/telescope.lua new file mode 100755 index 0000000..5e57dfb --- /dev/null +++ b/.config/nvim/after/plugin/telescope.lua @@ -0,0 +1,78 @@ +local builtin = require('telescope.builtin') +vim.keymap.set('n', 'ff', builtin.find_files, { desc = "Find Files" }) +vim.keymap.set('n', 'fg', "lua require('telescope').extensions.live_grep_args.live_grep_args()", { desc = "Live Grep" }) +vim.keymap.set('n', 'fc', 'lua require("telescope.builtin").live_grep({ glob_pattern = "!{spec,test}"})', { desc = "Live Grep Code" }) +vim.keymap.set('n', 'fb', builtin.buffers, { desc = "Find Buffers" }) +vim.keymap.set('n', 'fh', builtin.help_tags, { desc = "Find Help Tags" }) +vim.keymap.set('n', 'fs', builtin.lsp_document_symbols, { desc = "Find Symbols" }) +vim.keymap.set('n', 'fi', 'AdvancedGitSearch', { desc = "AdvancedGitSearch" }) +vim.keymap.set('n', 'fo', builtin.oldfiles, { desc = "Find Old Files" }) +vim.keymap.set('n', 'fw', builtin.grep_string, { desc = "Find Word under Cursor" }) + +local telescope = require("telescope") +local telescopeConfig = require("telescope.config") + +-- Clone the default Telescope configuration +local vimgrep_arguments = { unpack(telescopeConfig.values.vimgrep_arguments) } + +-- I want to search in hidden/dot files. +table.insert(vimgrep_arguments, "--hidden") +-- I don't want to search in the `.git` directory. +table.insert(vimgrep_arguments, "--glob") +table.insert(vimgrep_arguments, "!**/.git/*") + +local actions = require "telescope.actions" + +telescope.setup({ + defaults = { + -- `hidden = true` is not supported in text grep commands. + vimgrep_arguments = vimgrep_arguments, + path_display = { "truncate" }, + mappings = { + n = { + [""] = actions.send_selected_to_qflist + actions.open_qflist, + }, + i = { + [""] = actions.cycle_history_next, + [""] = actions.cycle_history_prev, + + [""] = actions.send_selected_to_qflist + actions.open_qflist, + } + }, + }, + pickers = { + find_files = { + -- `hidden = true` will still show the inside of `.git/` as it's not `.gitignore`d. + find_command = { "rg", "--files", "--hidden", "--glob", "!**/.git/*" }, + }, + }, + extensions = { + undo = { + use_delta = true, + use_custom_command = nil, -- setting this implies `use_delta = false`. Accepted format is: { "bash", "-c", "echo '$DIFF' | delta" } + side_by_side = false, + vim_diff_opts = { ctxlen = 0 }, + entry_format = "state #$ID, $STAT, $TIME", + mappings = { + i = { + [""] = require("telescope-undo.actions").yank_additions, + [""] = require("telescope-undo.actions").yank_deletions, + [""] = require("telescope-undo.actions").restore, + }, + }, + }, + } +}) + +require("telescope").load_extension "neoclip" + +require('telescope').load_extension('fzf') + +require('telescope').load_extension('ui-select') +vim.g.zoxide_use_select = true + +require("telescope").load_extension("undo") + +require("telescope").load_extension("advanced_git_search") + +require("telescope").load_extension("live_grep_args") diff --git a/.config/nvim/after/plugin/terminal.lua b/.config/nvim/after/plugin/terminal.lua new file mode 100755 index 0000000..af8c3d4 --- /dev/null +++ b/.config/nvim/after/plugin/terminal.lua @@ -0,0 +1,8 @@ +--local builtin = require('vim-floaterm.builtin') + +vim.keymap.set("n", "TS", + ":FloatermNew --height=0.3 --width=0.8 --wintype=float --name=floaterm1 --position=center --autoclose=2", { desc = "Open FloatTerm" }) +vim.keymap.set("n", "TT", + ":FloatermToggle", { desc = "Toggle FloatTerm" }) +vim.keymap.set("t", "TT", + ":FloatermToggle", { desc = "Toggle FloatTerm" }) diff --git a/.config/nvim/after/plugin/treesitter.lua b/.config/nvim/after/plugin/treesitter.lua new file mode 100755 index 0000000..3a7c1f9 --- /dev/null +++ b/.config/nvim/after/plugin/treesitter.lua @@ -0,0 +1,64 @@ +local configs = require("nvim-treesitter.configs") + +local f = io.popen("uname -s") +if (f ~= nil) then + MY_OS = f:read("*a") + MY_OS = string.gsub(MY_OS, "%s+", "") + f:close() +end + +if (MY_OS == 'Linux') +then + configs.setup({ + ensure_installed = { + "bash", + "c", + "json", + "julia", + "lua", + "vim", + "vimdoc", + "zig", + }, + sync_install = false, + highlight = { enable = true }, + indent = { enable = true }, + }) +elseif (MY_OS == 'FreeBSD') or (MY_OS == 'OpenBSD') +then + --print('Should be here if on BSD') + configs.setup({ + ensure_installed = { + "bash", + "c", + "json", + "vim", + "vimdoc", + "zig", + }, + sync_install = false, + highlight = { enable = true }, + indent = { enable = true }, + }) +elseif (MY_OS == 'Darwin') +then + --print('Should be here if on MacOS') + configs.setup({ + ensure_installed = { + "bash", + "c", + "julia", + "json", + "lua", + "ocaml", + "vim", + "vimdoc", + "zig", + }, + sync_install = false, + highlight = { enable = true }, + indent = { enable = true }, + }) +else + print('Should never be here') +end diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua new file mode 100755 index 0000000..40f23b1 --- /dev/null +++ b/.config/nvim/init.lua @@ -0,0 +1,3 @@ +require('eddie.lazy') +require('eddie.remaps') +require('eddie.options') diff --git a/.config/nvim/lua/eddie/lazy.lua b/.config/nvim/lua/eddie/lazy.lua new file mode 100755 index 0000000..0e0b75d --- /dev/null +++ b/.config/nvim/lua/eddie/lazy.lua @@ -0,0 +1,198 @@ +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", -- latest stable release + lazypath, + }) +end +vim.opt.rtp:prepend(lazypath) + +vim.g.mapleader = ' ' +vim.g.maplocalleader = ' ' + +local plugins = { + { + 'VonHeikemen/lsp-zero.nvim', + branch = 'v2.x', + dependencies = { + -- LSP Support + { 'neovim/nvim-lspconfig' }, -- Required + { -- Optional + 'williamboman/mason.nvim', + build = function() + pcall(vim.cmd, 'MasonUpdate') + end, + }, + { 'williamboman/mason-lspconfig.nvim' }, -- Optional + + -- Autocompletion + { 'hrsh7th/nvim-cmp' }, -- Required + { 'hrsh7th/cmp-nvim-lsp' }, -- Required + { 'L3MON4D3/LuaSnip' }, -- Required + { "rafamadriz/friendly-snippets" }, + { 'hrsh7th/cmp-buffer' }, + { 'hrsh7th/cmp-path' }, + { 'hrsh7th/cmp-cmdline' }, + { 'saadparwaiz1/cmp_luasnip' }, + } + }, + { + 'nvimtools/none-ls.nvim', + config = function() + require('null-ls').setup({ + + }) + end, + dependencies = { 'nvim-lua/plenary.nvim' }, + }, + { + "nvim-treesitter/nvim-treesitter", + build = ":TSUpdate", + }, + { + "lervag/vimtex", + lazy = false, -- we don't want to lazy load VimTeX + -- tag = "v2.15", -- uncomment to pin to a specific release + }, + -- Minimal + { + 'nvim-telescope/telescope.nvim', + tag = '0.1.5', + dependencies = { { 'nvim-lua/plenary.nvim' } } + }, + { 'nvim-telescope/telescope-fzf-native.nvim', build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' }, + { "nvim-telescope/telescope-live-grep-args.nvim" }, + { + "aaronhallaert/advanced-git-search.nvim", + dependencies = { + "nvim-telescope/telescope.nvim", + "tpope/vim-fugitive", + 'tpope/vim-rhubarb', + }, + }, + 'nvim-telescope/telescope-ui-select.nvim', + 'debugloop/telescope-undo.nvim', + + 'ThePrimeagen/harpoon', + { + 'mbbill/undotree', + config = function() + vim.keymap.set("n", "u", "Telescope undo", { desc = "Telescope Undo" }) + end + }, + { + 'tpope/vim-fugitive', + config = function() + vim.keymap.set("n", "gs", vim.cmd.Git, { desc = "Open Fugitive Panel" }) + end + }, + { 'tpope/vim-repeat' }, + { + 'numToStr/Comment.nvim', + config = function() + require('Comment').setup() + end + }, + -- Autoclose parenthesis + { 'm4xshen/autoclose.nvim' }, + -- Colour theme + -- { "vim-scripts/xterm16.vim" }, + -- tree navigator + { "nvim-tree/nvim-tree.lua" }, + { + 'nvim-lualine/lualine.nvim', + dependencies = { 'nvim-tree/nvim-web-devicons' }, + config = function() + require('lualine').setup({ + options = { + theme = 'palenight' + } + }) + end + }, + { + 'bronson/vim-trailing-whitespace' + }, + { + 'junegunn/fzf', + build = ":call fzf#install()" + }, + { + "AckslD/nvim-neoclip.lua", + dependencies = { + { 'nvim-telescope/telescope.nvim' }, + }, + }, + 'jinh0/eyeliner.nvim', + { + "anuvyklack/windows.nvim", + dependencies = { + "anuvyklack/middleclass", + "anuvyklack/animation.nvim" + }, + config = function() + vim.o.winwidth = 10 + vim.o.winminwidth = 10 + vim.o.equalalways = false + require('windows').setup() + end + }, + { + 'voldikss/vim-floaterm', + }, + { + 'tummetott/unimpaired.nvim', + config = function() + require('unimpaired').setup() + end + }, + 'airblade/vim-gitgutter', + 'mg979/vim-visual-multi', + { + 'kevinhwang91/nvim-ufo', + dependencies = 'kevinhwang91/promise-async' + }, + { + 'folke/which-key.nvim', + event = "VeryLazy", + init = function() + vim.o.timeout = true + vim.o.timeoutlen = 500 + end, + opts = {} + }, + -- C/C++ debbuging + { + 'sakhnik/nvim-gdb', + }, + -- Compiler + { -- This plugin + "Zeioth/compiler.nvim", + cmd = { "CompilerOpen", "CompilerToggleResults", "CompilerRedo" }, + dependencies = { "stevearc/overseer.nvim", "nvim-telescope/telescope.nvim" }, + opts = {}, + }, + { -- The task runner we use + "stevearc/overseer.nvim", + commit = "6271cab7ccc4ca840faa93f54440ffae3a3918bd", + cmd = { "CompilerOpen", "CompilerToggleResults", "CompilerRedo" }, + opts = { + task_list = { + direction = "bottom", + min_height = 25, + max_height = 25, + default_detail = 1 + }, + }, + }, +} + +require('lazy').setup(plugins, { + change_detection = { + notify = false, + } +}) diff --git a/.config/nvim/lua/eddie/options.lua b/.config/nvim/lua/eddie/options.lua new file mode 100755 index 0000000..b82edd5 --- /dev/null +++ b/.config/nvim/lua/eddie/options.lua @@ -0,0 +1,255 @@ +local f = io.popen("uname -s") +if (f ~= nil) then + MY_OS = f:read("*a") + MY_OS = string.gsub(MY_OS, "%s+", "") + f:close() +end + +if (MY_OS == 'Linux') +then + -- on Linux + vim.opt.guicursor = "" + + --vim.opt.spelllang = 'en_gb' + --vim.opt.spell = true + + vim.opt.nu = true + vim.opt.relativenumber = true + + vim.opt.tabstop = 4 + vim.opt.softtabstop = 4 + vim.opt.shiftwidth = 4 + vim.opt.expandtab = true + + vim.opt.smartindent = true + + vim.opt.wrap = true + -- Fonts + vim.opt.encoding = "utf-8" + vim.opt.guifont = "FiraCodeNerdFont-Regular:h10" + + vim.opt.swapfile = false + vim.opt.backup = false + vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir" + vim.opt.undofile = true + + vim.opt.hlsearch = false + vim.opt.incsearch = true + + -- disable netrw at the very start of your init.lua + vim.g.loaded_netrw = 1 + vim.g.loaded_netrwPlugin = 1 + + -- optionally enable 24-bit colour + vim.opt.termguicolors = true + + vim.opt.scrolloff = 8 + vim.opt.signcolumn = "yes" + vim.opt.isfname:append("@-@") + + vim.opt.updatetime = 50 + + vim.opt.colorcolumn = "110" + + -- LSP options + vim.diagnostic.config({ + virtual_text = false + }) + + -- Show line diagnostics automatically in hover window + vim.o.updatetime = 250 + vim.cmd [[autocmd CursorHold,CursorHoldI * lua vim.diagnostic.open_float(nil, {focus=false})]] + + -- Vimtex options: + vim.g.vimtex_view_method = "zathura" + vim.g.vimtex_general_viewer = "zathura" + vim.g.vimtex_quickfix_mode = 0 + + -- Ignore mappings + vim.g.vimtex_mappings_enabled = 1 + + ---- Auto Indent + vim.g["vimtex_indent_enabled"] = 1 + + ---- Syntax highlighting + vim.g.vimtex_syntax_enabled = 0 + + -- Error suppression: + vim.g.vimtex_log_ignore = ({ + "Underfull", + "Overfull", + "specifier changed to", + "Token not allowed in a PDF string", + }) + + -- Python provider + vim.g.python3_host_prog = "/usr/share/pyenv/shims/python" + +elseif (MY_OS == 'FreeBSD') or (MY_OS == 'OpenBSD') +then + -- on BSD + vim.opt.guicursor = "" + + vim.opt.spelllang = 'en_gb' + vim.opt.spell = true + + vim.opt.nu = true + vim.opt.relativenumber = true + + vim.opt.tabstop = 4 + vim.opt.softtabstop = 4 + vim.opt.shiftwidth = 4 + vim.opt.expandtab = true + + vim.opt.smartindent = true + + vim.opt.wrap = true + -- Fonts + vim.opt.encoding = "utf-8" + vim.opt.guifont = "FiraCodeNerdFont-Regular:h10" + + vim.opt.swapfile = false + vim.opt.backup = false + vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir" + vim.opt.undofile = true + + vim.opt.hlsearch = false + vim.opt.incsearch = true + + -- disable netrw at the very start of your init.lua + vim.g.loaded_netrw = 1 + vim.g.loaded_netrwPlugin = 1 + + -- optionally enable 24-bit colour + vim.opt.termguicolors = true + + vim.opt.scrolloff = 8 + vim.opt.signcolumn = "yes" + vim.opt.isfname:append("@-@") + + vim.opt.updatetime = 50 + + vim.opt.colorcolumn = "110" + + -- LSP options + vim.diagnostic.config({ + virtual_text = false + }) + + -- Show line diagnostics automatically in hover window + vim.o.updatetime = 250 + vim.cmd [[autocmd CursorHold,CursorHoldI * lua vim.diagnostic.open_float(nil, {focus=false})]] + + -- Vimtex options: + vim.g.vimtex_view_method = "zathura" + vim.g.vimtex_general_viewer = "zathura" + vim.g.vimtex_quickfix_mode = 0 + + -- OBSD options + --vim.g.vimtex_compiler_latexmk={ 'cmd': '' } + + -- Ignore mappings + vim.g.vimtex_mappings_enabled = 1 + + ---- Auto Indent + vim.g["vimtex_indent_enabled"] = 1 + + ---- Syntax highlighting + vim.g.vimtex_syntax_enabled = 0 + + -- Error suppression: + vim.g.vimtex_log_ignore = ({ + "Underfull", + "Overfull", + "specifier changed to", + "Token not allowed in a PDF string", + }) + + -- Python provider + vim.g.python3_host_prog = "/usr/local/share/pyenv/shims/python" + +elseif (MY_OS == 'Darwin') +then + -- on MacOS + vim.opt.guicursor = "" + + -- vim.opt.spelllang = 'en_gb' + -- vim.opt.spell = true + + vim.opt.nu = true + vim.opt.relativenumber = true + + vim.opt.tabstop = 4 + vim.opt.softtabstop = 4 + vim.opt.shiftwidth = 4 + vim.opt.expandtab = true + + vim.opt.smartindent = true + + vim.opt.wrap = true + -- Fonts + vim.opt.encoding = "utf-8" + vim.opt.guifont = "FiraCodeNerdFont-Regular:h10" + + vim.opt.swapfile = false + vim.opt.backup = false + vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir" + vim.opt.undofile = true + + vim.opt.hlsearch = false + vim.opt.incsearch = true + + -- disable netrw at the very start of your init.lua + vim.g.loaded_netrw = 1 + vim.g.loaded_netrwPlugin = 1 + + -- optionally enable 24-bit colour + -- vim.opt.termguicolors = true + + vim.opt.scrolloff = 8 + vim.opt.signcolumn = "yes" + vim.opt.isfname:append("@-@") + + vim.opt.updatetime = 50 + + vim.opt.colorcolumn = "110" + + -- LSP options + vim.diagnostic.config({ + virtual_text = false + }) + + -- Show line diagnostics automatically in hover window + vim.o.updatetime = 250 + vim.cmd [[autocmd CursorHold,CursorHoldI * lua vim.diagnostic.open_float(nil, {focus=false})]] + + -- Vimtex options: + vim.g.vimtex_view_method = "sioyek" + vim.g.vimtex_view_sioyek_exe = "/Applications/sioyek.app/Contents/MacOS/sioyek" + -- vim.g.vimtex_view_method = "zathura" + -- vim.g.vimtex_general_viewer = "zathura" + vim.g.vimtex_quickfix_mode = 0 + + -- Ignore mappings + vim.g.vimtex_mappings_enabled = 1 + + ---- Auto Indent + vim.g.vimtex_indent_enabled = 1 + + ---- Syntax highlighting + vim.g.vimtex_syntax_enabled = 0 + + -- Error suppression: + vim.g.vimtex_log_ignore = ({ + "Underfull", + "Overfull", + "specifier changed to", + "Token not allowed in a PDF string", + }) + + -- Python provider + vim.g.python3_host_prog = "/usr/local/share/pyenv/shims/python" +else + print('Should never be here LSP') +end + diff --git a/.config/nvim/lua/eddie/remaps.lua b/.config/nvim/lua/eddie/remaps.lua new file mode 100755 index 0000000..a44d603 --- /dev/null +++ b/.config/nvim/lua/eddie/remaps.lua @@ -0,0 +1,95 @@ +-- Open Ex as buffer +-- vim.keymap.set("n", "pv", vim.cmd.Ex, { desc = "Open Ex" }) +vim.keymap.set("n", "pv", ":NvimTreeToggle", { desc = "Open Ex" }) + +-- Exit insert mode without hitting Esc +vim.keymap.set("i", "jj", "", { desc = "Esc" }) + +-- Make Y behave like C or D +vim.keymap.set("n", "Y", "y$") + +-- Keep window centered when going up/down +vim.keymap.set("n", "J", "mzJ`z") +vim.keymap.set("n", "", "zz") +vim.keymap.set("n", "", "zz") +vim.keymap.set("n", "n", "nzzzv") +vim.keymap.set("n", "N", "Nzzzv") + +-- Paste without overwriting register +vim.keymap.set("v", "p", '"_dP') + +-- Copy text to " register +vim.keymap.set("n", "y", "\"+y", { desc = "Yank into \" register" }) +vim.keymap.set("v", "y", "\"+y", { desc = "Yank into \" register" }) +vim.keymap.set("n", "Y", "\"+Y", { desc = "Yank into \" register" }) + +-- Delete text to " register +vim.keymap.set("n", "d", "\"_d", { desc = "Delete into \" register" }) +vim.keymap.set("v", "d", "\"_d", { desc = "Delete into \" register" }) + +-- Get out Q +vim.keymap.set("n", "Q", "") + +-- close buffer +vim.keymap.set("n", "q", "bd", { desc = "Close Buffer" }) + +-- Close buffer without closing split +vim.keymap.set("n", "w", "bp|bd #", { desc = "Close Buffer; Retain Split" }) + +-- Navigate between quickfix items +vim.keymap.set("n", "h", "cnextzz", { desc = "Forward qfixlist" }) +vim.keymap.set("n", ";", "cprevzz", { desc = "Backward qfixlist" }) + +-- Navigate between location list items +vim.keymap.set("n", "k", "lnextzz", { desc = "Forward location list" }) +vim.keymap.set("n", "j", "lprevzz", { desc = "Backward location list" }) + +-- Replace word under cursor across entire buffer +vim.keymap.set("n", "s", [[:%s/\<\>//gI]], { desc = "Replace word under cursor" }) + +-- Make current file executable +vim.keymap.set("n", "x", "!chmod +x %", { silent = true, desc = "Make current file executable" }) + +-- Jump to plugin management file +vim.keymap.set("n", "vpp", "e ~/.config/nvim/lua/exosyphon/lazy.lua", { desc = "Jump to lazy.lua" }) + +-- Git revert at current cursor location +vim.keymap.set("n", "U", "GitGutterUndoHunk", { desc = "Revert Git Hunk" }) + +-- Copy file paths +vim.keymap.set("n", "cf", "let @+ = expand(\"%\")", { desc = "Copy File Name" }) +vim.keymap.set("n", "cp", "let @+ = expand(\"%:p\")", { desc = "Copy File Path" }) + +vim.keymap.set("n", "so", function() + vim.cmd("so") +end, { desc = "Source current file" }) + +-- Resize with arrows +vim.keymap.set("n", "", ":resize +2", { desc = "Resize Horizontal Split Down" }) +vim.keymap.set("n", "", ":resize -2", { desc = "Resize Horizontal Split Up" }) +vim.keymap.set("n", "", ":vertical resize -2", { desc = "Resize Vertical Split Down" }) +vim.keymap.set("n", "", ":vertical resize +2", { desc = "Resize Vertical Split Up" }) + +-- Open compiler +vim.api.nvim_set_keymap('n', '', "CompilerOpen", { noremap = true, silent = true }) + +-- Redo last selected option +vim.api.nvim_set_keymap('n', '', + "CompilerStop" -- (Optional, to dispose all tasks before redo) + .. "CompilerRedo", + { noremap = true, silent = true }) + +-- Toggle compiler results +vim.api.nvim_set_keymap('n', 't', "CompilerToggleResults", { noremap = true, silent = true }) + +-- Visual -- +-- Stay in indent mode +vim.keymap.set("v", "<", "", ">gv") + +-- Move block +vim.keymap.set("v", "J", ":m '>+1gv=gv", { desc = "Move Block Down" }) +vim.keymap.set("v", "K", ":m '<-2gv=gv", { desc = "Move Block Up" }) + +-- Search for highlighted text in buffer +vim.keymap.set("v", "//", 'y/"', { desc = "Search for highlighted text" }) diff --git a/.config/nvim/spell/en.utf-8.add b/.config/nvim/spell/en.utf-8.add new file mode 100755 index 0000000..9811822 --- /dev/null +++ b/.config/nvim/spell/en.utf-8.add @@ -0,0 +1,21 @@ +hyperparameter +hyperparameters +NVIDIA +CIFAR +MNIST +LeNet +MUL +BCNN +Grangegorman +Cueto +Mendoza +Maynooth +Frobenius +Neuromorphic +neuromorphic +NN +pytorch +Pytorch +SOTA + +subnetworks diff --git a/.config/nvim/spell/en.utf-8.add.spl b/.config/nvim/spell/en.utf-8.add.spl new file mode 100755 index 0000000..3e22e53 Binary files /dev/null and b/.config/nvim/spell/en.utf-8.add.spl differ diff --git a/.config/zathura/zathurarc b/.config/zathura/zathurarc new file mode 100755 index 0000000..cee0678 --- /dev/null +++ b/.config/zathura/zathurarc @@ -0,0 +1,58 @@ +set window-title-basename "true" +set selection-clipboard "clipboard" +set window-height 3000 +set window-width 3000 + +# Dracula color theme for Zathura +# Swaps Foreground for Background to get a light version if the user prefers + +# +# Dracula color theme +# + +set notification-error-bg "#ff5555" # Red +set notification-error-fg "#f8f8f2" # Foreground +set notification-warning-bg "#ffb86c" # Orange +set notification-warning-fg "#44475a" # Selection +set notification-bg "#282a36" # Background +set notification-fg "#f8f8f2" # Foreground + +set completion-bg "#282a36" # Background +set completion-fg "#6272a4" # Comment +set completion-group-bg "#282a36" # Background +set completion-group-fg "#6272a4" # Comment +set completion-highlight-bg "#44475a" # Selection +set completion-highlight-fg "#f8f8f2" # Foreground + +set index-bg "#282a36" # Background +set index-fg "#f8f8f2" # Foreground +set index-active-bg "#44475a" # Current Line +set index-active-fg "#f8f8f2" # Foreground + +set inputbar-bg "#282a36" # Background +set inputbar-fg "#f8f8f2" # Foreground +set statusbar-bg "#282a36" # Background +set statusbar-fg "#f8f8f2" # Foreground + +set highlight-color "#ffb86c" # Orange +set highlight-active-color "#ff79c6" # Pink + +set default-bg "#282a36" # Background +set default-fg "#f8f8f2" # Foreground + +set render-loading true +set render-loading-fg "#282a36" # Background +set render-loading-bg "#f8f8f2" # Foreground + +# +# Recolor mode settings +# + +set recolor-lightcolor "#282a36" # Background +set recolor-darkcolor "#f8f8f2" # Foreground + +# +# Startup options +# +set adjust-open width +set recolor true diff --git a/.gitconfig b/.gitconfig new file mode 100644 index 0000000..a06a16b --- /dev/null +++ b/.gitconfig @@ -0,0 +1,4 @@ +[user] + signingkey = 5B6FDEEF40B467D5 + email = eduardo.cueto@adaptcentre.ie + name = Eduardo Cueto-Mendoza diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4523b2a --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +._* +.stow-local-ignore +.gnupg/private-keys-v1.d/* +.gnupg/public-keys.d/* +.gnupg/random_seed +.ssh/known_hosts* diff --git a/.gnupg/common.conf b/.gnupg/common.conf new file mode 100644 index 0000000..5add401 --- /dev/null +++ b/.gnupg/common.conf @@ -0,0 +1 @@ +use-keyboxd diff --git a/.gnupg/crls.d/DIR.txt b/.gnupg/crls.d/DIR.txt new file mode 100644 index 0000000..2a29a47 --- /dev/null +++ b/.gnupg/crls.d/DIR.txt @@ -0,0 +1 @@ +v:1: diff --git a/.gnupg/reader_0.status b/.gnupg/reader_0.status new file mode 100644 index 0000000..6a6e304 --- /dev/null +++ b/.gnupg/reader_0.status @@ -0,0 +1 @@ +NOCARD diff --git a/.gnupg/sshcontrol b/.gnupg/sshcontrol new file mode 100644 index 0000000..c61ee5c --- /dev/null +++ b/.gnupg/sshcontrol @@ -0,0 +1,11 @@ +# List of allowed ssh keys. Only keys present in this file are used +# in the SSH protocol. The ssh-add tool may add new entries to this +# file to enable them; you may also add them manually. Comment +# lines, like this one, as well as empty lines are ignored. Lines do +# have a certain length limit but this is not serious limitation as +# the format of the entries is fixed and checked by gpg-agent. A +# non-comment line starts with optional white spaces, followed by the +# keygrip of the key given as 40 hex digits, optionally followed by a +# caching TTL in seconds, and another optional field for arbitrary +# flags. Prepend the keygrip with an '!' mark to disable it. + diff --git a/.gnupg/trustdb.gpg b/.gnupg/trustdb.gpg new file mode 100644 index 0000000..b2894f9 Binary files /dev/null and b/.gnupg/trustdb.gpg differ diff --git a/.ssh/authorized_keys b/.ssh/authorized_keys new file mode 100644 index 0000000..e69de29 diff --git a/.ssh/config b/.ssh/config new file mode 100644 index 0000000..2f3a00b --- /dev/null +++ b/.ssh/config @@ -0,0 +1,45 @@ +#Host eduardo-cueto.com +# HostName eduardo-cueto.com +# User deb-ser-adm +# IdentityFile ~/.ssh/id_admin + +#Host bsd-talk.com +# IdentityFile ~/.ssh/id_server + +#Host github.com +# IdentityFile ~/.ssh/id_gittest + +Host unix-talk.com + IdentityFile ~/.ssh/id_rsa_yubikey.pub + Port 22 + +#Host unix-talk.com +# IdentityFile ~/.ssh/id_nitro_1 +# Port 33 + +#Host fd98:f0b:88f:10::1 +# IdentityFile ~/.ssh/id_nitro_1 +# Port 22 + +#Host 2a02:8084:d6be:1298::1 +# IdentityFile ~/.ssh/id_openwrt +# Port 22 + +#Host unix-talk.com + #IdentityFile ~/.ssh/id_secure + +#Host bsd-talk.com + #IdentityFile ~/.ssh/id_local_server_2 + +#Host 216.238.68.117 +# IdentityFile ~/.ssh/id_admin + +Host unix-talk.com + IdentitiesOnly yes + IdentityFile ~/.ssh/id_rsa_yubikey.pub + Port 33 + +Host unix-talk.com + IdentitiesOnly yes + IdentityFile ~/.ssh/id_rsa_yubikey.pub + Port 22 diff --git a/.ssh/id_rsa_yubikey.pub b/.ssh/id_rsa_yubikey.pub new file mode 100644 index 0000000..47660a5 --- /dev/null +++ b/.ssh/id_rsa_yubikey.pub @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCprFFmFGk8tPme6drgEjrC4ZZvhKEM524A82aX+2l+ikWN83++4RLQe5IoOqE8S4J2wBv5JLsds8IJDigwaVPYOaRNse3cRnBId+ESdDsYT4d5hikYv0/JORpooynCX4ortBq0Us++IB3bwyZiRk3uS7SprDmUioTHtup1CO1yEWR9SppZjOOU/YYoeVAuLzLPL4TC64zwrUKrxDq/Q30db30Jt5/4VXoeAfL62LA8sCckEtpyhro5QHagzKypXkkOlp7CUPK1eUmVt1v6SIXMmw7R1X52SvTauMavWgiV1kW7bJlE89PJ5hHoPnfHEHMhIQs5JMvXGkSCwVsaKRcOSg9lII9Py4sCy3ky9l/7Xi/WTfG5xORZ5C3ea9oJcDwP3I5fIJ6cyr7W3R2Q7KhaT4NoNHbuq0kY/EfeQKHkaqWqJPEogg/1SQm6/oPUmg2hPId99+E3H/EAGkwxE8ZkfsAXbPO5mmZlxHKzLtA6MyQ8XKNnVi9rCPyhSbuRhN+HE7QaTvFue5mKtJqgTJfRz3l2IuN6oYXTh5fMnhM7P8BeZulZf2dg7ypKb9nncdjOVCt3sxLBwz2cO2vOVswjaxR/H+tqP+kCpmKtqoYa8PeMCkSvl7kxvdS26vjjfF6pUInb+SXF799IPbYY4vPfLSH1gk7VRa8z/DqvhHPCDw== cardno:000F_63793DE6 diff --git a/.tmux.conf b/.tmux.conf new file mode 100755 index 0000000..8c74f0a --- /dev/null +++ b/.tmux.conf @@ -0,0 +1,49 @@ +#set -g default-terminal "screen-256color" +set-window-option -g mode-keys vi + +# Copy as in vim +bind-key -T copy-mode-vi 'v' send -X begin-selection +bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel + +# remap prefix from 'C-b' to 'C-a' +unbind C-b +set-option -g prefix C-a +bind-key C-a send-prefix + +# split panes using v and f +bind v split-window -h +bind f split-window -v +unbind '"' +unbind % + +# reload config file (change file location to your the tmux.conf you want to use) +bind r source-file ~/.tmux.conf + +# vi-like keybindings +setw -g mode-keys vi +bind h select-pane -L +bind j select-pane -D +bind k select-pane -U +bind l select-pane -R + +bind-key -T copy-mode-vi 'v' send -X begin-selection +bind-key -T copy-mode-vi 'y' send -X copy-selection + +# zenburn theme +#setw -g clock-mode-colour colour117 +#setw -g mode-attr bold +#setw -g mode-fg colour117 +#setw -g mode-bg colour238 +#set -g status-bg colour235 +#set -g status-fg colour248 +#setw -g window-status-current-fg colour223 +#setw -g window-status-current-bg colour237 +#setw -g window-status-current-attr bold +#set -g message-attr bold +#set -g message-fg colour117 +#set -g message-bg colour235 + +# fancy status line: user@host, date, time +set-option -g status-right "#(whoami)@#(hostname -s) #[fg=colour187,bold]%a %Y-%m-%d %H:%M" +set -g status-right-length 50 +set -g status-left-length 20