From ab16dc77f8e3199236fdb1080be7276f5faa8f74 Mon Sep 17 00:00:00 2001 From: "Matthieu Fortin (CPC/CCP)" Date: Wed, 2 Jul 2025 09:18:00 -0400 Subject: [PATCH] Some shit. --- bash/.bashrc | 92 +++--- ghostty/.config/ghostty/config | 8 +- nvim.org/.config/nvim/.luarc.json | 5 - nvim.org/.config/nvim/init.lua | 19 -- nvim.org/.config/nvim/lua/keymaps.lua | 42 --- nvim.org/.config/nvim/lua/plugins.lua | 1 - nvim.org/.config/nvim/lua/plugins/alpha.lua | 29 -- .../.config/nvim/lua/plugins/catppucin.lua | 26 -- .../.config/nvim/lua/plugins/completions.lua | 45 --- .../.config/nvim/lua/plugins/git-stuff.lua | 14 - .../.config/nvim/lua/plugins/lsp-config.lua | 43 --- nvim.org/.config/nvim/lua/plugins/lualine.lua | 9 - nvim.org/.config/nvim/lua/plugins/neorg.lua | 6 - nvim.org/.config/nvim/lua/plugins/neotree.lua | 13 - nvim.org/.config/nvim/lua/plugins/none-ls.lua | 17 -- .../nvim/lua/plugins/nvim-tmux-navigator.lua | 7 - nvim.org/.config/nvim/lua/plugins/oil.lua | 8 - .../nvim/lua/plugins/orgmode.lua.disabled | 19 -- .../.config/nvim/lua/plugins/telescope.lua | 25 -- .../.config/nvim/lua/plugins/treesitter.lua | 14 - nvim.org/.config/nvim/lua/vim-options.lua | 13 - {nvim2 => nvim}/.config/nvim/.editorconfig | 0 nvim/.config/nvim/lua/config/lazy.lua | 4 +- nvim2/.config/nvim/init.lua | 1 - nvim2/.config/nvim/lua/config/keymaps.lua | 10 - nvim2/.config/nvim/lua/config/lazy.lua | 42 --- nvim2/.config/nvim/lua/config/options.lua | 53 ---- nvim2/.config/nvim/lua/plugins/blink-cmp.lua | 110 ------- nvim2/.config/nvim/lua/plugins/conform.lua | 20 -- nvim2/.config/nvim/lua/plugins/dressing.lua | 4 - nvim2/.config/nvim/lua/plugins/fzflua.lua | 95 ------ nvim2/.config/nvim/lua/plugins/kanagawa.lua | 21 -- nvim2/.config/nvim/lua/plugins/lsp.lua | 272 ------------------ .../plugins/nvim-treesitter-textobjects.lua | 63 ---- .../nvim/lua/plugins/nvim-treesitter.lua | 27 -- nvim2/.config/nvim/lua/plugins/oil.lua | 15 - nvim2/.config/nvim/lua/plugins/project.lua | 40 --- nvim2/.config/nvim/lua/plugins/rustacean.lua | 5 - nvim2/.config/nvim/lua/plugins/showkeys.lua | 7 - nvim2/.config/nvim/lua/plugins/sleuth-vim.lua | 5 - nvim2/.config/nvim/lua/plugins/statusline.lua | 1 - nvim2/.config/nvim/lua/plugins/which-key.lua | 18 -- 42 files changed, 61 insertions(+), 1207 deletions(-) delete mode 100644 nvim.org/.config/nvim/.luarc.json delete mode 100644 nvim.org/.config/nvim/init.lua delete mode 100644 nvim.org/.config/nvim/lua/keymaps.lua delete mode 100644 nvim.org/.config/nvim/lua/plugins.lua delete mode 100644 nvim.org/.config/nvim/lua/plugins/alpha.lua delete mode 100644 nvim.org/.config/nvim/lua/plugins/catppucin.lua delete mode 100644 nvim.org/.config/nvim/lua/plugins/completions.lua delete mode 100644 nvim.org/.config/nvim/lua/plugins/git-stuff.lua delete mode 100644 nvim.org/.config/nvim/lua/plugins/lsp-config.lua delete mode 100644 nvim.org/.config/nvim/lua/plugins/lualine.lua delete mode 100644 nvim.org/.config/nvim/lua/plugins/neorg.lua delete mode 100644 nvim.org/.config/nvim/lua/plugins/neotree.lua delete mode 100644 nvim.org/.config/nvim/lua/plugins/none-ls.lua delete mode 100644 nvim.org/.config/nvim/lua/plugins/nvim-tmux-navigator.lua delete mode 100644 nvim.org/.config/nvim/lua/plugins/oil.lua delete mode 100644 nvim.org/.config/nvim/lua/plugins/orgmode.lua.disabled delete mode 100644 nvim.org/.config/nvim/lua/plugins/telescope.lua delete mode 100644 nvim.org/.config/nvim/lua/plugins/treesitter.lua delete mode 100644 nvim.org/.config/nvim/lua/vim-options.lua rename {nvim2 => nvim}/.config/nvim/.editorconfig (100%) delete mode 100644 nvim2/.config/nvim/init.lua delete mode 100644 nvim2/.config/nvim/lua/config/keymaps.lua delete mode 100644 nvim2/.config/nvim/lua/config/lazy.lua delete mode 100644 nvim2/.config/nvim/lua/config/options.lua delete mode 100644 nvim2/.config/nvim/lua/plugins/blink-cmp.lua delete mode 100644 nvim2/.config/nvim/lua/plugins/conform.lua delete mode 100644 nvim2/.config/nvim/lua/plugins/dressing.lua delete mode 100644 nvim2/.config/nvim/lua/plugins/fzflua.lua delete mode 100644 nvim2/.config/nvim/lua/plugins/kanagawa.lua delete mode 100644 nvim2/.config/nvim/lua/plugins/lsp.lua delete mode 100644 nvim2/.config/nvim/lua/plugins/nvim-treesitter-textobjects.lua delete mode 100644 nvim2/.config/nvim/lua/plugins/nvim-treesitter.lua delete mode 100644 nvim2/.config/nvim/lua/plugins/oil.lua delete mode 100644 nvim2/.config/nvim/lua/plugins/project.lua delete mode 100644 nvim2/.config/nvim/lua/plugins/rustacean.lua delete mode 100644 nvim2/.config/nvim/lua/plugins/showkeys.lua delete mode 100644 nvim2/.config/nvim/lua/plugins/sleuth-vim.lua delete mode 100644 nvim2/.config/nvim/lua/plugins/statusline.lua delete mode 100644 nvim2/.config/nvim/lua/plugins/which-key.lua diff --git a/bash/.bashrc b/bash/.bashrc index 855e677..1340ff5 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -1,7 +1,7 @@ #!/bin/bash iatest=$(expr index "$-" i) -[ -f /usr/bin/fastfetch ] && fastfetch -c ~/.config/fastfetch/config-compact.jsonc +#[ -f /usr/bin/fastfetch ] && fastfetch -c ~/.config/fastfetch/config-compact.jsonc [ -f /etc/bashrc ] && . /etc/bashrc [ -f /usr/share/bash-completion/bash-completion ] && . /usr/share/bash-completion/bash-completion [ -f /etc/bash_completion ] && . /etc/bash_completion @@ -42,31 +42,40 @@ export EDITOR=nvim export VISUAL=nvim export SHELL_ICON= alias edit='nvim' -alias pico='edit' -alias spico='sedit' -alias nano='edit' -alias snano='sedit' +#alias pico='edit' +#alias spico='sedit' +#alias nano='edit' +#alias snano='sedit' alias vim='nvim' alias cat='bat' -alias browser='librewolf' +#alias browser='librewolf' +alias browser='zen-browser' export LESS="--RAW-CONTROL-CHARS" # To have colors for ls and all grep commands such as grep, egrep and zgrep export CLICOLOR=1 export LS_COLORS='no=00:fi=00:di=00;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.ogg=01;35:*.mp3=01;35:*.wav=01;35:*.xml=00;31:' + +if command -v rg &> /dev/null; then + alias grep='rg' +else + alias grep="/usr/bin/grep $GREP_OPTIONS" +fi +unset GREP_OPTIONS + #export GREP_OPTIONS='--color=auto' #deprecated #alias grep="/usr/bin/grep $GREP_OPTIONS" #unset GREP_OPTIONS # Color for manpages in less makes manpages a little easier to read -#export LESS_TERMCAP_mb=$'\E[01;31m' -#export LESS_TERMCAP_md=$'\E[01;31m' -#export LESS_TERMCAP_me=$'\E[0m' -#export LESS_TERMCAP_se=$'\E[0m' -#export LESS_TERMCAP_so=$'\E[01;44;33m' -#export LESS_TERMCAP_ue=$'\E[0m' -#export LESS_TERMCAP_us=$'\E[01;32m' +export LESS_TERMCAP_mb=$'\E[01;31m' +export LESS_TERMCAP_md=$'\E[01;31m' +export LESS_TERMCAP_me=$'\E[0m' +export LESS_TERMCAP_se=$'\E[0m' +export LESS_TERMCAP_so=$'\E[01;44;33m' +export LESS_TERMCAP_ue=$'\E[0m' +export LESS_TERMCAP_us=$'\E[01;32m' ####################################################### # GENERAL ALIAS'S @@ -85,7 +94,7 @@ alias stowclean='find . -type d -empty -delete' # delete empty directories alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"' # Edit this .bashrc file -alias ebrc='edit ~/.bashrc' +alias ebrc='edit ~/.bashrc && . ~/.bashrc' # Show help for this .bashrc file alias hlp='less ~/.bashrc_help' @@ -98,14 +107,17 @@ alias cp='cp -i' alias mv='mv -i' alias rm='trash -v' alias mkdir='mkdir -pv' -alias psa='ps auxf' +alias ps='ps auxf' alias ping='ping -c 10' alias less='less -R' alias cls='clear' alias multitail='multitail --no-repeat -c' +alias freshclam='sudo freshclam' alias vi='nvim' alias svi='sudo vi' alias vis='nvim "+set si"' +alias yayf="yay -Slq | fzf --multi --preview 'yay -Sii {1}' --preview-window=down:75% | xargs -ro yay -S" +alias paruf="paru -Slq | fzf --multi --preview 'paru -Sii {1}' --preview-window=down:75% | xargs -ro paru -S" # Change directory aliases alias home='cd ~' @@ -144,6 +156,9 @@ else alias labc='ls -lap' #alphabetical sort alias lf="ls -l | grep -E -v '^d'" # files only alias ldir="ls -l | grep -E '^d'" # directories only + alias lla='ls -Al' # List and Hidden Files + alias las='ls -A' # Hidden Files + alias lls='ls -l' # List fi @@ -157,10 +172,10 @@ alias 755='chmod -R 755' alias 777='chmod -R 777' # Search command line history -alias hs="history | fzf " +alias h="history | fzf " # Search running processes -alias psgrep="ps aux | grep -v grep | grep -i -e VSZ -e" +alias p="ps aux | grep -v grep | grep -i -e VSZ -e" alias topcpu="/bin/ps -eo pcpu,pid,user,args | sort -k 1 -r | head -10" alias psmem="ps auxf | sort -nf -k 4" alias pscpu="ps auxf | sort -nf -k 3" @@ -186,9 +201,11 @@ alias rebootforce='sudo shutdown -r -n now' alias diskspace="du -S | sort -n -r |more" alias folders='du -h --max-depth=1' alias folderssort='find . -maxdepth 1 -type d -print0 | xargs -0 du -sk | sort -rn' -if type -fP tree &> /dev/null; then - alias tree='tree -ahC --dirsfirst -I .git' -fi +#if type -fP tree &> /dev/null; then +# alias tree='tree -ahC --dirsfirst -I .git' +#fi +alias tree='tree -Cahf --dirsfirst' +alias treed='tree -CAFd' alias mountedinfo='df -hT' # Alias's for archives @@ -219,14 +236,6 @@ alias vf='nvim $(fp)' # SPECIAL FUNCTIONS ####################################################### -#chezedit() { -# if [ -z "$1" ]; then -# echo "Usage: chezedit " -# return 1 -# fi -# chezmoi edit "$1" && chezmoi apply "$1" -#} - # Extracts any archive(s) (if unp isn't installed) extract() { for archive in "$@"; do @@ -328,9 +337,9 @@ up() { cd () { if [ -n "$1" ]; then - builtin cd "$@" && la + builtin cd "$@" && ls else - builtin cd ~ && la + builtin cd ~ && ls fi } @@ -360,7 +369,7 @@ distribution () gentoo) dtype="gentoo" ;; - arch) + arch|cachyos) dtype="arch" ;; slackware) @@ -474,9 +483,9 @@ if [[ "$(distribution)" = "arch" ]]; then pacrmorphans='sudo pacman -Rs $(pacman -Qtdq)' \ pacupd='sudo pacman -Sy' \ pacupg='sudo pacman -Syu' \ - rip="expac --timefmt='%Y-%m-%d %T' '%l\t%n %v' | sort | tail -200 | nl" \ - big="expac -H M '%m\t%n' | sort -h | nl" \ - gitpkg="pacman -Q | grep -i "\-git" | wc -l" + rip="expac --timefmt='%Y-%m-%d %T' '%l\t%n %v' | sort | tail -200 | nl" \ + big="expac -H M '%m\t%n' | sort -h | nl" \ + gitpkg="pacman -Q | grep -i "\-git" | wc -l" fi # GitHub Titus Additions @@ -486,14 +495,17 @@ gcom() { } lazyg() { git add . - git commit -m "$(curl -s https://whatthecommit.com/index.txt)" + git commit -m "$(curl -s https://whatthecommit.com/index.txt)" git push } -bind '"\C-f":"zi\n"' export PATH=$PATH:"$HOME/.local/bin:/var/lib/flatpak/exports/bin:$HOME/.local/share/flatpak/exports/bin:$HOME/.npm/bin" +if [[ $- == *i* ]]; then + # bind ctrl+f to insert 'zi' followed by a newline + bind '"\C-f":"zi\n"' +fi # pyenv export PATH="$HOME/.pyenv/bin:$PATH" @@ -501,12 +513,16 @@ eval "$(pyenv init --path)" eval "$(pyenv init -)" eval "$(pyenv virtualenv-init -)" -# Install Starship - curl -sS https://starship.rs/install.sh | sh eval "$(starship init bash)" -#eval "$(oh-my-posh init bash --config "~/.cache/oh-my-posh/themes/catppuccin_macchiato.omp.json")" eval "$(zoxide init bash)" # Added by LM Studio CLI (lms) export PATH="$PATH:/home/matt/.lmstudio/bin" # End of LM Studio CLI section +[ -f ~/.bash-preexec.sh ] && . ~/.bash-preexec.sh + + +# bun +export BUN_INSTALL="$HOME/.bun" +export PATH="$BUN_INSTALL/bin:$PATH" diff --git a/ghostty/.config/ghostty/config b/ghostty/.config/ghostty/config index d70f7f6..fa14003 100644 --- a/ghostty/.config/ghostty/config +++ b/ghostty/.config/ghostty/config @@ -7,9 +7,9 @@ font-family = MesloLGMDZ Nerd Font Mono # window-decoration = false window-inherit-working-directory = true window-theme = dark -window-save-state = always -#window-width = 1920 -#window-height = 1080 +#window-save-state = alw11ays +window-width = 110 +window-height = 30 mouse-hide-while-typing = true copy-on-select = true @@ -40,3 +40,5 @@ cursor-color = #c8c093 cursor-text = #1d202f selection-background = #2d4f67 selection-foreground = #c8c093 + +keybind = ctrl+t=new_tab diff --git a/nvim.org/.config/nvim/.luarc.json b/nvim.org/.config/nvim/.luarc.json deleted file mode 100644 index 1e1765c..0000000 --- a/nvim.org/.config/nvim/.luarc.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "diagnostics.globals": [ - "vim" - ] -} \ No newline at end of file diff --git a/nvim.org/.config/nvim/init.lua b/nvim.org/.config/nvim/init.lua deleted file mode 100644 index 0bb211c..0000000 --- a/nvim.org/.config/nvim/init.lua +++ /dev/null @@ -1,19 +0,0 @@ -local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" -if not (vim.uv or vim.loop).fs_stat(lazypath) then - local lazyrepo = "https://github.com/folke/lazy.nvim.git" - local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) - if vim.v.shell_error ~= 0 then - vim.api.nvim_echo({ - { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, - { out, "WarningMsg" }, - { "\nPress any key to exit..." }, - }, true, {}) - vim.fn.getchar() - os.exit(1) - end -end -vim.opt.rtp:prepend(lazypath) - -require("lazy").setup("plugins") -require("vim-options") -require("keymaps") diff --git a/nvim.org/.config/nvim/lua/keymaps.lua b/nvim.org/.config/nvim/lua/keymaps.lua deleted file mode 100644 index 960c537..0000000 --- a/nvim.org/.config/nvim/lua/keymaps.lua +++ /dev/null @@ -1,42 +0,0 @@ -local keymap = vim.keymap -local opts = { noremap = true, silent = true } - --- Select all -keymap.set("n", "", "ggVG") - --- Tabs -keymap.set("n", "te", "tabedit", opts) -keymap.set("n", "", ":tabnext", opts) -keymap.set("n", "", ":tabprev", opts) - --- Split window -keymap.set("n", "ss", ":split", opts) -keymap.set("n", "sv", ":vsplit", opts) - --- Move window -keymap.set("n", "sh", "h") -keymap.set("n", "sj", "j") -keymap.set("n", "sk", "k") -keymap.set("n", "sl", "l") - --- Resize window -keymap.set("n", "", "<") -keymap.set("n", "", ">") -keymap.set("n", "", "+") -keymap.set("n", "", "-") - --- Lazy -keymap.set("n", "l", ":Lazy", opts) - --- Navigate vim panes better -keymap.set('n', '', ':wincmd k', opts) -keymap.set('n', '', ':wincmd j', opts) -keymap.set('n', '', ':wincmd h', opts) -keymap.set('n', '', ':wincmd l', opts) - -keymap.set('n', 'h', ':nohlsearch') - --- Git -keymap.set('n','gp',':Gitsigns preview_hunk',opts) -keymap.set('n','gt',':Gitsigns toggle_current_line_blame',opts) - diff --git a/nvim.org/.config/nvim/lua/plugins.lua b/nvim.org/.config/nvim/lua/plugins.lua deleted file mode 100644 index a564707..0000000 --- a/nvim.org/.config/nvim/lua/plugins.lua +++ /dev/null @@ -1 +0,0 @@ -return {} diff --git a/nvim.org/.config/nvim/lua/plugins/alpha.lua b/nvim.org/.config/nvim/lua/plugins/alpha.lua deleted file mode 100644 index 49524dc..0000000 --- a/nvim.org/.config/nvim/lua/plugins/alpha.lua +++ /dev/null @@ -1,29 +0,0 @@ -return { - "goolord/alpha-nvim", - dependencies = { - "nvim-tree/nvim-web-devicons", - }, - config = function() - local alpha = require("alpha") - local dashboard = require("alpha.themes.startify") - - dashboard.section.header.val = { - [[ ]], - [[ ]], - [[ ]], - [[ ]], - [[  ]], - [[ ████ ██████ █████ ██ ]], - [[ ███████████ █████  ]], - [[ █████████ ███████████████████ ███ ███████████ ]], - [[ █████████ ███ █████████████ █████ ██████████████ ]], - [[ █████████ ██████████ █████████ █████ █████ ████ █████ ]], - [[ ███████████ ███ ███ █████████ █████ █████ ████ █████ ]], - [[ ██████ █████████████████████ ████ █████ █████ ████ ██████ ]], - [[ ]], - [[ ]], - [[ ]], - } - alpha.setup(dashboard.opts) - end, -} diff --git a/nvim.org/.config/nvim/lua/plugins/catppucin.lua b/nvim.org/.config/nvim/lua/plugins/catppucin.lua deleted file mode 100644 index 962c232..0000000 --- a/nvim.org/.config/nvim/lua/plugins/catppucin.lua +++ /dev/null @@ -1,26 +0,0 @@ -return { - "catppuccin/nvim", - config = function() - require("catppuccin").setup({ - flavour = "mocha", - }) - end -} --- { --- "catppuccin/nvim", --- lazy = true, --- --name = "catppuccin", --- priority = 1000, --- config = function() --- -- require("catppuccin").setup({ --- -- flavour = "mocha", --- -- background = { --- -- light = "latte", --- -- dark = "mocha", --- -- }, --- -- transparent_background = true, --- -- }) --- vim.cmd.colorscheme("catppuccin") --mocha" --- end, --- }, ---} diff --git a/nvim.org/.config/nvim/lua/plugins/completions.lua b/nvim.org/.config/nvim/lua/plugins/completions.lua deleted file mode 100644 index dc45753..0000000 --- a/nvim.org/.config/nvim/lua/plugins/completions.lua +++ /dev/null @@ -1,45 +0,0 @@ -return { - { - "hrsh7th/cmp-nvim-lsp" - }, - { - "L3MON4D3/LuaSnip", - dependencies = { - "saadparwaiz1/cmp_luasnip", - "rafamadriz/friendly-snippets", - }, - }, - { - "hrsh7th/nvim-cmp", - config = function() - local cmp = require("cmp") - require("luasnip.loaders.from_vscode").lazy_load() - - cmp.setup({ - snippet = { - expand = function(args) - require("luasnip").lsp_expand(args.body) - end, - }, - window = { - completion = cmp.config.window.bordered(), - documentation = cmp.config.window.bordered(), - }, - mapping = cmp.mapping.preset.insert({ - [""] = cmp.mapping.scroll_docs(-4), - [""] = cmp.mapping.scroll_docs(4), - [""] = cmp.mapping.complete(), - [""] = cmp.mapping.abort(), - [""] = cmp.mapping.confirm({ select = true }), - }), - sources = cmp.config.sources({ - { name = "nvim_lsp" }, - { name = "luasnip" }, -- For luasnip users. - { name = "orgmode" }, - }, { - { name = "buffer" }, - }), - }) - end, - }, -} diff --git a/nvim.org/.config/nvim/lua/plugins/git-stuff.lua b/nvim.org/.config/nvim/lua/plugins/git-stuff.lua deleted file mode 100644 index dbef142..0000000 --- a/nvim.org/.config/nvim/lua/plugins/git-stuff.lua +++ /dev/null @@ -1,14 +0,0 @@ -return { - { - "tpope/vim-fugitive" - }, - { - "lewis6991/gitsigns.nvim", - config = function() - require("gitsigns").setup() - --- vim.keymap.set("n", "gp", ":Gitsigns preview_hunk", {}) --- vim.keymap.set("n", "gt", ":Gitsigns toggle_current_line_blame", {}) - end - } -} diff --git a/nvim.org/.config/nvim/lua/plugins/lsp-config.lua b/nvim.org/.config/nvim/lua/plugins/lsp-config.lua deleted file mode 100644 index 6d54ad8..0000000 --- a/nvim.org/.config/nvim/lua/plugins/lsp-config.lua +++ /dev/null @@ -1,43 +0,0 @@ -return { - { - 'williamboman/mason.nvim', - config = function() - require("mason").setup() - end - }, - { - 'williamboman/mason-lspconfig.nvim', - config = function() - require("mason-lspconfig").setup({ - ensure_installed = { "lua_ls", "bashls", "cssls", "docker_compose_language_service", "html", "yamlls" } - }) - end - }, - { - 'neovim/nvim-lspconfig', - config = function() - local capabilities = require("cmp_nvim_lsp").default_capabilities() - local lspconfig = require("lspconfig") - lspconfig.lua_ls.setup({ - capabilities = capabilities - }) - lspconfig.bashls.setup({ - capabilities = capabilities - }) - lspconfig.cssls.setup({ - capabilities = capabilities - }) - lspconfig.html.setup({ - capabilities = capabilities - }) - lspconfig.yamlls.setup({ - capabilities = capabilities - }) - vim.keymap.set('n', 'K', vim.lsp.buf.hover, {}) - vim.keymap.set('n', 'gd', vim.lsp.buf.definition, {}) - vim.keymap.set('n', 'gr', vim.lsp.buf.references, {}) - vim.keymap.set('n', 'ca', vim.lsp.buf.code_action, {}) - end - }, -} - diff --git a/nvim.org/.config/nvim/lua/plugins/lualine.lua b/nvim.org/.config/nvim/lua/plugins/lualine.lua deleted file mode 100644 index 57c618a..0000000 --- a/nvim.org/.config/nvim/lua/plugins/lualine.lua +++ /dev/null @@ -1,9 +0,0 @@ -return { - { - "nvim-lualine/lualine.nvim", - dependencies = { "nvim-tree/nvim-web-devicons" }, - config = function() - require('lualine').setup() - end - }, -} diff --git a/nvim.org/.config/nvim/lua/plugins/neorg.lua b/nvim.org/.config/nvim/lua/plugins/neorg.lua deleted file mode 100644 index d1860b7..0000000 --- a/nvim.org/.config/nvim/lua/plugins/neorg.lua +++ /dev/null @@ -1,6 +0,0 @@ -return { - "nvim-neorg/neorg", - lazy = false, -- Disable lazy loading as some `lazy.nvim` distributions set `lazy = true` by default - version = "*", -- Pin Neorg to the latest stable release - config = true, -} diff --git a/nvim.org/.config/nvim/lua/plugins/neotree.lua b/nvim.org/.config/nvim/lua/plugins/neotree.lua deleted file mode 100644 index 904ce46..0000000 --- a/nvim.org/.config/nvim/lua/plugins/neotree.lua +++ /dev/null @@ -1,13 +0,0 @@ -return { - "nvim-neo-tree/neo-tree.nvim", - branch = "v3.x", - dependencies = { - "nvim-lua/plenary.nvim", - "nvim-tree/nvim-web-devicons", - "MunifTanjim/nui.nvim", - }, - config = function() - vim.keymap.set("n", "", ":Neotree filesystem reveal left", {}) - vim.keymap.set("n", "bf", ":Neotree buffers reveal float", {}) - end, -} diff --git a/nvim.org/.config/nvim/lua/plugins/none-ls.lua b/nvim.org/.config/nvim/lua/plugins/none-ls.lua deleted file mode 100644 index 35f636f..0000000 --- a/nvim.org/.config/nvim/lua/plugins/none-ls.lua +++ /dev/null @@ -1,17 +0,0 @@ -return { - "nvimtools/none-ls.nvim", - dependencies = { - "nvimtools/none-ls-extras.nvim", - }, - config = function() - local null_ls = require("null-ls") - null_ls.setup({ - sources = { - null_ls.builtins.formatting.stylua, - null_ls.builtins.formatting.prettier, - require("none-ls.diagnostics.eslint_d"), - }, - }) - vim.keymap.set("n", "gf", vim.lsp.buf.format, {}) - end, -} diff --git a/nvim.org/.config/nvim/lua/plugins/nvim-tmux-navigator.lua b/nvim.org/.config/nvim/lua/plugins/nvim-tmux-navigator.lua deleted file mode 100644 index cee8e8d..0000000 --- a/nvim.org/.config/nvim/lua/plugins/nvim-tmux-navigator.lua +++ /dev/null @@ -1,7 +0,0 @@ -return { - 'christoomey/vim-tmux-navigator', - vim.keymap.set('n','C-h',':TmuxNavigateLeft'), - vim.keymap.set('n','C-j',':TmuxNavigateDown'), - vim.keymap.set('n','C-k',':TmuxNavigateUp'), - vim.keymap.set('n','C-l',':TmuxNavigateRight'), -} diff --git a/nvim.org/.config/nvim/lua/plugins/oil.lua b/nvim.org/.config/nvim/lua/plugins/oil.lua deleted file mode 100644 index ab18cde..0000000 --- a/nvim.org/.config/nvim/lua/plugins/oil.lua +++ /dev/null @@ -1,8 +0,0 @@ -return { - "stevearc/oil.nvim", - config = function() - local oil = require("oil") - oil.setup() - vim.keymap.set("n", "-", oil.toggle_float, {}) - end, -} diff --git a/nvim.org/.config/nvim/lua/plugins/orgmode.lua.disabled b/nvim.org/.config/nvim/lua/plugins/orgmode.lua.disabled deleted file mode 100644 index ff383ff..0000000 --- a/nvim.org/.config/nvim/lua/plugins/orgmode.lua.disabled +++ /dev/null @@ -1,19 +0,0 @@ -return { - 'nvim-orgmode/orgmode', - event = 'VeryLazy', - ft = { 'org' }, - config = function() - -- Setup orgmode - require('orgmode').setup({ - org_agenda_files = '~/orgfiles/**/*', - org_default_notes_file = '~/orgfiles/refile.org', - }) - - -- NOTE: If you are using nvim-treesitter with ~ensure_installed = "all"~ option - -- add ~org~ to ignore_install - -- require('nvim-treesitter.configs').setup({ - -- ensure_installed = 'all', - -- ignore_install = { 'org' }, - -- }) - end, -} diff --git a/nvim.org/.config/nvim/lua/plugins/telescope.lua b/nvim.org/.config/nvim/lua/plugins/telescope.lua deleted file mode 100644 index 710d0e8..0000000 --- a/nvim.org/.config/nvim/lua/plugins/telescope.lua +++ /dev/null @@ -1,25 +0,0 @@ -return { - { - "nvim-telescope/telescope-ui-select.nvim", - }, - { - "nvim-telescope/telescope.nvim", - tag = "0.1.5", - dependencies = { "nvim-lua/plenary.nvim" }, - config = function() - require("telescope").setup({ - extensions = { - ["ui-select"] = { - require("telescope.themes").get_dropdown({}), - }, - }, - }) - local builtin = require("telescope.builtin") - vim.keymap.set("n", "", builtin.find_files, {}) - vim.keymap.set("n", "fg", builtin.live_grep, {}) - vim.keymap.set("n", "", builtin.oldfiles, {}) - - require("telescope").load_extension("ui-select") - end, - }, -} diff --git a/nvim.org/.config/nvim/lua/plugins/treesitter.lua b/nvim.org/.config/nvim/lua/plugins/treesitter.lua deleted file mode 100644 index 6312070..0000000 --- a/nvim.org/.config/nvim/lua/plugins/treesitter.lua +++ /dev/null @@ -1,14 +0,0 @@ -return { - { - "nvim-treesitter/nvim-treesitter", - build = ":TSUpdate", - config = function() - local config = require("nvim-treesitter.configs") - config.setup({ - auto_install = true, - highlight = { enable = true }, - indent = { enable = true }, - }) - end - } -} diff --git a/nvim.org/.config/nvim/lua/vim-options.lua b/nvim.org/.config/nvim/lua/vim-options.lua deleted file mode 100644 index c941289..0000000 --- a/nvim.org/.config/nvim/lua/vim-options.lua +++ /dev/null @@ -1,13 +0,0 @@ -vim.cmd("set expandtab") -vim.cmd("set tabstop=2") -vim.cmd("set softtabstop=2") -vim.cmd("set shiftwidth=2") -vim.g.background = "dark" - -vim.opt.swapfile = false - -vim.cmd.colorscheme "catppuccin-mocha" -vim.wo.number = true - -vim.cmd("set mouse=") -vim.g.mapleader = " " diff --git a/nvim2/.config/nvim/.editorconfig b/nvim/.config/nvim/.editorconfig similarity index 100% rename from nvim2/.config/nvim/.editorconfig rename to nvim/.config/nvim/.editorconfig diff --git a/nvim/.config/nvim/lua/config/lazy.lua b/nvim/.config/nvim/lua/config/lazy.lua index 20aa7d7..db4b97b 100644 --- a/nvim/.config/nvim/lua/config/lazy.lua +++ b/nvim/.config/nvim/lua/config/lazy.lua @@ -18,7 +18,7 @@ vim.opt.rtp:prepend(lazypath) -- Make sure to setup `mapleader` and `maplocalleader` before -- loading lazy.nvim so that mappings are correct. -- This is also a good place to setup other settings (vim.opt) -vim.g.mapleader = " " +vim.g.mapleader = "," vim.g.maplocalleader = "\\" require("config.options") @@ -39,4 +39,4 @@ require("lazy").setup({ require("config.keymaps") -- For video recording purposes ---vim.cmd("ShowkeysToggle") +-- vim.cmd("ShowkeysToggle") diff --git a/nvim2/.config/nvim/init.lua b/nvim2/.config/nvim/init.lua deleted file mode 100644 index 55b8979..0000000 --- a/nvim2/.config/nvim/init.lua +++ /dev/null @@ -1 +0,0 @@ -require("config.lazy") diff --git a/nvim2/.config/nvim/lua/config/keymaps.lua b/nvim2/.config/nvim/lua/config/keymaps.lua deleted file mode 100644 index e4be48e..0000000 --- a/nvim2/.config/nvim/lua/config/keymaps.lua +++ /dev/null @@ -1,10 +0,0 @@ -vim.keymap.set("n", "-", "Oil --float", { desc = "Open Parent Directory in Oil" }) -vim.keymap.set("n", "gl", function() - vim.diagnostic.open_float() -end, { desc = "Open Diagnostics in Float" }) - -vim.keymap.set("n", "cf", function() - require("conform").format({ - lsp_format = "fallback", - }) -end, { desc = "Format current file" }) diff --git a/nvim2/.config/nvim/lua/config/lazy.lua b/nvim2/.config/nvim/lua/config/lazy.lua deleted file mode 100644 index db4b97b..0000000 --- a/nvim2/.config/nvim/lua/config/lazy.lua +++ /dev/null @@ -1,42 +0,0 @@ --- Bootstrap lazy.nvim -local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" -if not (vim.uv or vim.loop).fs_stat(lazypath) then - local lazyrepo = "https://github.com/folke/lazy.nvim.git" - local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) - if vim.v.shell_error ~= 0 then - vim.api.nvim_echo({ - { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, - { out, "WarningMsg" }, - { "\nPress any key to exit..." }, - }, true, {}) - vim.fn.getchar() - os.exit(1) - end -end -vim.opt.rtp:prepend(lazypath) - --- Make sure to setup `mapleader` and `maplocalleader` before --- loading lazy.nvim so that mappings are correct. --- This is also a good place to setup other settings (vim.opt) -vim.g.mapleader = "," -vim.g.maplocalleader = "\\" - -require("config.options") - --- Setup lazy.nvim -require("lazy").setup({ - spec = { - -- import your plugins - { import = "plugins" }, - }, - -- Configure any other settings here. See the documentation for more details. - -- colorscheme that will be used when installing plugins. - install = { colorscheme = { "kanagawa" } }, - -- automatically check for plugin updates - checker = { enabled = true }, -}) - -require("config.keymaps") - --- For video recording purposes --- vim.cmd("ShowkeysToggle") diff --git a/nvim2/.config/nvim/lua/config/options.lua b/nvim2/.config/nvim/lua/config/options.lua deleted file mode 100644 index e3a01d3..0000000 --- a/nvim2/.config/nvim/lua/config/options.lua +++ /dev/null @@ -1,53 +0,0 @@ --- Some keyboard mappings as I don't want to break my fingers, while typing on a "german" keyboard ;) -vim.opt.langmap = "+]ü[" --- Plain langmap remapping does not seem to do the trick :( -vim.keymap.set("n", "ü", "[", { remap = true }) - -vim.opt.expandtab = true -- Convert tabs to spaces -vim.opt.shiftwidth = 4 -- Amount to indent with << and >> -vim.opt.tabstop = 4 -- How many spaces are shown per Tab -vim.opt.softtabstop = 4 -- How many spaces are applied when pressing Tab - -vim.opt.smarttab = true -vim.opt.smartindent = true -vim.opt.autoindent = true -- Keep identation from previous line - --- Enable break indent -vim.opt.breakindent = true - --- Always show relative line numbers -vim.opt.number = true -vim.opt.relativenumber = true - --- Show line under cursor -vim.opt.cursorline = true - --- Store undos between sessions -vim.opt.undofile = true - --- Enable mouse mode, can be useful for resizing splits for example! -vim.opt.mouse = "a" - --- Don't show the mode, since it's already in the status line -vim.opt.showmode = false - --- Case-insensitive searching UNLESS \C or one or more capital letters in the search term -vim.opt.ignorecase = true -vim.opt.smartcase = true - --- Keep signcolumn on by default -vim.opt.signcolumn = "yes" - --- Configure how new splits should be opened -vim.opt.splitright = true -vim.opt.splitbelow = true - --- Sets how neovim will display certain whitespace characters in the editor. --- See `:help 'list'` --- and `:help 'listchars'` -vim.opt.list = true -vim.opt.listchars = { tab = "» ", trail = "·", nbsp = "␣" } - --- Minimal number of screen lines to keep above and below the cursor. -vim.opt.scrolloff = 5 - diff --git a/nvim2/.config/nvim/lua/plugins/blink-cmp.lua b/nvim2/.config/nvim/lua/plugins/blink-cmp.lua deleted file mode 100644 index c69426d..0000000 --- a/nvim2/.config/nvim/lua/plugins/blink-cmp.lua +++ /dev/null @@ -1,110 +0,0 @@ -return { - { - "saghen/blink.compat", - -- use the latest release, via version = '*', if you also use the latest release for blink.cmp - version = "*", - -- lazy.nvim will automatically load the plugin when it's required by blink.cmp - lazy = true, - -- make sure to set opts so that lazy.nvim calls blink.compat's setup - opts = {}, - }, - { - "saghen/blink.cmp", - -- optional: provides snippets for the snippet source - dependencies = { - "rafamadriz/friendly-snippets", - "moyiz/blink-emoji.nvim", - "ray-x/cmp-sql", - }, - - -- use a release tag to download pre-built binaries - version = "1.*", - -- AND/OR build from source, requires nightly: https://rust-lang.github.io/rustup/concepts/channels.html#working-with-nightly-rust - -- build = 'cargo build --release', - -- If you use nix, you can build from source using latest nightly rust with: - -- build = 'nix run .#build-plugin', - - ---@module 'blink.cmp' - ---@type blink.cmp.Config - opts = { - -- 'default' (recommended) for mappings similar to built-in completions (C-y to accept) - -- 'super-tab' for mappings similar to vscode (tab to accept) - -- 'enter' for enter to accept - -- 'none' for no mappings - -- - -- All presets have the following mappings: - -- C-space: Open menu or open docs if already open - -- C-n/C-p or Up/Down: Select next/previous item - -- C-e: Hide menu - -- C-k: Toggle signature help (if signature.enabled = true) - -- - -- See :h blink-cmp-config-keymap for defining your own keymap - keymap = { - preset = "default", - [""] = { "accept", "fallback" }, - }, - - appearance = { - -- 'mono' (default) for 'Nerd Font Mono' or 'normal' for 'Nerd Font' - -- Adjusts spacing to ensure icons are aligned - nerd_font_variant = "mono", - }, - - -- (Default) Only show the documentation popup when manually triggered - completion = { documentation = { auto_show = true } }, - signature = { enabled = true }, - - -- Default list of enabled providers defined so that you can extend it - -- elsewhere in your config, without redefining it, due to `opts_extend` - sources = { - default = { "lsp", "path", "snippets", "buffer", "emoji", "sql" }, - providers = { - emoji = { - module = "blink-emoji", - name = "Emoji", - score_offset = 15, -- Tune by preference - opts = { insert = true }, -- Insert emoji (default) or complete its name - should_show_items = function() - return vim.tbl_contains( - -- Enable emoji completion only for git commits and markdown. - -- By default, enabled for all file-types. - { "gitcommit", "markdown" }, - vim.o.filetype - ) - end, - }, - sql = { - -- IMPORTANT: use the same name as you would for nvim-cmp - name = "sql", - module = "blink.compat.source", - - -- all blink.cmp source config options work as normal: - score_offset = -3, - - -- this table is passed directly to the proxied completion source - -- as the `option` field in nvim-cmp's source config - -- - -- this is NOT the same as the opts in a plugin's lazy.nvim spec - opts = {}, - should_show_items = function() - return vim.tbl_contains( - -- Enable emoji completion only for git commits and markdown. - -- By default, enabled for all file-types. - { "sql" }, - vim.o.filetype - ) - end, - }, - }, - }, - - -- (Default) Rust fuzzy matcher for typo resistance and significantly better performance - -- You may use a lua implementation instead by using `implementation = "lua"` or fallback to the lua implementation, - -- when the Rust fuzzy matcher is not available, by using `implementation = "prefer_rust"` - -- - -- See the fuzzy documentation for more information - fuzzy = { implementation = "prefer_rust_with_warning" }, - }, - opts_extend = { "sources.default" }, - }, -} diff --git a/nvim2/.config/nvim/lua/plugins/conform.lua b/nvim2/.config/nvim/lua/plugins/conform.lua deleted file mode 100644 index a0107ff..0000000 --- a/nvim2/.config/nvim/lua/plugins/conform.lua +++ /dev/null @@ -1,20 +0,0 @@ -return { - "stevearc/conform.nvim", - opts = { - formatters_by_ft = { - lua = { "stylua" }, - -- Conform will run multiple formatters sequentially - python = { "isort", "black" }, - -- You can customize some of the format options for the filetype (:help conform.format) - rust = { "rustfmt" }, - -- Conform will run the first available formatter - javascript = { "prettierd", "prettier", stop_after_first = true }, - typescript = { "prettierd", "prettier", stop_after_first = true }, - }, - format_on_save = { - -- These options will be passed to conform.format() - timeout_ms = 500, - lsp_format = "fallback", - }, - }, -} diff --git a/nvim2/.config/nvim/lua/plugins/dressing.lua b/nvim2/.config/nvim/lua/plugins/dressing.lua deleted file mode 100644 index 65d7987..0000000 --- a/nvim2/.config/nvim/lua/plugins/dressing.lua +++ /dev/null @@ -1,4 +0,0 @@ -return { - 'stevearc/dressing.nvim', - opts = {}, -} diff --git a/nvim2/.config/nvim/lua/plugins/fzflua.lua b/nvim2/.config/nvim/lua/plugins/fzflua.lua deleted file mode 100644 index 240bf26..0000000 --- a/nvim2/.config/nvim/lua/plugins/fzflua.lua +++ /dev/null @@ -1,95 +0,0 @@ -return { - "ibhagwan/fzf-lua", - -- optional for icon support - -- dependencies = { "nvim-tree/nvim-web-devicons" }, - -- or if using mini.icons/mini.nvim - dependencies = { "echasnovski/mini.icons" }, - opts = {}, - keys={ - { - "ff", - function() require('fzf-lua').files() end, - desc="Find Files in project directory" - }, - { - "fg", - function() require('fzf-lua').live_grep() end, - desc="Find by grepping in project directory" - }, - { - "fc", - function() require('fzf-lua').files({cwd=vim.fn.stdpath("config")}) end, - desc="Find in neovim configuration" - }, - { - "fh", - function() - require("fzf-lua").helptags() - end, - desc = "[F]ind [H]elp", - }, - { - "fk", - function() - require("fzf-lua").keymaps() - end, - desc = "[F]ind [K]eymaps", - }, - { - "fb", - function() - require("fzf-lua").builtin() - end, - desc = "[F]ind [B]uiltin FZF", - }, - { - "fw", - function() - require("fzf-lua").grep_cword() - end, - desc = "[F]ind current [W]ord", - }, - { - "fW", - function() - require("fzf-lua").grep_cWORD() - end, - desc = "[F]ind current [W]ORD", - }, - { - "fd", - function() - require("fzf-lua").diagnostics_document() - end, - desc = "[F]ind [D]iagnostics", - }, - { - "fr", - function() - require("fzf-lua").resume() - end, - desc = "[F]ind [R]esume", - }, - { - "fo", - function() - require("fzf-lua").oldfiles() - end, - desc = "[F]ind [O]ld Files", - }, - { - "", - function() - require("fzf-lua").buffers() - end, - desc = "[,] Find existing buffers", - }, - { - "/", - function() - require("fzf-lua").lgrep_curbuf() - end, - desc = "[/] Live grep the current buffer", - }, - } -} diff --git a/nvim2/.config/nvim/lua/plugins/kanagawa.lua b/nvim2/.config/nvim/lua/plugins/kanagawa.lua deleted file mode 100644 index 29e302b..0000000 --- a/nvim2/.config/nvim/lua/plugins/kanagawa.lua +++ /dev/null @@ -1,21 +0,0 @@ -return { - "rebelot/kanagawa.nvim", - branch="master", - config=function() - require('kanagawa').setup({ - transparent=true, - overrides=function(colors) - return { - ["@markup.link.url.markdown_inline"] = { link = "Special" }, -- (url) - ["@markup.link.label.markdown_inline"] = { link = "WarningMsg" }, -- [label] - ["@markup.italic.markdown_inline"] = { link = "Exception" }, -- *italic* - ["@markup.raw.markdown_inline"] = { link = "String" }, -- `code` - ["@markup.list.markdown"] = { link = "Function" }, -- + list - ["@markup.quote.markdown"] = { link = "Error" }, -- > blockcode - ["@markup.list.checked.markdown"] = { link = "WarningMsg" } -- - [X] checked list item - } - end - }); - vim.cmd("colorscheme kanagawa"); - end, -} diff --git a/nvim2/.config/nvim/lua/plugins/lsp.lua b/nvim2/.config/nvim/lua/plugins/lsp.lua deleted file mode 100644 index f436e87..0000000 --- a/nvim2/.config/nvim/lua/plugins/lsp.lua +++ /dev/null @@ -1,272 +0,0 @@ -return { - -- Main LSP Configuration - "neovim/nvim-lspconfig", - dependencies = { - -- Automatically install LSPs and related tools to stdpath for Neovim - -- Mason must be loaded before its dependents so we need to set it up here. - -- NOTE: `opts = {}` is the same as calling `require('mason').setup({})` - { "williamboman/mason.nvim", opts = {} }, - "williamboman/mason-lspconfig.nvim", - "WhoIsSethDaniel/mason-tool-installer.nvim", - - -- Useful status updates for LSP. - { "j-hui/fidget.nvim", opts = {} }, - }, - config = function() - -- Brief aside: **What is LSP?** - -- - -- LSP is an initialism you've probably heard, but might not understand what it is. - -- - -- LSP stands for Language Server Protocol. It's a protocol that helps editors - -- and language tooling communicate in a standardized fashion. - -- - -- In general, you have a "server" which is some tool built to understand a particular - -- language (such as `gopls`, `lua_ls`, `rust_analyzer`, etc.). These Language Servers - -- (sometimes called LSP servers, but that's kind of like ATM Machine) are standalone - -- processes that communicate with some "client" - in this case, Neovim! - -- - -- LSP provides Neovim with features like: - -- - Go to definition - -- - Find references - -- - Autocompletion - -- - Symbol Search - -- - and more! - -- - -- Thus, Language Servers are external tools that must be installed separately from - -- Neovim. This is where `mason` and related plugins come into play. - -- - -- If you're wondering about lsp vs treesitter, you can check out the wonderfully - -- and elegantly composed help section, `:help lsp-vs-treesitter` - - -- This function gets run when an LSP attaches to a particular buffer. - -- That is to say, every time a new file is opened that is associated with - -- an lsp (for example, opening `main.rs` is associated with `rust_analyzer`) this - -- function will be executed to configure the current buffer - vim.api.nvim_create_autocmd("LspAttach", { - group = vim.api.nvim_create_augroup("kickstart-lsp-attach", { clear = true }), - callback = function(event) - -- NOTE: Remember that Lua is a real programming language, and as such it is possible - -- to define small helper and utility functions so you don't have to repeat yourself. - -- - -- In this case, we create a function that lets us more easily define mappings specific - -- for LSP related items. It sets the mode, buffer and description for us each time. - local map = function(keys, func, desc, mode) - mode = mode or "n" - vim.keymap.set(mode, keys, func, { buffer = event.buf, desc = "LSP: " .. desc }) - end - - -- Jump to the definition of the word under your cursor. - -- This is where a variable was first declared, or where a function is defined, etc. - -- To jump back, press . - map("gd", require("fzf-lua").lsp_definitions, "[G]oto [D]efinition") - - -- Find references for the word under your cursor. - map("gr", require("fzf-lua").lsp_references, "[G]oto [R]eferences") - - -- Jump to the implementation of the word under your cursor. - -- Useful when your language has ways of declaring types without an actual implementation. - map("gI", require("fzf-lua").lsp_implementations, "[G]oto [I]mplementation") - - -- Jump to the type of the word under your cursor. - -- Useful when you're not sure what type a variable is and you want to see - -- the definition of its *type*, not where it was *defined*. - map("D", require("fzf-lua").lsp_typedefs, "Type [D]efinition") - - -- Fuzzy find all the symbols in your current document. - -- Symbols are things like variables, functions, types, etc. - map("ds", require("fzf-lua").lsp_document_symbols, "[D]ocument [S]ymbols") - - -- Fuzzy find all the symbols in your current workspace. - -- Similar to document symbols, except searches over your entire project. - map("ws", require("fzf-lua").lsp_live_workspace_symbols, "[W]orkspace [S]ymbols") - - -- Rename the variable under your cursor. - -- Most Language Servers support renaming across files, etc. - map("cr", vim.lsp.buf.rename, "[R]e[n]ame") - - -- Execute a code action, usually your cursor needs to be on top of an error - -- or a suggestion from your LSP for this to activate. - map("ca", vim.lsp.buf.code_action, "[C]ode [A]ction", { "n", "x" }) - - -- WARN: This is not Goto Definition, this is Goto Declaration. - -- For example, in C this would take you to the header. - map("gD", vim.lsp.buf.declaration, "[G]oto [D]eclaration") - - -- This function resolves a difference between neovim nightly (version 0.11) and stable (version 0.10) - ---@param client vim.lsp.Client - ---@param method vim.lsp.protocol.Method - ---@param bufnr? integer some lsp support methods only in specific files - ---@return boolean - local function client_supports_method(client, method, bufnr) - if vim.fn.has("nvim-0.11") == 1 then - return client:supports_method(method, bufnr) - else - return client.supports_method(method, { bufnr = bufnr }) - end - end - - -- The following two autocommands are used to highlight references of the - -- word under your cursor when your cursor rests there for a little while. - -- See `:help CursorHold` for information about when this is executed - -- - -- When you move your cursor, the highlights will be cleared (the second autocommand). - local client = vim.lsp.get_client_by_id(event.data.client_id) - if - client - and client_supports_method( - client, - vim.lsp.protocol.Methods.textDocument_documentHighlight, - event.buf - ) - then - local highlight_augroup = vim.api.nvim_create_augroup("kickstart-lsp-highlight", { clear = false }) - vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, { - buffer = event.buf, - group = highlight_augroup, - callback = vim.lsp.buf.document_highlight, - }) - - vim.api.nvim_create_autocmd({ "CursorMoved", "CursorMovedI" }, { - buffer = event.buf, - group = highlight_augroup, - callback = vim.lsp.buf.clear_references, - }) - - vim.api.nvim_create_autocmd("LspDetach", { - group = vim.api.nvim_create_augroup("kickstart-lsp-detach", { clear = true }), - callback = function(event2) - vim.lsp.buf.clear_references() - vim.api.nvim_clear_autocmds({ group = "kickstart-lsp-highlight", buffer = event2.buf }) - end, - }) - end - - -- The following code creates a keymap to toggle inlay hints in your - -- code, if the language server you are using supports them - -- - -- This may be unwanted, since they displace some of your code - if - client - and client_supports_method(client, vim.lsp.protocol.Methods.textDocument_inlayHint, event.buf) - then - map("th", function() - vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({ bufnr = event.buf })) - end, "[T]oggle Inlay [H]ints") - end - end, - }) - - -- Diagnostic Config - -- See :help vim.diagnostic.Opts - vim.diagnostic.config({ - severity_sort = true, - float = { border = "rounded", source = "if_many" }, - underline = { severity = vim.diagnostic.severity.ERROR }, - signs = { - text = { - [vim.diagnostic.severity.ERROR] = "󰅚 ", - [vim.diagnostic.severity.WARN] = "󰀪 ", - [vim.diagnostic.severity.INFO] = "󰋽 ", - [vim.diagnostic.severity.HINT] = "󰌶 ", - }, - }, - virtual_text = { - source = "if_many", - spacing = 2, - format = function(diagnostic) - local diagnostic_message = { - [vim.diagnostic.severity.ERROR] = diagnostic.message, - [vim.diagnostic.severity.WARN] = diagnostic.message, - [vim.diagnostic.severity.INFO] = diagnostic.message, - [vim.diagnostic.severity.HINT] = diagnostic.message, - } - return diagnostic_message[diagnostic.severity] - end, - }, - }) - - -- LSP servers and clients are able to communicate to each other what features they support. - -- By default, Neovim doesn't support everything that is in the LSP specification. - -- When you add nvim-cmp, luasnip, etc. Neovim now has *more* capabilities. - -- So, we create new capabilities with nvim cmp, and then broadcast that to the servers. - local original_capabilities = vim.lsp.protocol.make_client_capabilities() - local capabilities = require("blink.cmp").get_lsp_capabilities(original_capabilities) - -- capabilities = vim.tbl_deep_extend('force', capabilities, require('cmp_nvim_lsp').default_capabilities()) - - -- Enable the following language servers - -- Feel free to add/remove any LSPs that you want here. They will automatically be installed. - -- - -- Add any additional override configuration in the following tables. Available keys are: - -- - cmd (table): Override the default command used to start the server - -- - filetypes (table): Override the default list of associated filetypes for the server - -- - capabilities (table): Override fields in capabilities. Can be used to disable certain LSP features. - -- - settings (table): Override the default settings passed when initializing the server. - -- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/ - local servers = { - bashls = {}, - marksman = {}, - -- clangd = {}, - -- gopls = {}, - -- pyright = {}, - -- rust_analyzer = {}, - -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs - -- - -- Some languages (like typescript) have entire language plugins that can be useful: - -- https://github.com/pmizio/typescript-tools.nvim - -- - -- But for many setups, the LSP (`ts_ls`) will work just fine - -- ts_ls = {}, - -- - - lua_ls = { - -- cmd = { ... }, - -- filetypes = { ... }, - -- capabilities = {}, - -- settings = { - -- Lua = { - -- completion = { - -- callSnippet = 'Replace', - -- }, - -- -- You can toggle below to ignore Lua_LS's noisy `missing-fields` warnings - -- -- diagnostics = { disable = { 'missing-fields' } }, - -- }, - -- }, - }, - } - - -- Ensure the servers and tools above are installed - -- - -- To check the current status of installed tools and/or manually install - -- other tools, you can run - -- :Mason - -- - -- You can press `g?` for help in this menu. - -- - -- `mason` had to be setup earlier: to configure its options see the - -- `dependencies` table for `nvim-lspconfig` above. - -- - -- You can add other tools here that you want Mason to install - -- for you, so that they are available from within Neovim. - local ensure_installed = vim.tbl_keys(servers or {}) - vim.list_extend(ensure_installed, { - "stylua", -- Used to format Lua code - "prettierd", -- Used to format javascript and typescript code - }) - require("mason-tool-installer").setup({ ensure_installed = ensure_installed }) - - require("mason-lspconfig").setup({ - ensure_installed = {}, -- explicitly set to an empty table (Kickstart populates installs via mason-tool-installer) - automatic_installation = false, - handlers = { - function(server_name) - local server = servers[server_name] or {} - -- This handles overriding only values explicitly passed - -- by the server configuration above. Useful when disabling - -- certain features of an LSP (for example, turning off formatting for ts_ls) - server.capabilities = vim.tbl_deep_extend("force", {}, capabilities, server.capabilities or {}) - require("lspconfig")[server_name].setup(server) - end, - }, - }) - end, -} diff --git a/nvim2/.config/nvim/lua/plugins/nvim-treesitter-textobjects.lua b/nvim2/.config/nvim/lua/plugins/nvim-treesitter-textobjects.lua deleted file mode 100644 index 40c9ec1..0000000 --- a/nvim2/.config/nvim/lua/plugins/nvim-treesitter-textobjects.lua +++ /dev/null @@ -1,63 +0,0 @@ -return { - "nvim-treesitter/nvim-treesitter-textobjects", - dependencies = { - "nvim-treesitter/nvim-treesitter" - }, - init = function() - local config = require'nvim-treesitter.configs'; - config.setup({ - textobjects = { - select = { - enable = true, - - -- Automatically jump forward to textobj, similar to targets.vim - lookahead = true, - - keymaps = { - -- You can use the capture groups defined in textobjects.scm - ["af"] = "@function.outer", - ["if"] = "@function.inner", - ["ac"] = "@class.outer", - ["ao"] = "@comment.outer", - -- You can optionally set descriptions to the mappings (used in the desc parameter of - -- nvim_buf_set_keymap) which plugins like which-key display - ["ic"] = { query = "@class.inner", desc = "Select inner part of a class region" }, - -- You can also use captures from other query groups like `locals.scm` - ["as"] = { query = "@local.scope", query_group = "locals", desc = "Select language scope" }, - }, - -- You can choose the select mode (default is charwise 'v') - -- - -- Can also be a function which gets passed a table with the keys - -- * query_string: eg '@function.inner' - -- * method: eg 'v' or 'o' - -- and should return the mode ('v', 'V', or '') or a table - -- mapping query_strings to modes. - selection_modes = { - ['@parameter.outer'] = 'v', -- charwise - ['@function.outer'] = 'V', -- linewise - ['@class.outer'] = '', -- blockwise - }, - -- If you set this to `true` (default is `false`) then any textobject is - -- extended to include preceding or succeeding whitespace. Succeeding - -- whitespace has priority in order to act similarly to eg the built-in - -- `ap`. - -- - -- Can also be a function which gets passed a table with the keys - -- * query_string: eg '@function.inner' - -- * selection_mode: eg 'v' - -- and should return true or false - include_surrounding_whitespace = true, - }, - swap = { - enable = true, - swap_next = { - ["a"] = {query="@parameter.inner", desc="Swap with next parameter"}, - }, - swap_previous = { - ["A"] = "@parameter.inner", - }, - }, - }, - }); - end -} diff --git a/nvim2/.config/nvim/lua/plugins/nvim-treesitter.lua b/nvim2/.config/nvim/lua/plugins/nvim-treesitter.lua deleted file mode 100644 index 1c9c6a2..0000000 --- a/nvim2/.config/nvim/lua/plugins/nvim-treesitter.lua +++ /dev/null @@ -1,27 +0,0 @@ -return { - "nvim-treesitter/nvim-treesitter", - build = ":TSUpdate", - config = function () - local configs = require("nvim-treesitter.configs") - - configs.setup({ - ensure_installed = { - "c", "lua", "vim", "vimdoc", "query", "elixir", "heex", "javascript", "html", "markdown", "markdown_inline" - }, - auto_install = true, - sync_install = false, - highlight = { enable = true }, - indent = { enable = true }, - - incremental_selection = { - enable = true, - keymaps = { - init_selection = "", -- set to `false` to disable one of the mappings - node_incremental = "", - scope_incremental = false, - node_decremental = "", - }, - }, - }) - end -} diff --git a/nvim2/.config/nvim/lua/plugins/oil.lua b/nvim2/.config/nvim/lua/plugins/oil.lua deleted file mode 100644 index 19f7ed9..0000000 --- a/nvim2/.config/nvim/lua/plugins/oil.lua +++ /dev/null @@ -1,15 +0,0 @@ -return { - "stevearc/oil.nvim", - ---@module 'oil' - ---@type oil.SetupOpts - opts = { - view_options = { - show_hidden = true, - }, - }, - -- Optional dependencies - dependencies = { { "echasnovski/mini.icons", opts = {} } }, - -- dependencies = { "nvim-tree/nvim-web-devicons" }, -- use if you prefer nvim-web-devicons - -- Lazy loading is not recommended because it is very tricky to make it work correctly in all situations. - lazy = false, -} diff --git a/nvim2/.config/nvim/lua/plugins/project.lua b/nvim2/.config/nvim/lua/plugins/project.lua deleted file mode 100644 index 143b66d..0000000 --- a/nvim2/.config/nvim/lua/plugins/project.lua +++ /dev/null @@ -1,40 +0,0 @@ -return { - "ahmedkhalf/project.nvim", - init = function() - require("project_nvim").setup { - -- your configuration comes her - -- or leave it empty to use the default settings - -- refer to the configuration section below - } - - - -- Absolutely minimal implementation of fzf-lua based project finder - -- for fzf-lua, due to request from @KrisWilliams1 (Maybe extended to a - -- full blown port from the original selector in the future) - local history = require("project_nvim.utils.history") - local project = require("project_nvim.project") - - vim.api.nvim_create_user_command("FzfProjects", function() - local projects = history.get_recent_projects() - - require("fzf-lua").fzf_exec(projects, { - prompt = "Projects> ", - actions = { - ["default"] = function(selected) - if selected and #selected > 0 then - local project_path = selected[1] - if project.set_pwd(project_path, "fzf-lua") then - require("fzf-lua").files() - end - end - end - } - }) - end, {}) - end, - keys = { - { - "fp", "FzfProjects", desc="Find Recent Projects" - } - } -} diff --git a/nvim2/.config/nvim/lua/plugins/rustacean.lua b/nvim2/.config/nvim/lua/plugins/rustacean.lua deleted file mode 100644 index 46c4c82..0000000 --- a/nvim2/.config/nvim/lua/plugins/rustacean.lua +++ /dev/null @@ -1,5 +0,0 @@ -return { - 'mrcjkb/rustaceanvim', - version = '^5', -- Recommended - lazy = false, -- This plugin is already lazy -} diff --git a/nvim2/.config/nvim/lua/plugins/showkeys.lua b/nvim2/.config/nvim/lua/plugins/showkeys.lua deleted file mode 100644 index fc6ec18..0000000 --- a/nvim2/.config/nvim/lua/plugins/showkeys.lua +++ /dev/null @@ -1,7 +0,0 @@ -return { - "nvzone/showkeys", - cmd = "ShowkeysToggle", - opts={ - maxkeys=5 - } -} diff --git a/nvim2/.config/nvim/lua/plugins/sleuth-vim.lua b/nvim2/.config/nvim/lua/plugins/sleuth-vim.lua deleted file mode 100644 index d04ea94..0000000 --- a/nvim2/.config/nvim/lua/plugins/sleuth-vim.lua +++ /dev/null @@ -1,5 +0,0 @@ -return { - "tpope/vim-sleuth", - -- No further initialization needed, as this is a real "vim" not a lua - -- plugin. -} diff --git a/nvim2/.config/nvim/lua/plugins/statusline.lua b/nvim2/.config/nvim/lua/plugins/statusline.lua deleted file mode 100644 index 4a51017..0000000 --- a/nvim2/.config/nvim/lua/plugins/statusline.lua +++ /dev/null @@ -1 +0,0 @@ -return { 'echasnovski/mini.statusline', version = false, opts={} } diff --git a/nvim2/.config/nvim/lua/plugins/which-key.lua b/nvim2/.config/nvim/lua/plugins/which-key.lua deleted file mode 100644 index 9fadb97..0000000 --- a/nvim2/.config/nvim/lua/plugins/which-key.lua +++ /dev/null @@ -1,18 +0,0 @@ -return { - "folke/which-key.nvim", - event = "VeryLazy", - opts = { - -- your configuration comes here - -- or leave it empty to use the default settings - -- refer to the configuration section below - }, - keys = { - { - "?", - function() - require("which-key").show({ global = false }) - end, - desc = "Buffer Local Keymaps (which-key)", - }, - }, -}