Compare commits

..

No commits in common. "8387619a3abf57cd7fce39c1f252aef3dffabd70" and "6b0da868bb83f02fc81fc26a10dfdd641fbe2975" have entirely different histories.

213 changed files with 3625 additions and 1805 deletions

1
.chezmoiroot Normal file
View file

@ -0,0 +1 @@
chezmoi

View file

@ -1,6 +0,0 @@
includes = []
packages = ["default", "cli", "dev"]
[files]
[variables]

View file

@ -1,72 +0,0 @@
[settings]
default_target_type = "automatic"
[helpers]
flatten_table = ".dotter/handlebars_helpers/flatten_table.rhai"
header = ".dotter/handlebars_helpers/header.rhai"
# CLI package
[cli]
depends = ["nvim", "zsh", "fzf", "starship"]
[cli.variables]
nerd_font = "JetBrainsMono"
[cli.files]
"config/bat" = "~/.config/bat"
"config/kitty" = {target = "~/.config/kitty", type = "symbolic" }
"config/sesh" = "~/.config/sesh"
"config/tmux" = "~/.config/tmux"
"config/yazi" = "~/.config/yazi"
"config/zellij" = "~/.config/zellij"
[dev]
depends = ["rust"]
[dev.files]
"config/git" = "~/.config/git"
"config/lazygit" = { target = "~/.config/lazygit", type = "symbolic"}
"config/zed" = "~/.config/zed"
[zsh.files]
"config/zsh/zshrc" = "~/.zshrc"
"config/zsh/zprofile" = "~/.zprofile"
"config/zsh/aliases" = {target = "~/.config/zsh/aliases", type="symbolic"}
"config/zsh/completions" = {target = "~/.config/zsh/completions", type = "symbolic"}
"config/zsh/functions" = "~/.config/zsh/functions"
[fzf.files]
"config/fzf" = "~/.config/fzf"
[starship.files]
"config/starship.toml" = "~/.config/starship.toml"
[nushell.files]
"config/nushell" = "~/.config/nushell"
[nvim.files]
"config/nvim" = "~/.config/nvim"
[nvim.files."config/nvim/lua/aleidk/lazy.lua"]
target = "~/.config/nvim/lua/aleidk/lazy.lua"
type = "template"
prepend = """
local enabled_plugins = {
nvim_core = {{ nvim-core }},
nvim_base = {{ nvim-base }},
nvim_ide = {{ nvim-ide }},
}
"""
# Handle package activation from Lazy instead of dotter
# This will prevent conflics in lazy-lock.json for having different plugins
[nvim.variables]
nvim-core = true
nvim-base = false
nvim-ide = false
[rust.variables]
cargo.packages = []
[mise.files]
"config/mise" = "~/.config/mise"

View file

@ -1,30 +0,0 @@
/*
* Flatten a table into a list of values.
* The table has to be in the form of
* ```toml
* [table.subtable]
* variable1 = ["value1", "value2"]
*
* [table.subtable]
* variable2 = ["value3", "value4"]
*
* then we use it in handlerbars like this:
*
* {{ flatten_table table.subtable }}
*
* and it will return an array with all the arrays of subtable
*/
if type_of(params[0]) != "map" {
return;
}
let table = params[0];
let result = [];
for value in table.values() {
result.append(value);
}
result

View file

@ -1,48 +0,0 @@
let x_padding = hash["padding"] ?? 50;
let header = #{
x_padding: x_padding,
out: "",
append: |suffix| {
this.out += suffix + "\n";
},
append_center: |suffix| {
let suffix_len = suffix.len();
let padding = this.x_padding - suffix_len / 2;
let fill = "";
fill.pad(padding, " ");
this.out += fill + suffix.to_upper() + fill + "\n";
},
append_divider: || {
let divider = "";
divider.pad(this.x_padding * 2, "─");
this.append(divider);
},
open_echo: || {
this.out += "echo -e '\n";
},
close_echo: || {
this.out += "'";
},
to_string: || {
return this.out;
}
};
header.open_echo();
header.append_divider();
params.for_each(|idx| {
header.append_center(this);
});
header.append_divider();
header.close_echo();
return header.to_string();

View file

@ -1,66 +0,0 @@
# Dotter only support merging tables, and put the key-values into the global scope of the tables
# If we try to use the same variable name in a package, it will throw an error
# if we try to use the same key in a nested table, it will be overriden with the last value
#
# the fix to this is to have a table with unique keys, this is supported by handlerbars {{#each}} directive
# but will give us an array as value, so we need to flatten it
[utils.variables]
pkg-install = "sudo dnf install -y"
[cli.variables.copr]
cli = [
"atim/lazygit",
"atim/starship"
]
[cli.variables.packages]
cli = [
"bat",
"dnf-plugin-system-upgrade",
"duf",
"eza",
"fd-find",
# "firefox-dev",
"flatpak",
"fzf",
"git",
"kitty",
"lazygit",
"neovim",
"remove-retired-packages",
"ripgrep",
"sd",
"starship",
"tealdeer",
"zoxide",
"zsh",
]
[dev.variables.packages]
dev = [
"gcc",
"gcc-c++",
"just",
"nodejs",
"openssl",
"openssl-devel",
"tmux",
"tree-sitter-cli",
]
[dev.variables.cargo.packages]
dev = [
"cocogitto"
]
[zsh.variables.packages]
zsh = [
"zsh"
]
[rust.variables.cargo.packages]
rust = [
"yazi-fm",
"yazi-cli",
]

View file

@ -1,3 +0,0 @@
#!/usr/bin/env bash
sha256sum .dotter/cache/.dotter/pre_deploy.sh >.dotter/cache/pre_deploy.checksum

View file

@ -1,100 +0,0 @@
#!/usr/bin/env bash
# shellcheck disable=all
# This is a handlerbars template, so ignore issues
set -euo pipefail
checksum_file=".dotter/cache/pre_deploy.checksum"
if [[ -e "$checksum_file" ]] && sha256sum --check "$checksum_file" >/dev/null 2>&1; then
echo "Pre deploy script has not changed, skiping script execution"
echo "To override this, remove the checksum file: $checksum_file"
exit 0
fi
{{!~ Detect the distribution ~}}
{{~ assign "distro" (trim (command_output "awk -F= '/^ID=/ {print $2}' /etc/os-release | tr -d '\"'")) ~}}
{{ header "Running pre deploy script for distro" (to_title_case distro) }}
{{ #if (is_executable "sudo") }}
{{ header "Configuring sudo" }}
SUDOERS_FILE="/etc/sudoers.d/01-user"
if [[ -e "${SUDOERS_FILE}" ]]; then
echo "Sudo configuration already exists, to override it remove the file: ${SUDOERS_FILE}"
exit 0
else
sudo -B tee "${SUDOERS_FILE}" <<EOF
Defaults pwfeedback
Defaults timestamp_timeout=10
Defaults timestamp_type=global
EOF
sudo chmod 0440 "${SUDOERS_FILE}"
fi
{{ /if }}
{{#if (eq distro "fedora") ~}}
{{! extract the copr repositories variable }}
{{~ assign "copr" (flatten_table copr) ~}}
{{#if (ne (len copr) 0) ~}}
{{ header "Enabling copr repositories" }}
{{# each copr }}
sudo -B dnf copr enable -y '{{ this }}'
{{ /each }}
{{~ /if }}
{{ header "Installing dnf packages" }}
sudo -B dnf install -y {{~# each (flatten_table packages) }} '{{ this }}' {{~ /each }}
{{~ /if }}
{{ #if dotter.packages.zsh }}
[ "$SHELL" != "$(which zsh)" ] && chsh -s "$(which zsh)"
{{ /if }}
{{#if (and dotter.packages.rust (not (is_executable "cargo"))) }}
{{ header "Installing rust" }}
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path --default-toolchain stable
{{ /if }}
{{#if (and dotter.packages.rust (ne (len cargo.packages) 0)) }}
{{ header "Installing crates" }}
cargo install --locked {{# each (flatten_table cargo.packages) }} "{{ this }}" {{ /each }}
{{ /if }}
{{ #if dotter.packages.cli }}
{{ header "Configuring Nerd Fonts" }}
FONT_DIR="$HOME/.local/share/fonts"
mkdir -p "$FONT_DIR"
tmp_dir=$(mktemp -d)
curl -L https://github.com/ryanoasis/nerd-fonts/releases/latest/download/{{ nerd_font }}.zip -o "$tmp_dir/{{ nerd_font}}.zip"
unzip -o "$tmp_dir/{{nerd_font}}.zip" -d ${FONT_DIR}/{{ nerd_font }}
curl -L https://github.com/joshmedeski/sesh/releases/latest/download/sesh_Linux_x86_64.tar.gz -o "$tmp_dir/sesh.tar.gz"
mkdir -p "$HOME/.local/bin"
tar xvf "$tmp_dir/sesh.tar.gz" --directory="$HOME/.local/bin" sesh
rm -rf "$tmp_dir"
{{ /if }}
{{ header "Done :3" }}

View file

@ -1,9 +0,0 @@
includes = [".dotter/machines/fedora.toml"]
packages = ["cli", "dev"]
[files]
[variables]
nvim-core = true
nvim-base = true
nvim-ide = true

View file

@ -1,9 +0,0 @@
includes = [".dotter/machines/fedora.toml"]
packages = ["cli", "dev", "mise"]
[files]
[variables]
nvim-core = true
nvim-base = true
nvim-ide = true

3
.gitignore vendored
View file

@ -16,6 +16,3 @@ config/ncspot/userstate.cbor
config/zsh/zprofile.local
config/spicetify/CustomApps/*
chezmoi/dot_config/zsh/aliases/work.zsh
.dotter/cache.toml
.dotter/cache
.dotter/local.toml

1
.php-cs-fixer.cache Normal file
View file

@ -0,0 +1 @@
{"php":"8.1.16","version":"3.14.4","indent":" ","lineEnding":"\n","rules":{"blank_line_after_opening_tag":true,"blank_line_between_import_groups":true,"braces":{"allow_single_line_anonymous_class_with_empty_body":true},"class_definition":{"inline_constructor_arguments":false,"space_before_parenthesis":true},"compact_nullable_typehint":true,"declare_equal_normalize":true,"lowercase_cast":true,"lowercase_static_reference":true,"new_with_braces":true,"no_blank_lines_after_class_opening":true,"no_leading_import_slash":true,"no_whitespace_in_blank_line":true,"ordered_class_elements":{"order":["use_trait"]},"ordered_imports":{"imports_order":["class","function","const"],"sort_algorithm":"none"},"return_type_declaration":true,"short_scalar_cast":true,"single_blank_line_before_namespace":true,"single_import_per_statement":{"group_to_single_imports":false},"single_trait_insert_per_statement":true,"ternary_operator_spaces":true,"visibility_required":true,"blank_line_after_namespace":true,"constant_case":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":{"on_multiline":"ensure_fully_multiline"},"no_break_comment":true,"no_closing_tag":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_spaces_inside_parenthesis":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":{"elements":["property"]},"single_line_after_imports":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"encoding":true,"full_opening_tag":true},"hashes":{"config\/.null-ls_409243_php-cs-fixer-conf.php":"fb71792ed72df5b2976115b4380ef622","config\/.null-ls_800261_php-cs-fixer-conf.php":"1a554594a4eaa31e7bf231c0a93ad00e","config\/.null-ls_450233_php-cs-fixer-conf.php":"1a554594a4eaa31e7bf231c0a93ad00e","config\/.null-ls_536351_php-cs-fixer-conf.php":"5bfcd97c4bfff433fa6da9d289fd7ef9","config\/.null-ls_121074_php-cs-fixer-conf.php":"c116993e570fd1fd0d8e5ff29103a452"}}

View file

@ -0,0 +1,10 @@
{{- $osid := .chezmoi.os -}}
{{- if hasKey .chezmoi.osRelease "id" -}}
{{- $osid = printf "%s-%s" .chezmoi.os .chezmoi.osRelease.id -}}
{{- end -}}
[data]
osid = {{ $osid | quote }}
hasGui = {{ promptBoolOnce . "hasGui" "Does this machine needs gui configs/apps?" }}
hasWOL = {{ promptBoolOnce . "hasWOL" "Does this machine WOL?" }}
openAIKey = {{ promptStringOnce . "openAIKey" "Enter Open AI key for chatGPT integration (or leave blank)" | quote }}

View file

@ -0,0 +1,41 @@
packages:
cargo:
- du-dust
- mise
- rbw
# - yazi-fm
# - yazi-cli
dnf:
copr:
- atim/lazygit
- atim/starship
- the4runner/firefox-dev
packages:
- bat
- dnf-plugin-system-upgrade
- duf
- eza
- fd-find
- firefox-dev
- flatpak
- fzf
- gcc
- gcc-c++
- git
- gitlint
- gnome-software
- lazygit
- neovim
- nodejs
- openssl
- openssl-devel
- papirus-icon-theme
- remove-retired-packages
- ripgrep
- sd
- starship
- tealdeer
- tmux
- tree-sitter-cli
- zoxide
- zsh

View file

@ -0,0 +1,32 @@
[".local/share/zinit"]
type = "git-repo"
url = "https://github.com/zdharma-continuum/zinit.git"
refreshPeriod = "168h"
[".config/alacritty/themes/catppuccin/catppuccin-macchiato.toml"]
type = "file"
url = "https://raw.githubusercontent.com/catppuccin/alacritty/main/catppuccin-macchiato.toml"
refreshPeriod = "168h"
[".config/bat/themes/Catppuccin-macchiato.tmTheme"]
# Run "bat cache --build" to make the theme available
type = "file"
url = "https://github.com/catppuccin/bat/raw/main/themes/Catppuccin%20Macchiato.tmTheme"
refreshPeriod = "168h"
["Repos/Source/xdg-ninja"]
type = "git-repo"
url = "https://github.com/b3nj5m1n/xdg-ninja.git"
refreshPeriod = "168h"
[".local/bin/sesh"]
type = "archive-file"
url = "https://github.com/joshmedeski/sesh/releases/latest/download/sesh_Linux_x86_64.tar.gz"
path = "sesh"
refreshPeriod = "168h"
[".local/bin/zk"]
type = "archive-file"
url = "https://github.com/zk-org/zk/releases/latest/download/zk-v0.14.1-linux-amd64.tar.gz"
path = "zk"
refreshPeriod = "168h"

5
chezmoi/.chezmoiignore Normal file
View file

@ -0,0 +1,5 @@
**/original_*
.config/lazygit/state.yml
config/tmux/plugins/*
!config/tmux/plugins/.gitkeep

View file

@ -0,0 +1,23 @@
{{- if eq .hasWOL true -}}
#!/usr/bin/env bash
set -e
# run as sudo so it ask for the password here and not inside FZF
sudo echo -e "\nSetting up wol...\n"
interface="$(
nmcli --fields name --terse con show |
fzf \
--height 10 \
--header 'Select network interface' \
--preview 'nmcli c show {} | grep 802-3-ethernet.wake-on-lan'
)"
if [[ -z "$interface" ]]; then
echo "no interface selected"
exit
fi
nmcli c modify "$interface" 802-3-ethernet.wake-on-lan magic
nmcli c modify "$interface" 802-3-ethernet.auto-negotiate yes
{{ end }}

View file

@ -0,0 +1,19 @@
{{- if eq .hasGui true -}}
#!/usr/bin/env bash
# ╭──────────────────────────────────────────────────────────╮
# │ Setup Catppuccin GTK theme │
# ╰──────────────────────────────────────────────────────────╯
set -e
tmp_dir="$(mktemp -d)"
cd "$tmp_dir"
curl -LsS "https://raw.githubusercontent.com/catppuccin/gtk/main/install.py" -o install.py
python3 install.py macchiato teal
rm -rf "$tmp_dir"
{{ end }}

View file

@ -0,0 +1,46 @@
#!/usr/bin/env bash
set -e
NO_FORMAT="\033[0m"
C_DODGERBLUE1="\033[38;5;33m"
echo -e "${C_DODGERBLUE1}Installing packages...${NO_FORMAT}"
{{- if eq .osid "darwin" }}
# macOS-specific code
{{- else if eq .osid "linux-debian" }}
# Debian-specific code
{{- else if eq .osid "linux-fedora" }}
# ╭──────────────────────────────────────────────────────────╮
# │ Add COPR repos │
# ╰──────────────────────────────────────────────────────────╯
sudo dnf install -yq 'dnf-command(copr)'
{{ range .packages.dnf.copr -}}
sudo dnf copr enable -y {{ . | quote }} &> /dev/null
{{ end -}}
# ╭──────────────────────────────────────────────────────────╮
# │ Install DNF packages │
# ╰──────────────────────────────────────────────────────────╯
sudo dnf install -y {{ range .packages.dnf.packages }} {{ . | quote }} {{- end -}}
{{ end }}
# ╭──────────────────────────────────────────────────────────╮
# │ Install Rust │
# ╰──────────────────────────────────────────────────────────╯
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path --default-toolchain stable
rustup update
# ╭──────────────────────────────────────────────────────────╮
# │ Install Cargo Packages │
# ╰──────────────────────────────────────────────────────────╯
cargo install {{ range .packages.cargo }} {{ . | quote }} {{- end -}}

View file

Before

Width:  |  Height:  |  Size: 313 KiB

After

Width:  |  Height:  |  Size: 313 KiB

Before After
Before After

View file

@ -8,9 +8,3 @@
[includeIf "gitdir:~/Repos/Work/"]
path = ~/.config/git/config-work
[merge]
autoStash = true
edit = no
ff = no
[rebase]
autoStash = true

View file

@ -0,0 +1,39 @@
#!/usr/bin/sh
if [ "x$XDG_SESSION_TYPE" = "xwayland" ] &&
[ "x$XDG_SESSION_CLASS" != "xgreeter" ] &&
[ -n "$SHELL" ] &&
grep -q "$SHELL" /etc/shells &&
! (echo "$SHELL" | grep -q "false") &&
! (echo "$SHELL" | grep -q "nologin"); then
if [ "$1" != '-l' ]; then
exec bash -c "exec -l '$SHELL' -c '$0 -l $*'"
else
shift
fi
fi
SETTING=$(G_MESSAGES_DEBUG='' gsettings get org.gnome.system.locale region)
REGION=${SETTING#\'}
REGION=${REGION%\'}
if [ -n "$REGION" ]; then
unset LC_TIME LC_NUMERIC LC_MONETARY LC_MEASUREMENT LC_PAPER
if [ "$LANG" != "$REGION" ]; then
# LC_CTYPE
export LC_NUMERIC=$REGION
export LC_TIME=$REGION
# LC_COLLATE
export LC_MONETARY=$REGION
# LC_MESSAGES
export LC_PAPER=$REGION
# LC_NAME
export LC_ADDRESS=$REGION
export LC_TELEPHONE=$REGION
export LC_MEASUREMENT=$REGION
# LC_IDENTIFICATION
fi
fi
exec Hyprland

View file

@ -0,0 +1,158 @@
#
# Please note not all available settings / options are set here.
# For a full list, see the wiki
#
# See https://wiki.hyprland.org/Configuring/Monitors/
monitor=,highrr,auto,1
# Execute your favorite apps at launch
exec-once = waybar & hyprpaper
# Source a file (multi-file configs)
# source = ~/.config/hypr/myColors.conf
# Some default env vars.
env = XCURSOR_SIZE,24
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
input {
kb_layout = latam
kb_variant =
kb_model =
kb_options = caps:escape
kb_rules =
follow_mouse = 1
touchpad {
natural_scroll = true
}
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
}
general {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
gaps_in = 5
gaps_out = 10
border_size = 2
col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
col.inactive_border = rgba(595959aa)
layout = dwindle
}
decoration {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
rounding = 10
drop_shadow = true
shadow_range = 4
shadow_render_power = 3
col.shadow = rgba(1a1a1aee)
blur {
enabled = true
size = 3
passes = 1
new_optimizations = true
}
}
animations {
enabled = true
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
animation = windows, 1, 7, myBezier
animation = windowsOut, 1, 7, default, popin 80%
animation = border, 1, 10, default
animation = borderangle, 1, 8, default
animation = fade, 1, 7, default
animation = workspaces, 1, 6, default
}
dwindle {
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
pseudotile = true # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
preserve_split = true # you probably want this
}
master {
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
new_is_master = true
}
gestures {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
workspace_swipe = true
workspace_swipe_invert = false
}
# Example per-device config
# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more
device:epic-mouse-v1 {
sensitivity = -0.5
}
# Example windowrule v1
# windowrule = float, ^(kitty)$
# Example windowrule v2
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
$mainMod = SUPER
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = $mainMod, Q, exec, alacritty
bind = $mainMod, C, killactive,
bind = $mainMod, M, exit,
bind = $mainMod, E, exec, dolphin
bind = $mainMod, V, togglefloating,
bind = $mainMod, D, exec, wofi --show drun
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, J, togglesplit, # dwindle
# Move focus with mainMod + arrow keys
bind = $mainMod, h, movefocus, l
bind = $mainMod, j, movefocus, d
bind = $mainMod, k, movefocus, u
bind = $mainMod, l, movefocus, r
# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4
bind = $mainMod, 5, workspace, 5
bind = $mainMod, 6, workspace, 6
bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9
bind = $mainMod, 0, workspace, 10
# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3
bind = $mainMod SHIFT, 4, movetoworkspace, 4
bind = $mainMod SHIFT, 5, movetoworkspace, 5
bind = $mainMod SHIFT, 6, movetoworkspace, 6
bind = $mainMod SHIFT, 7, movetoworkspace, 7
bind = $mainMod SHIFT, 8, movetoworkspace, 8
bind = $mainMod SHIFT, 9, movetoworkspace, 9
bind = $mainMod SHIFT, 0, movetoworkspace, 10
# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1
# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow

View file

@ -0,0 +1,4 @@
preload = ~/Pictures/wallpaper.jpg
#set the default wallpaper(s) seen on inital workspace(s) --depending on the number of monitors used
wallpaper = ,~/Pictures/wallpaper.jpg

View file

@ -0,0 +1,11 @@
default-timeout=5000
# Colors
background-color=#24273a
text-color=#cad3f5
border-color=#8aadf4
progress-color=over #363a4f
[urgency=high]
border-color=#f5a97f

View file

@ -2,7 +2,7 @@
node = 'lts'
# python = {version='3', virtualenv='.venv'}
python = {version='3'} # setting virtualenv adds a virtualenv in every directory
# php = "8.2"
php = "8.2"
go = "latest"
[settings]

View file

@ -0,0 +1,26 @@
-- Loadnoptions before anything
require("aleidk.options")
-- Init PLugins
-- Install package manager https://github.com/folke/lazy.nvim
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)
-- Load plugins
require("lazy").setup("aleidk.plugins")
-- Rest of configuratin
require("aleidk.keymaps")
require("aleidk.autocmds")

View file

@ -29,7 +29,7 @@ return {
Color = "",
Constant = "",
Constructor = "",
Copilot = " ",
Copilot = " ",
Enum = "",
EnumMember = "",
Event = "",

View file

@ -31,7 +31,7 @@ opt.scrolloff = 15 -- Lines of context
opt.sessionoptions = { "buffers", "curdir", "tabpages", "winsize" }
opt.shiftround = true -- Round indent
opt.shiftwidth = 2 -- Size of an indent
-- opt.shortmess:append({ W = true, I = true, c = true }) -- INFO: this control the format of some messages
opt.shortmess:append({ W = true, I = true, c = true })
opt.showmode = false -- Dont show mode since we have a statusline
opt.sidescrolloff = 8 -- Columns of context
opt.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift the text each time
@ -52,62 +52,6 @@ opt.wrap = false -- Disable line wrap
vim.o.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions"
local fn = vim.fn
-- Quickfix customization
function _G.qftf(info)
local items
local ret = {}
-- The name of item in list is based on the directory of quickfix window.
-- Change the directory for quickfix window make the name of item shorter.
-- It's a good opportunity to change current directory in quickfixtextfunc :)
--
-- local alterBufnr = fn.bufname('#') -- alternative buffer is the buffer before enter qf window
-- local root = getRootByAlterBufnr(alterBufnr)
-- vim.cmd(('noa lcd %s'):format(fn.fnameescape(root)))
--
if info.quickfix == 1 then
items = fn.getqflist({ id = info.id, items = 0 }).items
else
items = fn.getloclist(info.winid, { id = info.id, items = 0 }).items
end
local limit = 31
local fnameFmt1, fnameFmt2 = "%-" .. limit .. "s", "…%." .. (limit - 1) .. "s"
local validFmt = "%s │%5d:%-3d│%s %s"
for i = info.start_idx, info.end_idx do
local e = items[i]
local fname = ""
local str
if e.valid == 1 then
if e.bufnr > 0 then
fname = fn.bufname(e.bufnr)
if fname == "" then
fname = "[No Name]"
else
fname = fname:gsub("^" .. vim.env.HOME, "~")
end
-- char in fname may occur more than 1 width, ignore this issue in order to keep performance
if #fname <= limit then
fname = fnameFmt1:format(fname)
else
fname = fnameFmt2:format(fname:sub(1 - limit))
end
end
local lnum = e.lnum > 99999 and -1 or e.lnum
local col = e.col > 999 and -1 or e.col
local qtype = e.type == "" and "" or " " .. e.type:sub(1, 1):upper()
str = validFmt:format(fname, lnum, col, qtype, e.text)
else
str = e.text
end
table.insert(ret, str)
end
return ret
end
-- TODO: how to customize?
vim.o.qftf = "{info -> v:lua._G.qftf(info)}"
vim.filetype.add({
-- Detect and assign filetype based on the extension of the filename
extension = {

View file

@ -0,0 +1,78 @@
return {
"olimorris/codecompanion.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-treesitter/nvim-treesitter",
{
"zbirenbaum/copilot.lua",
cmd = "Copilot",
event = "InsertEnter",
config = function()
require("copilot").setup({
suggestion = { enabled = false },
panel = { enabled = true, auto_refresh = true },
})
end,
},
"hrsh7th/nvim-cmp", -- Optional: For using slash commands and variables in the chat buffer
"nvim-telescope/telescope.nvim", -- Optional: For using slash commands
{ "stevearc/dressing.nvim", opts = {} }, -- Optional: Improves `vim.ui.select`
},
opts = {
strategies = {
chat = {
adapter = "copilot",
},
inline = {
adapter = "copilot",
},
agent = { adapter = "copilot" },
},
display = {
action_palette = {
prompt = ""
}
}
},
keys = {
{
"<leader>at",
function()
require("codecompanion").toggle()
end,
desc = "Toggle AI chat",
mode = { "n", "v" }
},
{
"<leader>aa",
"<CMD>CodeCompanion<CR>",
desc = "Run an inline prompt",
mode = { "n", "v" }
},
{
"<leader>aA",
function()
require("codecompanion").actions()
end,
desc = "Open AI actions",
mode = { "n", "v" }
},
{
"<leader>av",
function()
require("codecompanion").add()
end,
desc = "Add visual selection to chat",
mode = "v"
},
{
"<leader>ae",
function()
require("codecompanion").prompt("explain")
end,
desc = "Explain code",
mode = "v"
},
}
}

View file

@ -1,6 +1,5 @@
return {
"windwp/nvim-autopairs",
event = "InsertEnter",
config = true,
opts = {}, -- this is equalent to setup({}) function
}

View file

@ -15,33 +15,6 @@ return {
},
lazy = false,
cmd = "Grapple",
config = function()
local telescope = require("telescope")
telescope.load_extension("grapple")
-- Open graple window when open without arguments
local g = vim.api.nvim_create_augroup('Grapple-User', { clear = true })
vim.api.nvim_create_autocmd('StdinReadPre', {
group = g,
callback = function()
vim.g.read_from_stdin = 1
end,
})
vim.api.nvim_create_autocmd('UIEnter', {
group = g,
callback = function()
if
vim.fn.argc() == 0
and vim.api.nvim_buf_get_name(0) == ''
and vim.g.read_from_stdin == nil
then
telescope.extensions.grapple.tags()
end
end,
})
end,
keys = {
{ "<leader><leader>a", "<cmd>Grapple toggle<cr>", desc = "Toggle bookmark for current file" },
{ "<leader><leader>D", "<cmd>Grapple reset<cr>", desc = "Delete all bookmarks" },

View file

@ -1,21 +1,22 @@
return { -- Change colors.none if not using a transparent background
"catppuccin/nvim",
name = "catppuccin",
priority = 1000,
lazy = false,
opts = {
flavour = "macchiato",
transparent_background = true,
integrations = {
aerial = true,
blink_cmp = true,
cmp = true,
notify = true,
harpoon = false,
indent_blankline = { enabled = true, scope_color = "text", },
lsp_trouble = true,
mason = true,
neogit = true,
noice = true,
notify = true,
hop = true,
lsp_trouble = true,
indent_blankline = {
enabled = true,
},
},
custom_highlights = function(colors)
return {
@ -33,6 +34,6 @@ return { -- Change colors.none if not using a transparent background
config = function(_, opts)
require("catppuccin").setup(opts)
vim.cmd.colorscheme("catppuccin-macchiato")
vim.cmd.colorscheme("catppuccin")
end,
}

View file

@ -0,0 +1,49 @@
return {
{
"echasnovski/mini.comment",
version = "*",
event = "VeryLazy",
dependencies = {
{ "nvim-treesitter/nvim-treesitter-context" },
},
opts = {
options = {
custom_commentstring = function()
return require("ts_context_commentstring.internal").calculate_commentstring()
or vim.bo.commentstring
end,
},
},
},
{
"LudoPinelli/comment-box.nvim",
event = "VeryLazy",
config = function()
require("comment-box").setup({
outer_blank_lines = true,
})
local cb = require("comment-box")
-- left aligned fixed size box with left aligned text
MAP({ "n", "v" }, "gcb", cb.lcbox, "Create a comment box")
-- centered adapted box with centered text
MAP({ "n", "v" }, "gcl", cb.llline, "Create a comment line")
end,
},
{
"danymat/neogen",
opts = { snippet_engine = "luasnip" },
dependencies = { "nvim-treesitter/nvim-treesitter" },
version = "*", -- stable releases
keys = {
{
"gcd",
function()
require("neogen").generate()
end,
desc = "Generate comment docstring",
},
},
},
}

View file

@ -0,0 +1,120 @@
---@diagnostic disable: missing-fields
return {
"hrsh7th/nvim-cmp",
version = false, -- last release is way too old
event = "InsertEnter",
dependencies = {
"L3MON4D3/LuaSnip",
"davidsierradz/cmp-conventionalcommits",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-cmdline",
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-path",
"petertriho/cmp-git",
"saadparwaiz1/cmp_luasnip",
"windwp/nvim-autopairs",
{
"zbirenbaum/copilot-cmp",
config = function()
require("copilot_cmp").setup()
end
},
},
config = function()
vim.api.nvim_set_hl(0, "CmpGhostText", { link = "Comment", default = true })
local cmp = require("cmp")
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())
local defaults = require("cmp.config.default")()
local window_opts = {
border = "rounded",
side_padding = 1,
-- fix colors for catppuccin colorscheme
winhighlight = "Normal:Pmenu,FloatBorder:FloatBorder,CursorLine:PmenuSel,Search:None",
}
local opts = {
visible_docs = false,
completion = {
completeopt = "menu,menuone,noinsert",
},
snippet = {
expand = function(args)
require("luasnip").lsp_expand(args.body)
end,
},
mapping = cmp.mapping.preset.insert({
["<C-n>"] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }),
["<C-p>"] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }),
["<C-j>"] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }),
["<C-k>"] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }),
["<C-u>"] = cmp.mapping.scroll_docs(-4),
["<C-d>"] = cmp.mapping.scroll_docs(4),
["<C-o>"] = function()
if cmp.visible_docs() then
cmp.close_docs()
else
cmp.open_docs()
end
end,
["<C-Space>"] = cmp.mapping.complete(),
["<C-e>"] = cmp.mapping.abort(),
["<BR>"] = cmp.mapping.abort(),
["<C-CR>"] = cmp.mapping.confirm({ select = false }), -- Confirm only if selected an item
["<CR>"] = cmp.mapping.confirm({
-- Auto confirms first item
behavior = cmp.ConfirmBehavior.Replace,
select = true,
}),
}),
sources = cmp.config.sources({
{ name = "conventionalcommits" },
{ name = "copilot" },
{ name = "nvim_lsp" },
{ name = "luasnip" },
{ name = "buffer" },
{ name = "path" },
}),
formatting = {
fields = { "kind", "abbr", "menu" },
format = function(_, item)
local icons = require("aleidk.constants").icons.kinds
if icons[item.kind] then
item.kind = icons[item.kind] .. item.kind
end
return item
end,
},
window = {
completion = cmp.config.window.bordered(window_opts),
documentation = cmp.config.window.bordered(window_opts),
},
experimental = {
ghost_text = {
hl_group = "CmpGhostText",
},
},
sorting = {
priority_weight = 2,
comparators = {
require("copilot_cmp.comparators").prioritize,
-- Below is the default comparitor list and order for nvim-cmp
cmp.config.compare.offset,
-- cmp.config.compare.scopes, --this is commented in nvim-cmp too
cmp.config.compare.exact,
cmp.config.compare.score,
cmp.config.compare.recently_used,
cmp.config.compare.locality,
cmp.config.compare.kind,
cmp.config.compare.sort_text,
cmp.config.compare.length,
cmp.config.compare.order,
},
},
}
cmp.setup(opts)
end,
}

View file

@ -0,0 +1,35 @@
return {
"goolord/alpha-nvim",
lazy = false,
opts = function()
local dashboard = require("alpha.themes.dashboard")
dashboard.section.header.val = {
" ████ ███ █████ █████ ",
" ░░███ ░░░ ░░███ ░░███ ",
" ██████ ░███ ██████ ████ ███████ ░███ █████",
" ░░░░░███ ░███ ███░░███░░███ ███░░███ ░███░░███ ",
" ███████ ░███ ░███████ ░███ ░███ ░███ ░██████░ ",
" ███░░███ ░███ ░███░░░ ░███ ░███ ░███ ░███░░███ ",
"░░████████ █████░░██████ █████░░████████ ████ █████",
" ░░░░░░░░ ░░░░░ ░░░░░░ ░░░░░ ░░░░░░░░ ░░░░ ░░░░░ ",
}
dashboard.section.header.opts.hl = "DashboardHeader"
dashboard.section.buttons.val = {
dashboard.button("LDR f f", " Find File ", "<leader>ff"),
dashboard.button("LDR LDR t", " Bookmars", "<leader><leader>t"),
dashboard.button("LDR g g", " Git ", "<leader>gg"),
}
dashboard.section.footer.val =
{ " ", " ", " ", "Nvim loaded " .. require("lazy").stats().count .. " plugins " }
dashboard.section.footer.opts.hl = "DashboardFooter"
dashboard.config.layout[1].val = vim.fn.max({ 2, vim.fn.floor(vim.fn.winheight(0) * 0.2) })
dashboard.config.layout[3].val = 5
dashboard.config.opts.noautocmd = true
return dashboard.opts
end,
}

View file

@ -1,7 +1,7 @@
return {
"kristijanhusak/vim-dadbod-ui",
dependencies = {
{ "tpope/vim-dadbod", lazy = true },
{ "tpope/vim-dadbod", lazy = true },
{ "kristijanhusak/vim-dadbod-completion", ft = { "sql", "mysql", "plsql" }, lazy = true },
},
cmd = {

View file

@ -0,0 +1,7 @@
return {
"andrewferrier/debugprint.nvim",
opts = {},
-- Remove the following line to use development versions,
-- not just the formal releases
version = "*",
}

View file

@ -0,0 +1,10 @@
return {
-- better imputs
"stevearc/dressing.nvim",
opts = {
input = {
-- handle by noice
enabled = false,
},
},
}

View file

@ -0,0 +1,100 @@
return {
{
"nvim-tree/nvim-tree.lua",
enabled = false,
version = "*",
dependencies = {
"nvim-tree/nvim-web-devicons",
},
keys = {
{ "<Leader>e", "<CMD>NvimTreeToggle<CR>", desc = "Open file explorer" },
},
cmd = { "NvimTreeToggle", "Tree" },
config = function()
local tree = require("nvim-tree")
local api = require("nvim-tree.api")
tree.setup({
hijack_unnamed_buffer_when_opening = true,
disable_netrw = false,
hijack_netrw = false, -- handle by telescope browser
hijack_cursor = true, -- cursor at the start of filename
sync_root_with_cwd = true,
respect_buf_cwd = true,
update_focused_file = {
enable = true, -- focus curren file
update_root = true,
},
actions = { open_file = { quit_on_open = true } },
renderer = {
full_name = true, -- show remaining name in floating text
group_empty = true, -- group empty folders
add_trailing = true, -- Trailing slash to folders
highlight_opened_files = "all",
highlight_git = true,
},
view = {
centralize_selection = true, -- center current file on enter
width = 30, -- N° of columns or %
},
on_attach = function(bufnr)
local function opts(desc)
return {
desc = "nvim-tree: " .. desc,
buffer = bufnr,
noremap = true,
silent = true,
nowait = true,
}
end
-- Check defaults here: https://github.com/nvim-tree/nvim-tree.lua/wiki/Migrating-To-on_attach
api.config.mappings.default_on_attach(bufnr)
vim.keymap.set("n", "l", api.node.open.edit, opts("Open"))
vim.keymap.set("n", "o", api.node.open.edit, opts("Open"))
vim.keymap.set("n", "<CR>", api.node.open.edit, opts("Open"))
vim.keymap.set("n", "<2-LeftMouse>", api.node.open.edit, opts("Open"))
vim.keymap.set("n", "s", api.node.open.vertical, opts("Open in vsplit"))
vim.keymap.set("n", "v", api.node.open.horizontal, opts("Open in hsplit"))
vim.keymap.set("n", "t", api.node.open.tab, opts("Open in tab"))
vim.keymap.set("n", "h", api.node.navigate.parent_close, opts("Close dir"))
vim.keymap.set("n", "<BS>", api.node.navigate.parent_close, opts("Close dir"))
vim.keymap.set("n", "i", api.tree.toggle_hidden_filter, opts("Toggle Dotfiles"))
vim.keymap.set("n", "I", api.tree.toggle_gitignore_filter, opts("Toggle Git Ignore"))
end,
})
-- Auto open when a dir is opened
local function open_nvim_tree(data)
-- buffer is a directory
local directory = vim.fn.isdirectory(data.file) == 1
if not directory then
return
end
-- create a new, empty buffer
vim.cmd.enew()
-- wipe the directory buffer
vim.cmd.bw(data.buf)
-- change to the directory
vim.cmd.cd(data.file)
-- open the tree
require("nvim-tree.api").tree.open()
end
vim.api.nvim_create_autocmd({ "VimEnter" }, { callback = open_nvim_tree })
vim.api.nvim_create_user_command("Tree", "NvimTreeToggle", {})
-- bindings
-- disabled to discourage the use of this plugin without disabling it
-- vim.keymap.set("n", "<leader>e", ":NvimTreeToggle<CR>", { desc = "Toggle file tree", silent = true })
-- vim.keymap.set("n", "<C-e>", ":NvimTreeToggle<CR>", { desc = "Toggle file tree", silent = true })
end,
},
}

View file

@ -0,0 +1,66 @@
return {
"rolv-apneseth/tfm.nvim",
lazy = false,
opts = {
-- TFM to use
-- Possible choices: "ranger" | "nnn" | "lf" | "vifm" | "yazi" (default)
file_manager = "yazi",
-- Replace netrw entirely
-- Default: false
replace_netrw = true,
-- Enable creation of commands
-- Default: false
-- Commands:
-- Tfm: selected file(s) will be opened in the current window
-- TfmSplit: selected file(s) will be opened in a horizontal split
-- TfmVsplit: selected file(s) will be opened in a vertical split
-- TfmTabedit: selected file(s) will be opened in a new tab page
enable_cmds = true,
-- Custom keybindings only applied within the TFM buffer
-- Default: {}
keybindings = {
["<ESC>"] = "q",
},
-- Customise UI. The below options are the default
ui = {
border = "rounded",
height = 1,
width = 1,
x = 0.5,
y = 0.5,
},
},
keys = {
{
"<leader>e",
function()
require("tfm").open()
end,
desc = "TFM",
},
{
"<leader>mh",
function()
local tfm = require("tfm")
tfm.open(nil, tfm.OPEN_MODE.split)
end,
desc = "TFM - horizontal split",
},
{
"<leader>mv",
function()
local tfm = require("tfm")
tfm.open(nil, tfm.OPEN_MODE.vsplit)
end,
desc = "TFM - vertical split",
},
{
"<leader>mt",
function()
local tfm = require("tfm")
tfm.open(nil, tfm.OPEN_MODE.tabedit)
end,
desc = "TFM - new tab",
},
},
}

View file

@ -1,7 +1,6 @@
return {
"stevearc/conform.nvim",
event = { "BufWritePre" },
cmd = { "ConformInfo" },
event = "VeryLazy",
opts = {
-- log_level = vim.log.levels.DEBUG,
@ -14,13 +13,13 @@ return {
-- have other formatters configured.
["_"] = { "trim_whitespace" },
blade = { "blade-formatter" },
css = { "biome" },
css = { "prettierd", "prettier" },
go = { "gofumpt", "goimports_reviser", "golines" },
html = { "djlint", "prettierd", stop_after_first = true },
javascript = { "biome" },
javascriptreact = { "biome" },
json = { "biome" },
jsonc = { "biome" },
javascript = { "prettierd", "prettier", stop_after_first = true },
javascriptreact = { "prettierd", "prettier", stop_after_first = true },
json = { "prettierd", "prettier", stop_after_first = true },
jsonc = { "prettierd", "prettier", stop_after_first = true },
lua = { "stylua" },
markdown = { "markdownlint" },
nim = { "nimpretty" },
@ -28,8 +27,8 @@ return {
python = { "ruff_format", "ruff_organize_imports" },
scss = { "prettierd", "prettier", stop_after_first = true },
sh = { "shfmt" },
typescript = { "biome" },
typescriptreact = { "biome" },
typescript = { "prettierd", "prettier", stop_after_first = true },
typescriptreact = { "prettierd", "prettier", stop_after_first = true },
xml = { "lemminx" },
zsh = { "shfmt" }
},

View file

@ -0,0 +1,114 @@
return {
{
"lewis6991/gitsigns.nvim",
event = { "BufReadPre", "BufNewFile" },
opts = {
-- See `:help gitsigns.txt`
signs = {
add = { text = "" },
change = { text = "" },
delete = { text = "" },
topdelete = { text = "" },
changedelete = { text = "" },
untracked = { text = "" },
},
on_attach = function(buffer)
local gs = package.loaded.gitsigns
local function map(mode, l, r, desc)
vim.keymap.set(mode, "<leader>g" .. l, r, { buffer = buffer, desc = desc })
end
-- stylua: ignore start
map("n", "j", gs.next_hunk, "Next Hunk")
map("n", "k", gs.prev_hunk, "Prev Hunk")
map({ "n", "v" }, "s", ":Gitsigns stage_hunk<CR>", "Stage Hunk")
map({ "n", "v" }, "r", ":Gitsigns reset_hunk<CR>", "Reset Hunk")
map("n", "u", gs.undo_stage_hunk, "Undo Stage Hunk")
map("n", "R", gs.reset_buffer, "Reset Buffer")
map("n", "<TAB>", gs.preview_hunk, "Preview Hunk")
map("n", "l", function() gs.blame_line({full = true}) end, "Blame Line")
map("n", "d", gs.diffthis, "Diff This")
end,
},
},
{
"kdheepak/lazygit.nvim",
event = "VeryLazy",
dependencies = {
"nvim-lua/plenary.nvim",
},
keys = {
{ "<leader>gG", ":LazyGit<CR>", desc = "Lazygit" },
},
},
{
"NeogitOrg/neogit",
dependencies = {
"nvim-lua/plenary.nvim", -- required
"nvim-telescope/telescope.nvim", -- optional
"sindrets/diffview.nvim", -- optional
},
config = true,
opts = {
disable_line_numbers = false,
console_timeout = 8000,
graph_style = "unicode",
kind = "tab",
ignored_settings = {
"NeogitPushPopup--force",
"NeogitPullPopup--rebase",
"NeogitCommitPopup--allow-empty",
"NeogitCommitPopup--reuse-message",
"NeogitRevertPopup--no-edit",
},
},
keys = {
{
"<leader>gg",
function()
require("neogit").open()
end,
desc = "Neogit",
},
{
"<leader>gc",
function()
require("neogit").open({ "commit" })
end,
desc = "Commit",
},
{
"<leader>gp",
function()
require("neogit").open({ "pull" })
end,
desc = "Pull",
},
{
"<leader>gP",
function()
require("neogit").open({ "push" })
end,
desc = "Push",
},
},
},
{
"pwntester/octo.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-telescope/telescope.nvim",
"nvim-tree/nvim-web-devicons",
},
opts = { enable_builtin = true },
keys = {
{
"<leader>go",
"<CMD>Octo<CR>",
desc = "Octo.nvim",
},
},
},
}

View file

@ -0,0 +1,38 @@
return {
"jellydn/hurl.nvim",
dependencies = {
"MunifTanjim/nui.nvim",
"nvim-lua/plenary.nvim",
"nvim-treesitter/nvim-treesitter"
},
ft = "hurl",
opts = {
-- Show debugging info
debug = false,
-- Show notification on run
show_notification = false,
-- Show response in popup or split
mode = "popup",
-- Default formatter
formatters = {
json = { 'jq' }, -- Make sure you have install jq in your system, e.g: brew install jq
html = {
'prettierd', -- Make sure you have install prettier in your system, e.g: npm install -g prettier
'--parser',
'html',
},
},
env_file = {
'hurl.env',
'.env',
'.env.local',
},
},
keys = {
-- Run API request
{ "<leader>ph", "<cmd>HurlRunnerAt<CR>", desc = "Run HTTP request" },
{ "<leader>pH", "<cmd>HurlRunner<CR>", desc = "Run all HTTP requests" },
-- Run Hurl request in visual mode
{ "<leader>ph", ":HurlRunner<CR>", desc = "Run HTTP requests", mode = "v" },
},
}

View file

@ -1,7 +1,7 @@
return {
-- Add indentation guides even on blank lines
"lukas-reineke/indent-blankline.nvim",
dependencies = { "nvim-treesitter/nvim-treesitter" },
event = { "BufReadPost", "BufNewFile" },
main = "ibl",
opts = {
-- char = "▏",

View file

@ -0,0 +1,99 @@
return {
-- Detect tabstop and shiftwidth automatically
"tpope/vim-sleuth",
{ "nvim-tree/nvim-web-devicons", lazy = true },
{
"mbbill/undotree",
config = function()
vim.g.undotree_WindowLayout = 2
vim.g.undotree_ShortIndicators = 1
vim.g.undotree_SetFocusWhenToggle = 1
end,
keys = {
{ "<leader>fu", vim.cmd.UndotreeToggle, desc = "Undo tree" },
},
},
{
-- Highlight word under cursor
"RRethy/vim-illuminate",
event = { "BufReadPost", "BufNewFile" },
opts = { delay = 200 },
config = function(_, opts)
require("illuminate").configure(opts)
end,
},
{
-- Color Picker
"uga-rosa/ccc.nvim",
event = "VeryLazy",
opts = {
auto_enable = true,
lsp = true,
},
keys = {
{ "<leader>uc", "<CMD>CccPick<CR>", desc = "Open Color picker" },
{ "<leader>uC", "<CMD>CccHighlighterToggle<CR>", desc = "Toggle Color highlight" },
},
},
-- Dotfiles management
{
"xvzc/chezmoi.nvim",
dependencies = { "nvim-lua/plenary.nvim", "alker0/chezmoi.vim" },
config = function()
require("chezmoi").setup({
{
edit = {
watch = false,
force = false,
},
notification = {
on_open = true,
on_apply = true,
on_watch = false,
},
telescope = {
select = { "<CR>" },
},
},
})
vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, {
-- INFO: this should be the same as $(chezmoi source-path)
pattern = { os.getenv("HOME") .. "/.local/share/chezmoi/chezmoi/*" },
callback = function()
vim.schedule(require("chezmoi.commands.__edit").watch)
end,
})
local telescope = require("telescope")
telescope.load_extension("chezmoi")
vim.keymap.set("n", "<leader>fz", telescope.extensions.chezmoi.find_files, { desc = "Find dotfile" })
end,
},
{
"pmizio/typescript-tools.nvim",
dependencies = { "nvim-lua/plenary.nvim", "neovim/nvim-lspconfig" },
opts = {
init_options = {
preferences = {
disableSuggestions = true,
},
},
settings = {
-- array of strings("fix_all"|"add_missing_imports"|"remove_unused"|
-- "remove_unused_imports"|"organize_imports") -- or string "all"
-- to include all supported code actions
-- specify commands exposed as code_actions
expose_as_code_action = "all",
},
},
},
{
"olexsmir/gopher.nvim",
ft = "go",
build = function()
vim.cmd([[silent! GoInstallDeps]])
end,
},
}

View file

@ -8,10 +8,10 @@ return {
lint.linters.gitlint.args = { "--contrib", "contrib-title-conventional-commits", "--msg-filename", "-" }
lint.linters_by_ft = {
javascript = { "biomejs" },
typescript = { "biomejs" },
javascriptreact = { "biomejs" },
typescriptreact = { "biomejs" },
javascript = { "eslint_d" },
typescript = { "eslint_d" },
javascriptreact = { "eslint_d" },
typescriptreact = { "eslint_d" },
-- astro = { "eslint_d" },
python = { "ruff" },
sh = { "shellcheck" },

View file

@ -0,0 +1,215 @@
return {
-- LSP Configuration & Plugins
"neovim/nvim-lspconfig",
event = { "BufReadPost", "BufNewFile", "BufWritePre" },
dependencies = {
-- Automatically install LSPs to stdpath for neovim
{ "williamboman/mason.nvim" },
"williamboman/mason-lspconfig.nvim",
-- Additional lua configuration, makes nvim stuff amazing!
{ "folke/neodev.nvim", opts = {} },
},
config = function()
-- LSP settings.
local on_attach = function(_, bufnr)
local nmap = function(keys, func, desc)
if desc then
desc = "LSP: " .. desc
end
vim.keymap.set("n", keys, func, { buffer = bufnr, desc = desc })
end
nmap("<leader>lr", vim.lsp.buf.rename, "Rename")
-- stylua: ignore
vim.keymap.set({ "n", "x", "v" }, "<leader>la", vim.lsp.buf.code_action, { buffer = bufnr, desc = "Code Action" })
nmap("<leader>ld", vim.lsp.buf.type_definition, "Go to type definition")
nmap("<leader>lf", function()
vim.lsp.buf.format()
end, "Format")
nmap("gd", vim.lsp.buf.definition, "Go to definition")
nmap("gr", require("telescope.builtin").lsp_references, "Goto References")
nmap("gI", vim.lsp.buf.implementation, "Go to Implementation")
-- See `:help K` for why this keymap
nmap("K", vim.lsp.buf.hover, "Hover Documentation")
-- nmap("<C-k>", vim.lsp.buf.signature_help, "Signature Documentation")
-- Lesser used LSP functionality
nmap("gD", vim.lsp.buf.declaration, "Goto Declaration")
nmap("<leader>lj", vim.diagnostic.goto_next, "Go to next diagnostic")
nmap("<leader>lk", vim.diagnostic.goto_prev, "Go to prev diagnostic")
nmap("<leader>lK", function()
-- execute twice to enter the float inmediatly
vim.diagnostic.open_float()
vim.diagnostic.open_float()
end, "Hover current diagnostic")
-- Create a command `:Format` local to the LSP buffer
vim.api.nvim_buf_create_user_command(bufnr, "Format", function(_)
vim.lsp.buf.format()
end, { desc = "Format current buffer with LSP" })
end
-- Enable the following language servers
-- To see options and cofigurations: https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
local servers = {
astro = {},
bashls = {},
cssls = {},
dockerls = {},
emmet_ls = {
filetypes = {
"astro",
"css",
"eruby",
"html",
"htmldjango",
"javascriptreact",
"less",
"pug",
"sass",
"scss",
"svelte",
"typescriptreact",
"vue",
"htmlangular",
"php",
"blade"
},
},
html = {},
["nil_ls"] = {},
marksman = {},
pyright = {},
phpactor = {},
gopls = {
settings = {
gopls = {
completeUnimported = true,
usePlaceholders = true,
analyses = {
unusedparams = true,
},
},
},
},
ruff = {},
rust_analyzer = {
settings = {
["rust-analyzer"] = {
imports = {
granularity = {
group = "module",
},
prefix = "self",
},
cargo = {
buildScripts = {
enable = true,
},
},
procMacro = {
enable = true,
},
},
},
},
sqlls = {},
yamlls = {},
tsserver = {
init_options = {
preferences = {
disableSuggestions = true,
},
},
},
lua_ls = {
settings = {
Lua = {
runtime = {
-- Tell the language server which version of Lua you're using
-- (most likely LuaJIT in the case of Neovim)
version = "LuaJIT",
},
-- Make the server aware of Neovim runtime files
workspace = {
checkThirdParty = false,
library = {
vim.env.VIMRUNTIME,
-- "${3rd}/luv/library"
-- "${3rd}/busted/library",
},
},
},
},
},
}
-- nvim-cmp supports additional completion capabilities, so broadcast that to servers
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = require("cmp_nvim_lsp").default_capabilities(capabilities)
-- Ensure the servers above are installed
local mason_lspconfig = require("mason-lspconfig")
mason_lspconfig.setup({
ensure_installed = vim.tbl_keys(servers),
automatic_installation = { exclude = { "astro", "phpactor", "gopls", "rust_analyzer", "sqlls" } },
})
mason_lspconfig.setup_handlers({
function(server_name)
local _border = "single"
local default_config = {
capabilities = capabilities,
on_attach = on_attach,
handlers = {
["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, {
border = _border,
}),
["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, {
border = _border,
}),
},
}
require("lspconfig")[server_name].setup(
vim.tbl_deep_extend("force", default_config, servers[server_name] or {})
)
end,
})
vim.diagnostic.config({
update_in_insert = false,
underline = true,
float = {
source = true
},
virtual_text = {
severity = vim.diagnostic.severity.ERROR,
source = true,
spacing = -1,
prefix = nil,
format = function(diagnostic)
-- show small error code instead of whole error that probably won't fit in the screen
-- to see the whole error use other keybindings
return tostring(diagnostic.code)
end,
virt_text_hide = true
},
severity_sort = true,
})
-- Customize gutter icons
local signs = require("aleidk.constants").icons.diagnostics
for type, icon in pairs(signs) do
local hl = "DiagnosticSign" .. type
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
end
end,
}

View file

@ -66,18 +66,6 @@ return {
end
end
local trouble = require("trouble")
local symbols = trouble.statusline({
mode = "lsp_document_symbols",
groups = {},
title = false,
filter = { range = true },
format = "{kind_icon}{symbol.name:Normal}",
-- The following line is needed to fix the background color
-- Set it to the lualine section you want to use
hl_group = "lualine_c_normal",
})
return {
options = {
theme = "catppuccin",
@ -128,11 +116,16 @@ return {
},
{ codecompanion_status },
{
symbols.get,
cond = symbols.has,
"overseer",
},
{
"overseer",
-- Macro recording status
function()
return require("noice").api.status.mode.get()
end,
cond = function()
return package.loaded["noice"] and require("noice").api.status.mode.has()
end,
},
},
lualine_x = {
@ -143,15 +136,6 @@ return {
},
},
lualine_y = {
{
-- Macro recording status
function()
return require("noice").api.status.mode.get()
end,
cond = function()
return package.loaded["noice"] and require("noice").api.status.mode.has()
end,
},
{ "searchcount" },
{ "location" },
{

View file

@ -0,0 +1,44 @@
return {
{
"MeanderingProgrammer/markdown.nvim",
name = "render-markdown", -- Only needed if you have another plugin named markdown.nvim
-- dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.nvim' }, -- if you use the mini.nvim suite
-- dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.icons' }, -- if you use standalone mini plugins
dependencies = { "nvim-treesitter/nvim-treesitter", "nvim-tree/nvim-web-devicons" }, -- if you prefer nvim-web-devicons
opts = {
file_types = { 'markdown', 'codecompanion' },
sign = {
enabled = false,
},
},
},
{
"zk-org/zk-nvim",
config = function()
require("zk").setup({
picker = "select",
})
function MAP(mode, l, r, desc)
vim.keymap.set(mode, l, r, { desc = desc, silent = true })
end
MAP("n", "<CR>", "<Cmd>lua vim.lsp.buf.definition()<CR>", "Open the link under cursor")
MAP("n", "<leader>zn", "<Cmd>ZkNew { dir = vim.fn.expand('%:p:h'), title = vim.fn.input('Title: ') }<CR>",
"Create new note")
MAP("v", "<leader>zN",
":'<,'>ZkNewFromContentSelection { dir = vim.fn.expand('%:p:h'), title = vim.fn.input('Title: ') }<CR>",
"Create new note using selection as content")
MAP("n", "<leader>zl", "<Cmd>ZkInsertLink<CR>", "Insert Link into cursor position")
MAP("v", "<leader>zl", ":'<,'>ZkInsertLinkAtSelection<CR>", "Insert Link into selection")
MAP("n", "<leader>zb", "<Cmd>ZkBacklinks<CR>", "Backlinks")
MAP("n", "<leader>zo", "<Cmd>ZkLinks<CR>", "Outlinks")
MAP("n", "<leader>zf", "<Cmd>ZkNotes<CR>", "Find note")
MAP("n", "<leader>zt", "<Cmd>ZkTags<CR>", "Find tags")
end
}
}

View file

@ -0,0 +1,18 @@
return {
"williamboman/mason.nvim",
cmd = "Mason",
keys = { { "<leader>um", "<cmd>Mason<cr>", desc = "Mason" } },
build = ":MasonUpdate",
opts = {
ensure_installed = {
"blue",
"ruff",
"eslint_d",
"markdownlint",
"nimlsp",
"prettierd",
"shellcheck",
"stylua",
},
},
}

Some files were not shown because too many files have changed in this diff Show more