initial commit
This commit is contained in:
BIN
homemanager/backgrounds/gnome_blobs.png
Normal file
BIN
homemanager/backgrounds/gnome_blobs.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 448 KiB |
BIN
homemanager/backgrounds/nature.jpg
Normal file
BIN
homemanager/backgrounds/nature.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 51 KiB |
BIN
homemanager/backgrounds/qingce.jpg
Normal file
BIN
homemanager/backgrounds/qingce.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 296 KiB |
35
homemanager/default_apps.nix
Normal file
35
homemanager/default_apps.nix
Normal file
@@ -0,0 +1,35 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
defaultBrowser = "zen-beta";
|
||||
in
|
||||
{
|
||||
options = {
|
||||
modules.default_apps.enable = lib.mkEnableOption "default_apps";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.modules.default_apps.enable {
|
||||
xdg.mimeApps.enable = true;
|
||||
xdg.mimeApps.defaultApplications = {
|
||||
"text/html" = "${defaultBrowser}.desktop";
|
||||
"x-scheme-handler/http" = "${defaultBrowser}.desktop";
|
||||
"x-scheme-handler/https" = "${defaultBrowser}.desktop";
|
||||
"x-scheme-handler/about" = "${defaultBrowser}.desktop";
|
||||
"inode/directory" = "org.gnome.Nautilus.desktop";
|
||||
};
|
||||
|
||||
xdg.terminal-exec.enable = true;
|
||||
xdg.terminal-exec.settings = {
|
||||
default = [ "ghostty.desktop" ];
|
||||
};
|
||||
|
||||
home.sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
TERMINAL = "ghostty";
|
||||
TERM = "ghostty";
|
||||
};
|
||||
};
|
||||
}
|
||||
55
homemanager/editorconfig.nix
Normal file
55
homemanager/editorconfig.nix
Normal file
@@ -0,0 +1,55 @@
|
||||
{ lib, config, ... }:
|
||||
{
|
||||
options = {
|
||||
modules.editorconfig.enable = lib.mkEnableOption "enables editorconfig";
|
||||
};
|
||||
config = lib.mkIf config.modules.editorconfig.enable {
|
||||
editorconfig = {
|
||||
enable = true;
|
||||
settings = {
|
||||
"*" = {
|
||||
indent_style = "tab";
|
||||
indent_size = 4;
|
||||
trim_trailing_whitespace = true;
|
||||
insert_final_newline = true;
|
||||
};
|
||||
"*.nix" = {
|
||||
indent_style = "space";
|
||||
indent_size = 2;
|
||||
};
|
||||
"*.py" = {
|
||||
indent_style = "space";
|
||||
indent_size = 4;
|
||||
};
|
||||
"*.r" = {
|
||||
indent_style = "space";
|
||||
indent_size = 2;
|
||||
};
|
||||
"*.R" = {
|
||||
indent_style = "space";
|
||||
indent_size = 2;
|
||||
};
|
||||
"*.yaml" = {
|
||||
indent_style = "space";
|
||||
indent_size = 4;
|
||||
};
|
||||
"*.yml" = {
|
||||
indent_style = "space";
|
||||
indent_size = 4;
|
||||
};
|
||||
"compose.yml" = {
|
||||
indent_style = "space";
|
||||
indent_size = 2;
|
||||
};
|
||||
"compose.yaml" = {
|
||||
indent_style = "space";
|
||||
indent_size = 2;
|
||||
};
|
||||
"*.c" = {
|
||||
indent_style = "space";
|
||||
indent_size = 2;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
40
homemanager/fish.nix
Normal file
40
homemanager/fish.nix
Normal file
@@ -0,0 +1,40 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
createDummyTmuxSessionScript = ./fish/create_dummy_tmux_session.nu;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
modules.fish.enable = lib.mkEnableOption "fish";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.modules.fish.enable {
|
||||
home.packages = [
|
||||
pkgs.lsd
|
||||
];
|
||||
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
shellInit = ''
|
||||
# this creates a dummy tmux session if none exists
|
||||
# it is for loading the continuum restore plugin
|
||||
${lib.getExe pkgs.nushell} ${createDummyTmuxSessionScript}
|
||||
fish_vi_key_bindings
|
||||
set -g fish_color_command brblue
|
||||
set fish_greeting
|
||||
'';
|
||||
shellAliases = {
|
||||
v = "nvim";
|
||||
ls = "lsd";
|
||||
nix-shell = "nix-shell --command 'fish'";
|
||||
nix-dev = "nix develop --command fish";
|
||||
gnome-control-center = "nix-shell -p gnome-control-center --run 'XDG_CURRENT_DESKTOP=GNOME gnome-control-center'";
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
14
homemanager/fish/create_dummy_tmux_session.nu
Normal file
14
homemanager/fish/create_dummy_tmux_session.nu
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env nu
|
||||
|
||||
def main [] {
|
||||
let sessions = tmux ls -F '#{session_name}' | str trim
|
||||
let sessions = $"name \n ($sessions) "
|
||||
let mainSessionExists = $sessions | from ssv | where name == "main" | length | into bool
|
||||
let isInSession = $env.TMUX? != null
|
||||
|
||||
if not $isInSession and not $mainSessionExists {
|
||||
# Start tmux server + dummy session to trigger continuum restore
|
||||
tmux start-server
|
||||
tmux new-session -d -s main
|
||||
}
|
||||
}
|
||||
32
homemanager/hyprland.nix
Normal file
32
homemanager/hyprland.nix
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
defaultBrowser = "zen-beta";
|
||||
in
|
||||
{
|
||||
options = {
|
||||
modules.hyprland.enable = lib.mkEnableOption "hyprland";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.modules.hyprland.enable {
|
||||
home.packages = [
|
||||
pkgs.hyprpicker
|
||||
];
|
||||
|
||||
xdg.configFile = {
|
||||
"hypr/hyprland.conf".source = config.lib.file.mkOutOfStoreSymlink ./hyprland/hyprland.conf;
|
||||
"hypr/hyprpaper.conf".source = config.lib.file.mkOutOfStoreSymlink ./hyprland/hyprpaper.conf;
|
||||
"hypr/hypridle.conf".source = config.lib.file.mkOutOfStoreSymlink ./hyprland/hypridle.conf;
|
||||
"hypr/hyprlock.conf".source = config.lib.file.mkOutOfStoreSymlink ./hyprland/hyprlock.conf;
|
||||
"backgrounds".source = config.lib.file.mkOutOfStoreSymlink ./backgrounds;
|
||||
|
||||
"hypr/nix.conf".text = ''
|
||||
$defaultBrowser=${defaultBrowser}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
3
homemanager/hyprland/hypridle.conf
Normal file
3
homemanager/hyprland/hypridle.conf
Normal file
@@ -0,0 +1,3 @@
|
||||
general {
|
||||
before_sleep_cmd = hyprlock # command ran before sleep
|
||||
}
|
||||
306
homemanager/hyprland/hyprland.conf
Normal file
306
homemanager/hyprland/hyprland.conf
Normal file
@@ -0,0 +1,306 @@
|
||||
# This is an example Hyprland config file.
|
||||
# Refer to the wiki for more information.
|
||||
# https://wiki.hyprland.org/Configuring/Configuring-Hyprland/
|
||||
|
||||
# Please note not all available settings / options are set here.
|
||||
# For a full list, see the wiki
|
||||
|
||||
# You can split this configuration into multiple files
|
||||
# Create your files separately and then link them to this file like this:
|
||||
# source = ~/.config/hypr/myColors.conf
|
||||
|
||||
|
||||
################
|
||||
### MONITORS ###
|
||||
################
|
||||
|
||||
source = ~/.config/hypr/hyprland.hardware.conf
|
||||
source = ~/.config/hypr/nix.conf
|
||||
|
||||
###################
|
||||
### MY PROGRAMS ###
|
||||
###################
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/
|
||||
|
||||
# Set programs that you use
|
||||
$terminal = ghostty
|
||||
$fileManager = nautilus
|
||||
$browser = zen
|
||||
$menu = walker
|
||||
|
||||
#################
|
||||
### AUTOSTART ###
|
||||
#################
|
||||
|
||||
exec-once = nextcloud --background
|
||||
exec-once = exec "$POOLKIT_AGENT"
|
||||
exec-once = hyprpanel & hyprpaper & hypridle & elephant & walker --gapplication-service
|
||||
exec-once = gsettings set org.gnome.desktop.interface cursor-theme 'Bibata-Modern-Classic'
|
||||
exec-once = gsettings set org.gnome.desktop.interface cursor-size 24
|
||||
|
||||
|
||||
exec-once = [workspace 4 silent] signal-desktop
|
||||
exec-once = [workspace 4 silent] spotify
|
||||
exec-once = [workspace 4 silent] thunderbird
|
||||
exec-once = [workspace 3 silent] gnome-calendar
|
||||
exec-once = [workspace 3 silent] bitwarden
|
||||
exec-once = [workspace 2 silent] $browser
|
||||
exec-once = [workspace 1 silent] $terminal
|
||||
# exec-once = [workspace 4 silent] discord
|
||||
# windowrulev2 = workspace 4 silent once, class:^(discord)$
|
||||
|
||||
|
||||
env = HYPRCURSOR_SIZE,28
|
||||
env = HYPRCURSOR_THEME,rose-pine-hyprcursor
|
||||
|
||||
#############################
|
||||
### ENVIRONMENT VARIABLES ###
|
||||
#############################
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Environment-variables/
|
||||
|
||||
env = XCURSOR_SIZE,24
|
||||
env = HYPRCURSOR_SIZE,24
|
||||
|
||||
|
||||
#####################
|
||||
### LOOK AND FEEL ###
|
||||
#####################
|
||||
|
||||
# Refer to https://wiki.hyprland.org/Configuring/Variables/
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#general
|
||||
general {
|
||||
gaps_in = 5
|
||||
gaps_out = 20
|
||||
|
||||
border_size = 2
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors
|
||||
col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
|
||||
col.inactive_border = rgba(595959aa)
|
||||
|
||||
# Set to true enable resizing windows by clicking and dragging on borders and gaps
|
||||
resize_on_border = false
|
||||
|
||||
# Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
|
||||
allow_tearing = false
|
||||
|
||||
layout = dwindle
|
||||
}
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#decoration
|
||||
decoration {
|
||||
rounding = 10
|
||||
|
||||
# Change transparency of focused and unfocused windows
|
||||
active_opacity = 1.0
|
||||
inactive_opacity = 1.0
|
||||
|
||||
shadow {
|
||||
enabled = true
|
||||
range = 4
|
||||
render_power = 3
|
||||
color = rgba(1a1a1aee)
|
||||
}
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#blur
|
||||
blur {
|
||||
enabled = true
|
||||
size = 3
|
||||
passes = 1
|
||||
|
||||
vibrancy = 0.1696
|
||||
}
|
||||
}
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#animations
|
||||
animations {
|
||||
enabled = true
|
||||
|
||||
# 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
|
||||
}
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
|
||||
dwindle {
|
||||
pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
|
||||
preserve_split = true # You probably want this
|
||||
}
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
|
||||
master {
|
||||
new_status = master
|
||||
}
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#misc
|
||||
misc {
|
||||
force_default_wallpaper = -1 # Set to 0 or 1 to disable the anime mascot wallpapers
|
||||
disable_hyprland_logo = false # If true disables the random hyprland logo / anime girl background. :(
|
||||
}
|
||||
|
||||
|
||||
#############
|
||||
### INPUT ###
|
||||
#############
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#input
|
||||
input {
|
||||
kb_layout = us,de
|
||||
kb_variant =
|
||||
kb_model =
|
||||
kb_options =
|
||||
kb_rules =
|
||||
|
||||
follow_mouse = 1
|
||||
|
||||
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
|
||||
|
||||
touchpad {
|
||||
natural_scroll = true
|
||||
tap-to-click = false
|
||||
clickfinger_behavior = true
|
||||
scroll_factor = 0.5
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
gestures {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
# workspace_swipe = true
|
||||
workspace_swipe_touch = true
|
||||
}
|
||||
|
||||
# Example per-device config
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more
|
||||
device {
|
||||
name = epic-mouse-v1
|
||||
sensitivity = -0.5
|
||||
}
|
||||
|
||||
misc {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
force_default_wallpaper = 0 # Set to 0 or 1 to disable the anime mascot wallpapers
|
||||
}
|
||||
|
||||
|
||||
###################
|
||||
### Gestures ######
|
||||
###################
|
||||
|
||||
gesture = 3, horizontal, workspace
|
||||
|
||||
###################
|
||||
### KEYBINDINGS ###
|
||||
###################
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/
|
||||
$mainMod = SUPER # Sets "Windows" key as main modifier
|
||||
|
||||
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
|
||||
bind = $mainMod, T, exec, $terminal
|
||||
bind = $mainMod, B, exec, $browser
|
||||
bind = $mainMod, I, exec, hyprpanel toggleWindow bar-0
|
||||
bind = $mainMod, C, killactive,
|
||||
bind = $mainMod, Q, exit,
|
||||
bind = $mainMod, F, fullscreen, 1
|
||||
bind = $mainMod ALT, F, fullscreen, 0
|
||||
bind = $mainMod, E, exec, $fileManager
|
||||
bind = $mainMod, V, togglefloating,
|
||||
bind = $mainMod, Space, exec, $menu
|
||||
bind = $mainMod, P, pseudo, # dwindle
|
||||
bind = $mainMod SHIFT, D, exec, discord
|
||||
# bind = $mainMod, J, togglesplit, # dwindle
|
||||
bind = SUPER_ALT,L, exec, hyprlock
|
||||
bind = ,F10, exec, hyprlock
|
||||
bind = $mainMod ALT, Space, exec, hyprctl switchxkblayout current next
|
||||
bind = $mainMod SHIFT, S, exec, hyprshot -m region
|
||||
bind = $mainMod SHIFT, C, exec, hyprpicker | wl-copy
|
||||
bind = $mainMod, Y, exec, firefox
|
||||
|
||||
# Move focus with mainMod + vim
|
||||
bind = $mainMod, H, movefocus, l
|
||||
bind = $mainMod, l, movefocus, r
|
||||
bind = $mainMod, K, movefocus, u
|
||||
bind = $mainMod, J, movefocus, d
|
||||
|
||||
# Move window with mod + vim
|
||||
bind = $mainMod SHIFT, H, movewindow, l
|
||||
bind = $mainMod SHIFT, l, movewindow, r
|
||||
bind = $mainMod SHIFT, K, movewindow, u
|
||||
bind = $mainMod SHIFT, J, movewindow, d
|
||||
|
||||
# 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
|
||||
|
||||
# Media Keys
|
||||
binde=, XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+
|
||||
bindl=, XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
|
||||
bindle=, XF86MonBrightnessUp, exec, bri --up
|
||||
bindle=, XF86MonBrightnessDown, exec, bri --down
|
||||
bindle=, XF86Search, exec, launchpad
|
||||
# bindl=, XF86AudioMute, exec, amixer set Master toggle
|
||||
bindl=, XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
|
||||
bindl=, XF86AudioPlay, exec, playerctl play-pause # the stupid key is called play , but it toggles
|
||||
bindl=, XF86AudioNext, exec, playerctl next
|
||||
bindl=, XF86AudioPrev, exec, playerctl previous
|
||||
|
||||
|
||||
##############################
|
||||
### WINDOWS AND WORKSPACES ###
|
||||
##############################
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
|
||||
# See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules
|
||||
|
||||
# Example windowrule v1
|
||||
# windowrule = float, ^(kitty)$
|
||||
|
||||
# Example windowrule v2
|
||||
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
|
||||
|
||||
windowrulev2 = suppressevent maximize, class:.* # You'll probably like this.
|
||||
# windowrulev2 = noanim,class:ulauncher
|
||||
windowrulev2 = noborder,class:ulauncher
|
||||
windowrulev2 = noblur,class:ulauncher
|
||||
windowrulev2 = noshadow,class:ulauncher
|
||||
# layerrule = blur, wofi
|
||||
# layerrule = blur, waybar
|
||||
105
homemanager/hyprland/hyprlaptop.conf
Normal file
105
homemanager/hyprland/hyprlaptop.conf
Normal file
@@ -0,0 +1,105 @@
|
||||
# Example per-device config
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more
|
||||
# device {
|
||||
# name = 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
|
||||
# windowrulev2 = suppressevent maximize, class:.* # You'll probably like this.
|
||||
|
||||
windowrulev2 = noanim,class:ulauncher
|
||||
windowrulev2 = noborder,class:ulauncher
|
||||
windowrulev2 = noblur,class:ulauncher
|
||||
windowrulev2 = noshadow,class:ulauncher
|
||||
|
||||
|
||||
# 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, hyprctl dispatch exit
|
||||
bind = $mainMod, T, exec, $terminal
|
||||
bind = $mainMod, C, killactive,
|
||||
bind = $mainMod, M, exit,
|
||||
bind = $mainMod, E, exec, $fileManager
|
||||
bind = $mainMod, V, togglefloating,
|
||||
bind = $mainMod, Space, exec, $menu
|
||||
bind = $mainMod, P, pseudo, # dwindle
|
||||
bind = $mainMod, J, togglesplit, # dwindle
|
||||
|
||||
# Move focus with mainMod + arrow keys
|
||||
bind = $mainMod, h, movefocus, l
|
||||
bind = $mainMod, l, movefocus, r
|
||||
bind = $mainMod, k, movefocus, u
|
||||
bind = $mainMod, j, movefocus, d
|
||||
|
||||
# Move windows
|
||||
bind = $mainMod SHIFT, H, movewindow, l
|
||||
bind = $mainMod SHIFT, L, movewindow, r
|
||||
bind = $mainMod SHIFT, K, movewindow, u
|
||||
bind = $mainMod SHIFT, J, movewindow, d
|
||||
|
||||
# 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
|
||||
|
||||
# Waybar
|
||||
bindr = $mainMod, I, exec, killall waybar || waybar
|
||||
|
||||
# Example special workspace (scratchpad)
|
||||
bind = $mainMod, S, togglespecialworkspace, magic
|
||||
bind = $mainMod SHIFT, S, movetoworkspace, special:magic
|
||||
|
||||
# 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
|
||||
|
||||
# Media Keys
|
||||
binde=, XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+
|
||||
bindl=, XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
|
||||
bindle=, XF86MonBrightnessUp, exec, bri --up
|
||||
bindle=, XF86MonBrightnessDown, exec, bri --down
|
||||
bindle=, XF86Search, exec, launchpad
|
||||
# bindl=, XF86AudioMute, exec, amixer set Master toggle
|
||||
bindl=, XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
|
||||
bindl=, XF86AudioPlay, exec, playerctl play-pause # the stupid key is called play , but it toggles
|
||||
bindl=, XF86AudioNext, exec, playerctl next
|
||||
bindl=, XF86AudioPrev, exec, playerctl previous
|
||||
|
||||
|
||||
# nvidia
|
||||
|
||||
env = LIBVA_DRIVER_NAME,nvidia
|
||||
env = XDG_SESSION_TYPE,wayland
|
||||
env = GBM_BACKEND,nvidia-drm
|
||||
env = __GLX_VENDOR_LIBRARY_NAME,nvidia
|
||||
env = WLR_NO_HARDWARE_CURSORS,1
|
||||
142
homemanager/hyprland/hyprlock.conf
Normal file
142
homemanager/hyprland/hyprlock.conf
Normal file
@@ -0,0 +1,142 @@
|
||||
source = /home/justin/.cache/wal/colors-hyprland.conf
|
||||
|
||||
$foreground = rgba(255, 255, 255, 0.75)
|
||||
|
||||
# BACKGROUND
|
||||
background {
|
||||
monitor =
|
||||
#path = screenshot
|
||||
path = ~/.config/backgrounds/gnome_blobs.png
|
||||
#color = $background
|
||||
blur_passes = 2
|
||||
contrast = 1
|
||||
brightness = 0.5
|
||||
vibrancy = 0.2
|
||||
vibrancy_darkness = 0.2
|
||||
}
|
||||
|
||||
# GENERAL
|
||||
general {
|
||||
no_fade_in = true
|
||||
no_fade_out = true
|
||||
hide_cursor = false
|
||||
grace = 0
|
||||
disable_loading_bar = true
|
||||
}
|
||||
|
||||
# INPUT FIELD
|
||||
input-field {
|
||||
monitor =
|
||||
size = 250, 60
|
||||
outline_thickness = 2
|
||||
dots_size = 0.2 # Scale of input-field height, 0.2 - 0.8
|
||||
dots_spacing = 0.35 # Scale of dots' absolute size, 0.0 - 1.0
|
||||
dots_center = true
|
||||
outer_color = rgba(0, 0, 0, 0)
|
||||
inner_color = rgba(0, 0, 0, 0.2)
|
||||
font_color = $foreground
|
||||
fade_on_empty = false
|
||||
rounding = -1
|
||||
check_color = rgb(204, 136, 34)
|
||||
placeholder_text = <i><span foreground="##cdd6f4">Input Password...</span></i>
|
||||
hide_input = false
|
||||
position = 0, -200
|
||||
halign = center
|
||||
valign = center
|
||||
}
|
||||
|
||||
# DATE
|
||||
label {
|
||||
monitor =
|
||||
text = cmd[update:1000] echo "$(date +"%A, %B %d")"
|
||||
color = rgba(242, 243, 244, 0.75)
|
||||
font_size = 22
|
||||
font_family = JetBrains Mono
|
||||
position = 0, 300
|
||||
halign = center
|
||||
valign = center
|
||||
}
|
||||
|
||||
# TIME
|
||||
label {
|
||||
monitor =
|
||||
text = cmd[update:1000] echo "$(date +"%-I:%M")"
|
||||
color = rgba(242, 243, 244, 0.75)
|
||||
font_size = 95
|
||||
font_family = JetBrains Mono Extrabold
|
||||
position = 0, 200
|
||||
halign = center
|
||||
valign = center
|
||||
}
|
||||
|
||||
|
||||
|
||||
# Profile Picture
|
||||
image {
|
||||
monitor =
|
||||
path = /home/justin/Pictures/profile_pictures/justin_square.png
|
||||
size = 100
|
||||
border_size = 2
|
||||
border_color = $foreground
|
||||
position = 0, -100
|
||||
halign = center
|
||||
valign = center
|
||||
}
|
||||
|
||||
# Desktop Environment
|
||||
image {
|
||||
monitor =
|
||||
path = /home/justin/Pictures/profile_pictures/hypr.png
|
||||
size = 75
|
||||
border_size = 2
|
||||
border_color = $foreground
|
||||
position = -50, 50
|
||||
halign = right
|
||||
valign = bottom
|
||||
}
|
||||
|
||||
# CURRENT SONG
|
||||
label {
|
||||
monitor =
|
||||
text = cmd[update:1000] echo "$(/home/justin/Documents/Scripts/whatsong.sh)"
|
||||
color = $foreground
|
||||
#color = rgba(255, 255, 255, 0.6)
|
||||
font_size = 18
|
||||
font_family = Metropolis Light, Font Awesome 6 Free Solid
|
||||
position = 0, 50
|
||||
halign = center
|
||||
valign = bottom
|
||||
}
|
||||
|
||||
label {
|
||||
monitor =
|
||||
text = cmd[update:1000] echo "$(/home/justin/Documents/Scripts/whoami.sh)"
|
||||
color = $foreground
|
||||
font_size = 14
|
||||
font_family = JetBrains Mono
|
||||
position = 0, -10
|
||||
halign = center
|
||||
valign = top
|
||||
}
|
||||
|
||||
label {
|
||||
monitor =
|
||||
text = cmd[update:1000] echo "$(/home/justin/Documents/Scripts/battery.sh)"
|
||||
color = $foreground
|
||||
font_size = 24
|
||||
font_family = JetBrains Mono
|
||||
position = -90, -10
|
||||
halign = right
|
||||
valign = top
|
||||
}
|
||||
|
||||
label {
|
||||
monitor =
|
||||
text = cmd[update:1000] echo "$(/home/justin/Documents/Scripts/network-status.sh)"
|
||||
color = $foreground
|
||||
font_size = 24
|
||||
font_family = JetBrains Mono
|
||||
position = -20, -10
|
||||
halign = right
|
||||
valign = top
|
||||
}
|
||||
8
homemanager/hyprland/hyprpaper.conf
Normal file
8
homemanager/hyprland/hyprpaper.conf
Normal file
@@ -0,0 +1,8 @@
|
||||
preload = ~/.config/backgrounds/qingce.jpg
|
||||
preload = ~/.config/backgrounds/nature.jpg
|
||||
preload = ~/.config/backgrounds/gnome_blobs.png
|
||||
|
||||
wallpaper = ,~/.config/backgrounds/gnome_blobs.png
|
||||
splash = false
|
||||
|
||||
source = ~/.config/hypr/hyprpaper.hardware.conf
|
||||
46
homemanager/hyprpanel.nix
Normal file
46
homemanager/hyprpanel.nix
Normal file
@@ -0,0 +1,46 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options = {
|
||||
modules.hyprpanel.enable = lib.mkEnableOption "hyprpanel";
|
||||
modules.hyprpanel.avatar.image = lib.mkOption {
|
||||
type = lib.types.path;
|
||||
default = "";
|
||||
description = "avatar image";
|
||||
};
|
||||
|
||||
modules.hyprpanel.avatar.name = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "John Doe";
|
||||
description = "Username to be displayed";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.modules.hyprpanel.enable {
|
||||
programs.hyprpanel = {
|
||||
enable = true;
|
||||
settings = {
|
||||
scalingPriority = true;
|
||||
theme = {
|
||||
bar.scaling = 80;
|
||||
bar.menus.menu.notifications.scaling = 80;
|
||||
bar.menus.menu.dashboard.scaling = 80;
|
||||
bar.menus.menu.clock.scaling = 80;
|
||||
};
|
||||
menus.clock.weather.enabled = false;
|
||||
menus.clock.weather.unit = "metric";
|
||||
menus.clock.weather.location = "Linz";
|
||||
menus.dashboard = {
|
||||
powermenu.avatar.name = config.modules.hyprpanel.avatar.name;
|
||||
powermenu.avatar.image = config.modules.hyprpanel.avatar.image;
|
||||
shortcuts.enabled = false;
|
||||
};
|
||||
bar.launcher.icon = "";
|
||||
terminal = "ghostty";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
9
homemanager/lib/theme.nix
Normal file
9
homemanager/lib/theme.nix
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
primary = "#81a1c1";
|
||||
secondary = "#4C566A";
|
||||
accent = "#88C0D0";
|
||||
primary-foreground = "#ffffff";
|
||||
git = "#FCA17D";
|
||||
language = "#86BBD8";
|
||||
docker = "#1D63ED";
|
||||
}
|
||||
73
homemanager/neovim.nix
Normal file
73
homemanager/neovim.nix
Normal file
@@ -0,0 +1,73 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
configHome = "${config.home.homeDirectory}/.config/dotfiles/homes/quirinecker";
|
||||
rlang = pkgs.rWrapper.override {
|
||||
packages = with pkgs.rPackages; [
|
||||
languageserver
|
||||
box
|
||||
xtable
|
||||
dplyr
|
||||
svSweave
|
||||
knitr
|
||||
];
|
||||
};
|
||||
in
|
||||
{
|
||||
options = {
|
||||
modules.neovim.enable = lib.mkEnableOption "neovim";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.modules.neovim.enable {
|
||||
home.sessionVariables = {
|
||||
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
|
||||
};
|
||||
|
||||
programs.neovim.enable = true;
|
||||
programs.zathura.enable = true;
|
||||
home.packages = [
|
||||
pkgs.cargo
|
||||
pkgs.rustc
|
||||
pkgs.nodejs
|
||||
pkgs.yarn
|
||||
pkgs.unzip
|
||||
pkgs.ripgrep
|
||||
pkgs.fd
|
||||
pkgs.luajitPackages.lua-lsp
|
||||
pkgs.lua-language-server
|
||||
pkgs.nil
|
||||
pkgs.nixfmt-rfc-style
|
||||
pkgs.nixd
|
||||
pkgs.rust-analyzer
|
||||
pkgs.rustfmt
|
||||
pkgs.typescript-language-server
|
||||
pkgs.vue-language-server
|
||||
pkgs.vtsls
|
||||
pkgs.deno
|
||||
pkgs.vscode-langservers-extracted
|
||||
pkgs.yaml-language-server
|
||||
rlang
|
||||
pkgs.jdt-language-server
|
||||
pkgs.tailwindcss-language-server
|
||||
pkgs.pyright
|
||||
pkgs.protols
|
||||
pkgs.clang-tools
|
||||
pkgs.taplo
|
||||
pkgs.tinymist
|
||||
];
|
||||
xdg.configFile = {
|
||||
"nvim/init.lua".source = config.lib.file.mkOutOfStoreSymlink ./neovim/init.lua;
|
||||
"nvim/lua".source = config.lib.file.mkOutOfStoreSymlink ./neovim/lua;
|
||||
"nvim/ftplugin".source = config.lib.file.mkOutOfStoreSymlink ./neovim/ftplugin;
|
||||
"nvim/projects".source = config.lib.file.mkOutOfStoreSymlink ./neovim/projects;
|
||||
};
|
||||
|
||||
home.activation.npm-install = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||
nix-shell -p nodejs --run "cd ${configHome}/.npm_global && npm install"
|
||||
'';
|
||||
};
|
||||
}
|
||||
46
homemanager/neovim/ftplugin/java.lua
Normal file
46
homemanager/neovim/ftplugin/java.lua
Normal file
@@ -0,0 +1,46 @@
|
||||
local function setup()
|
||||
local from_home = '/.cache/nvim-lsp/eclipse.jdt.ls/org.eclipse.jdt.ls.product/target/repository/bin/jdtls'
|
||||
local home_dir = os.getenv('HOME')
|
||||
local path = home_dir .. from_home
|
||||
|
||||
|
||||
local config = {
|
||||
cmd = { path },
|
||||
root_dir = vim.fs.dirname(vim.fs.find({ '.gradlew', '.git', 'mvnw' }, { upward = true })[1]),
|
||||
settings = {
|
||||
java = {
|
||||
configuration = {
|
||||
runtimes = {
|
||||
{
|
||||
name = "JavaSE-1.8",
|
||||
path = "/home/quirinecker/.sdkman/candidates/java/8.0.302-open"
|
||||
},
|
||||
{
|
||||
name = "JavaSE-11",
|
||||
path = "/home/quirinecker/.sdkman/candidates/java/11.0.2-open"
|
||||
},
|
||||
{
|
||||
name = "JavaSE-17",
|
||||
path = "/home/quirinecker/.sdkman/candidates/java/17-open"
|
||||
},
|
||||
{
|
||||
name = "JavaSE-18",
|
||||
path = "/home/quirinecker/.sdkman/candidates/java/18-open"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
require('jdtls').start_or_attach(config)
|
||||
|
||||
vim.cmd [[
|
||||
command! -buffer -nargs=? -complete=custom,v:lua.require'jdtls'._complete_compile JdtCompile lua require('jdtls').compile(<f-args>)
|
||||
command! -buffer -nargs=? -complete=custom,v:lua.require'jdtls'._complete_set_runtime JdtSetRuntime lua require('jdtls').set_runtime(<f-args>)
|
||||
command! -buffer JdtUpdateConfig lua require('jdtls').update_project_config()
|
||||
command! -buffer JdtJol lua require('jdtls').jol()
|
||||
command! -buffer JdtBytecode lua require('jdtls').javap()
|
||||
command! -buffer JdtJshell lua require('jdtls').jshell()
|
||||
]]
|
||||
end
|
||||
1
homemanager/neovim/ftplugin/markdown.lua
Normal file
1
homemanager/neovim/ftplugin/markdown.lua
Normal file
@@ -0,0 +1 @@
|
||||
vim.opt.wrap = true
|
||||
1
homemanager/neovim/init.lua
Normal file
1
homemanager/neovim/init.lua
Normal file
@@ -0,0 +1 @@
|
||||
require('config')
|
||||
45
homemanager/neovim/lazy-lock.json
Normal file
45
homemanager/neovim/lazy-lock.json
Normal file
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
||||
"LuaSnip": { "branch": "master", "commit": "33b06d72d220aa56a7ce80a0dd6f06c70cd82b9d" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
|
||||
"cmp-emoji": { "branch": "main", "commit": "e8398e2adf512a03bb4e1728ca017ffeac670a9f" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" },
|
||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" },
|
||||
"gen.nvim": { "branch": "main", "commit": "b9721662daedd880ca0a0358cf6ffbff60617ab3" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "7c493713bc2cb392706866eeba53aaef6c8e9fc6" },
|
||||
"lspkind.nvim": { "branch": "master", "commit": "d79a1c3299ad0ef94e255d045bed9fa26025dab6" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" },
|
||||
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "8e46de9241d3997927af12196bd8faa0ed08c29a" },
|
||||
"mason-nvim-dap.nvim": { "branch": "main", "commit": "8b9363d83b5d779813cdd2819b8308651cec2a09" },
|
||||
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
||||
"nightfox.nvim": { "branch": "main", "commit": "7557f26defd093c4e9bc17f28b08403f706f5a44" },
|
||||
"noice.nvim": { "branch": "main", "commit": "7b1960c48078a8b2fb44a89db82f4fa637b2d7c8" },
|
||||
"nui.nvim": { "branch": "main", "commit": "53e907ffe5eedebdca1cd503b00aa8692068ca46" },
|
||||
"nvim": { "branch": "main", "commit": "faf15ab0201b564b6368ffa47b56feefc92ce3f4" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "b464658e9b880f463b9f7e6ccddd93fb0013f559" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "3403e2e9391ed0a28c3afddd8612701b647c8e26" },
|
||||
"nvim-dap": { "branch": "master", "commit": "b08e05d7cff6024a9c29b64287d295db7c191450" },
|
||||
"nvim-jdtls": { "branch": "master", "commit": "ece818f909c6414cbad4e1fb240d87e003e10fda" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "5a812abc65d529ea7673059a348814c21d7f87ff" },
|
||||
"nvim-notify": { "branch": "master", "commit": "fbef5d32be8466dd76544a257d3f3dce20082a07" },
|
||||
"nvim-projectconfig": { "branch": "master", "commit": "db11fd7d51f7180ede292a7584eb62bb48f91863" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "337b503688eccb3046547661e4c738e674548fcf" },
|
||||
"nvim-treesitter-context": { "branch": "master", "commit": "3288c5af7d3820d716272f1d05ab661cc540a5d6" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "e73d2774d12d0ecf9e05578d692ba1ea50508cf2" },
|
||||
"oil.nvim": { "branch": "master", "commit": "7a55ede5e745e31ea8e4cb5483221524922294bf" },
|
||||
"onedark.nvim": { "branch": "master", "commit": "67a74c275d1116d575ab25485d1bfa6b2a9c38a6" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
|
||||
"renamer.nvim": { "branch": "develop", "commit": "1614d466df53899f11dd5395eaac3c09a275c384" },
|
||||
"rust-tools.nvim": { "branch": "master", "commit": "676187908a1ce35ffcd727c654ed68d851299d3e" },
|
||||
"supermaven-nvim": { "branch": "main", "commit": "07d20fce48a5629686aefb0a7cd4b25e33947d50" },
|
||||
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "2eca9ba22002184ac05eddbe47a7fe2d5a384dfc" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "46cf952fc115f4c2b98d4e208ed1e2dce08c9bf6" },
|
||||
"vim-fugitive": { "branch": "master", "commit": "320b18fba2a4f2fe3c8225c778c687e0d2620384" },
|
||||
"vimtex": { "branch": "master", "commit": "3401dc81a14b7251bd813e2411eaf0d3b65bd2af" },
|
||||
"workspace-diagnostics.nvim": { "branch": "main", "commit": "573ff93c47898967efdfbc6587a1a39e3c2d365e" }
|
||||
}
|
||||
7
homemanager/neovim/lua/config/autocommands.lua
Normal file
7
homemanager/neovim/lua/config/autocommands.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
vim.api.nvim_create_autocmd({ 'TextYankPost' }, {
|
||||
desc = "Highlight when yanking",
|
||||
group = vim.api.nvim_create_augroup("YankHighlight", { clear = true }),
|
||||
callback = function()
|
||||
vim.highlight.on_yank()
|
||||
end,
|
||||
})
|
||||
44
homemanager/neovim/lua/config/commands.lua
Normal file
44
homemanager/neovim/lua/config/commands.lua
Normal file
@@ -0,0 +1,44 @@
|
||||
local lib = require('lib.window')
|
||||
|
||||
local command = function(name, callback)
|
||||
vim.api.nvim_create_user_command(name, callback, {})
|
||||
end
|
||||
|
||||
command('Settings', function()
|
||||
local path = vim.fn.expand('~/.config/dotfiles/homes/quirinecker/.config/nvim')
|
||||
lib.new_window(path, 'Settings')
|
||||
end)
|
||||
|
||||
command('TransparencyFix', function()
|
||||
require('lualine').setup(require('plugins.lualine').opts)
|
||||
end)
|
||||
|
||||
command('MavenStartCommand', function()
|
||||
local Path = require("plenary.path")
|
||||
local cwd = Path:new(vim.fn.getcwd()):absolute()
|
||||
local baseName = vim.fn.fnamemodify(vim.api.nvim_buf_get_name(0), ":t")
|
||||
|
||||
if vim.fn.filereadable(cwd .. "/pom.xml") ~= 1 then
|
||||
vim.notify("No pom.xml found in current directory", vim.log.levels.ERROR)
|
||||
return
|
||||
end
|
||||
|
||||
if not baseName:match(".java$") then
|
||||
vim.notify("Current buffer is not a java file", vim.log.levels.ERROR)
|
||||
return
|
||||
end
|
||||
|
||||
local lines = vim.api.nvim_buf_get_lines(0, 0, -1, false)
|
||||
|
||||
local className = baseName:gsub(".java", "")
|
||||
local packageName = ""
|
||||
for _, line in ipairs(lines) do
|
||||
if line:match("^package ") then
|
||||
local value = vim.split(line, " ")[2]
|
||||
packageName = value:gsub(";", "")
|
||||
end
|
||||
end
|
||||
|
||||
vim.fn.setreg("+", "mvn exec:java -Dexec.mainClass=" .. packageName .. "." .. className)
|
||||
vim.notify("Copied Start Command to Clipboard", vim.log.levels.INFO)
|
||||
end)
|
||||
6
homemanager/neovim/lua/config/init.lua
Normal file
6
homemanager/neovim/lua/config/init.lua
Normal file
@@ -0,0 +1,6 @@
|
||||
require('config.settings')
|
||||
require('config.keymap')
|
||||
require('config.commands')
|
||||
require('config.setup')
|
||||
require('config.lazy')
|
||||
require('config.autocommands')
|
||||
44
homemanager/neovim/lua/config/keymap.lua
Normal file
44
homemanager/neovim/lua/config/keymap.lua
Normal file
@@ -0,0 +1,44 @@
|
||||
local keymap = vim.keymap.set
|
||||
keymap({ 'v', 'n' }, ' ', '', {})
|
||||
|
||||
local function vn_map(map, action)
|
||||
keymap({ 'v', 'n' }, map, action)
|
||||
end
|
||||
|
||||
-- splitting
|
||||
|
||||
|
||||
-- Clipboard
|
||||
vn_map('<leader>y', [["+y]])
|
||||
keymap('n', '<leader>yy', [["+yy]])
|
||||
vn_map('<leader>op', [[o<Esc>"+p]])
|
||||
vn_map('<leader>p', [["+p]])
|
||||
|
||||
vn_map('<leader>cl', ':bd <cr>')
|
||||
vn_map('<leader>ss', ':w <cr>')
|
||||
vn_map('<leader>sq', ':wq <cr>')
|
||||
vn_map('<leader>sc', ':w <cr> :bd <cr>')
|
||||
|
||||
-- Quickfix List
|
||||
|
||||
vim.keymap.set('n', '<alt>n', ':cnext<cr>')
|
||||
vim.keymap.set('n', '<alt>p', ':cprevious<cr>')
|
||||
|
||||
-- Terminal
|
||||
vim.keymap.set('n', '<leader>tt', function()
|
||||
os.execute("kitty")
|
||||
end)
|
||||
|
||||
-- Copy Path to clipboard
|
||||
vim.keymap.set('n', '<leader>yrp', function()
|
||||
local path = vim.fn.expand("%:p")
|
||||
local relative_path = vim.fn.fnamemodify(path, ":~:.")
|
||||
vim.fn.setreg("+", relative_path)
|
||||
vim.notify('Copied "' .. relative_path .. '" to the clipboard!')
|
||||
end)
|
||||
|
||||
vim.keymap.set('n', '<leader>yap', function()
|
||||
local path = vim.fn.expand("%:p")
|
||||
vim.fn.setreg("+", path)
|
||||
vim.notify('Copied "' .. path .. '" to the clipboard!')
|
||||
end)
|
||||
6
homemanager/neovim/lua/config/lazy.lua
Normal file
6
homemanager/neovim/lua/config/lazy.lua
Normal file
@@ -0,0 +1,6 @@
|
||||
-- require('lazy').setup("plugins")
|
||||
require('lazy').setup({
|
||||
spec = {
|
||||
{import = "plugins.spec"},
|
||||
}
|
||||
})
|
||||
35
homemanager/neovim/lua/config/settings.lua
Normal file
35
homemanager/neovim/lua/config/settings.lua
Normal file
@@ -0,0 +1,35 @@
|
||||
-- Mapleader
|
||||
vim.g.mapleader = ' '
|
||||
|
||||
-- Colors
|
||||
vim.opt.termguicolors = true
|
||||
|
||||
-- tabsize
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.shiftwidth = 4
|
||||
vim.opt.softtabstop = 4
|
||||
vim.opt.expandtab = true
|
||||
|
||||
-- Line Wrap
|
||||
vim.opt.wrap = false
|
||||
|
||||
-- Searching
|
||||
vim.opt.hlsearch = false
|
||||
vim.opt.incsearch = true
|
||||
|
||||
-- Line Numbering
|
||||
vim.opt.number = true
|
||||
vim.opt.relativenumber = true
|
||||
|
||||
-- Other
|
||||
vim.opt.scrolloff = 8
|
||||
vim.opt.signcolumn = "yes"
|
||||
vim.opt.colorcolumn = "120"
|
||||
vim.opt.smartindent = true
|
||||
|
||||
-- Disabling Netrw
|
||||
vim.g.loaded_netrw = 1
|
||||
vim.g.loaded_netrwPlugin = 1
|
||||
|
||||
-- Tabline
|
||||
vim.opt.showtabline = 1
|
||||
12
homemanager/neovim/lua/config/setup.lua
Normal file
12
homemanager/neovim/lua/config/setup.lua
Normal file
@@ -0,0 +1,12 @@
|
||||
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)
|
||||
1
homemanager/neovim/lua/config/test.txt
Normal file
1
homemanager/neovim/lua/config/test.txt
Normal file
@@ -0,0 +1 @@
|
||||
package com.example.demo;
|
||||
7
homemanager/neovim/lua/lib/lsp.lua
Normal file
7
homemanager/neovim/lua/lib/lsp.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
M = {}
|
||||
|
||||
function M.has_file(filename)
|
||||
return vim.fn.filereadable(filename) == 1
|
||||
end
|
||||
|
||||
return M
|
||||
15
homemanager/neovim/lua/lib/window.lua
Normal file
15
homemanager/neovim/lua/lib/window.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
return {
|
||||
new_window = function(o_path, o_title)
|
||||
if o_path == nil then
|
||||
o_path = vim.fn.getcwd()
|
||||
end
|
||||
|
||||
if o_title == nil then
|
||||
o_title = "neovim"
|
||||
end
|
||||
|
||||
print(string.format("ghostty --working-directory='%s' --title='%s' -e nvim .", o_path, o_title))
|
||||
return vim.fn.jobstart(string.format("ghostty --working-directory='%s' --title='%s' -e nvim .", o_path, o_title),
|
||||
{ detach = true })
|
||||
end
|
||||
}
|
||||
62
homemanager/neovim/lua/plugins/config/lualine.lua
Normal file
62
homemanager/neovim/lua/plugins/config/lualine.lua
Normal file
@@ -0,0 +1,62 @@
|
||||
local function CurrentTime()
|
||||
return os.date("%H:%M:%S")
|
||||
end
|
||||
|
||||
local function Text(text)
|
||||
return function()
|
||||
return text
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
local theme = require('plugins.config.lualine.nord_theme')
|
||||
|
||||
|
||||
local opts = {
|
||||
options = {
|
||||
theme = theme.spec,
|
||||
component_separators = '|',
|
||||
section_separators = { left = ' ', right = ' ' },
|
||||
},
|
||||
sections = {
|
||||
lualine_a = {
|
||||
{ 'mode', separator = { left = ' ', right = '' } },
|
||||
},
|
||||
lualine_b = { {
|
||||
'tabs',
|
||||
seperator = " ",
|
||||
cond = function()
|
||||
return #vim.fn.gettabinfo() >= 2
|
||||
end,
|
||||
tabs_color = {
|
||||
inactive = { fg = theme.colors.nord5 },
|
||||
active = { fg = theme.colors.nord8 },
|
||||
}
|
||||
}, 'filename', 'branch', 'diff' },
|
||||
lualine_c = {},
|
||||
lualine_x = {},
|
||||
lualine_y = { 'filetype', { 'diagnostics', always_visible = true }, 'progress' },
|
||||
lualine_z = {
|
||||
{ CurrentTime, separator = { right = ' ', left = '' } },
|
||||
},
|
||||
},
|
||||
inactive_sections = {
|
||||
lualine_a = {},
|
||||
lualine_b = {},
|
||||
lualine_c = {},
|
||||
lualine_x = {},
|
||||
lualine_y = {},
|
||||
lualine_z = {},
|
||||
},
|
||||
tabline = {
|
||||
lualine_a = {},
|
||||
lualine_b = {},
|
||||
lualine_c = {},
|
||||
lualine_x = {},
|
||||
lualine_y = {},
|
||||
lualine_z = {},
|
||||
},
|
||||
extensions = {},
|
||||
}
|
||||
|
||||
require('lualine').setup(opts)
|
||||
@@ -0,0 +1,31 @@
|
||||
local M = {}
|
||||
|
||||
M.colors = {
|
||||
blue = '#80a0ff',
|
||||
cyan = '#79dac8',
|
||||
transparent = nil,
|
||||
white = '#c6c6c6',
|
||||
red = '#ff5189',
|
||||
violet = '#d183e8',
|
||||
grey = '#303030',
|
||||
}
|
||||
|
||||
M.theme = {
|
||||
normal = {
|
||||
a = { fg = M.colors.transparent, bg = M.colors.violet },
|
||||
b = { fg = M.colors.white, bg = M.colors.grey },
|
||||
c = { fg = M.colors.transparent, bg = M.colors.transparent },
|
||||
},
|
||||
|
||||
insert = { a = { fg = M.colors.transparent, bg = M.colors.blue } },
|
||||
visual = { a = { fg = M.colors.transparent, bg = M.colors.cyan } },
|
||||
replace = { a = { fg = M.colors.transparent, bg = M.colors.red } },
|
||||
|
||||
inactive = {
|
||||
a = { fg = M.colors.white, bg = M.colors.transparent },
|
||||
b = { fg = M.colors.white, bg = M.colors.transparent },
|
||||
c = { fg = M.colors.transparent, bg = M.colors.transparent },
|
||||
},
|
||||
}
|
||||
|
||||
return M
|
||||
30
homemanager/neovim/lua/plugins/config/lualine/nord_theme.lua
Normal file
30
homemanager/neovim/lua/plugins/config/lualine/nord_theme.lua
Normal file
@@ -0,0 +1,30 @@
|
||||
local M = {}
|
||||
|
||||
M.colors = {
|
||||
nord1 = '#3B4252',
|
||||
nord3 = '#4C566A',
|
||||
nord5 = '#E5E9F0',
|
||||
nord6 = '#ECEFF4',
|
||||
nord7 = '#8FBCBB',
|
||||
nord8 = '#88C0D0',
|
||||
nord13 = '#EBCB8B',
|
||||
transparent = nil,
|
||||
}
|
||||
|
||||
M.spec = {
|
||||
normal = {
|
||||
a = { fg = M.colors.transparent, bg = M.colors.nord8, gui = 'bold' },
|
||||
b = { fg = M.colors.nord5, bg = M.colors.nord1 },
|
||||
c = { fg = M.colors.transparent, bg = M.colors.transparent },
|
||||
},
|
||||
insert = { a = { fg = M.colors.transparent, bg = M.colors.nord6, gui = 'bold' } },
|
||||
visual = { a = { fg = M.colors.transparent, bg = M.colors.nord7, gui = 'bold' } },
|
||||
replace = { a = { fg = M.colors.transparent, bg = M.colors.nord13, gui = 'bold' } },
|
||||
inactive = {
|
||||
a = { fg = M.colors.nord1, bg = M.colors.transparent, gui = 'bold' },
|
||||
b = { fg = M.colors.nord5, bg = M.colors.transparent },
|
||||
c = { fg = M.colors.transparent, bg = M.colors.transparent },
|
||||
},
|
||||
}
|
||||
|
||||
return M
|
||||
6
homemanager/neovim/lua/plugins/spec/2048.lua
Normal file
6
homemanager/neovim/lua/plugins/spec/2048.lua
Normal file
@@ -0,0 +1,6 @@
|
||||
return {
|
||||
"NStefan002/2048.nvim",
|
||||
cmd = "Play2048",
|
||||
enabled = false,
|
||||
config = true,
|
||||
}
|
||||
4
homemanager/neovim/lua/plugins/spec/color_hints.lua
Normal file
4
homemanager/neovim/lua/plugins/spec/color_hints.lua
Normal file
@@ -0,0 +1,4 @@
|
||||
return {
|
||||
"brenoprata10/nvim-highlight-colors",
|
||||
opts = {}
|
||||
}
|
||||
5
homemanager/neovim/lua/plugins/spec/comment.lua
Normal file
5
homemanager/neovim/lua/plugins/spec/comment.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
return {
|
||||
'numToStr/Comment.nvim',
|
||||
lazy = false,
|
||||
opts = {}
|
||||
}
|
||||
105
homemanager/neovim/lua/plugins/spec/completions.lua
Normal file
105
homemanager/neovim/lua/plugins/spec/completions.lua
Normal file
@@ -0,0 +1,105 @@
|
||||
local function setup()
|
||||
-- Set up nvim-cmp
|
||||
local cmp = require 'cmp'
|
||||
local lspkind = require('lspkind')
|
||||
local cmp_select = { behavior = cmp.SelectBehavior.Select }
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
-- REQUIRED - you must specify a snippet engine
|
||||
expand = function(args)
|
||||
local luasnip = require("luasnip")
|
||||
if not luasnip then
|
||||
return
|
||||
end
|
||||
luasnip.lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
window = {
|
||||
-- completion = cmp.config.window.bordered(),
|
||||
-- documentation = cmp.config.window.bordered(),
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
['<C-p>'] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Select }),
|
||||
['<C-n>'] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Select }),
|
||||
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
['<C-e>'] = cmp.mapping.abort(),
|
||||
['<CR>'] = cmp.mapping.confirm({ select = false }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'luasnip' }, -- For luasnip users.
|
||||
-- { name = 'emoji' }
|
||||
}, {
|
||||
{ name = 'buffer' },
|
||||
}),
|
||||
formatting = {
|
||||
format = lspkind.cmp_format({
|
||||
mode = 'symbol',
|
||||
maxwidth = 50,
|
||||
ellipsis_char = 'b',
|
||||
before = function(entry, vim_item)
|
||||
return vim_item
|
||||
end
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
-- Set configuration for specific filetype.
|
||||
cmp.setup.filetype('gitcommit', {
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'cmp_git' }, -- You can specify the `cmp_git` source if you were installed it.
|
||||
}, {
|
||||
{ name = 'buffer' },
|
||||
})
|
||||
})
|
||||
|
||||
-- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore).
|
||||
cmp.setup.cmdline({ '/', '?' }, {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = {
|
||||
{ name = 'buffer' }
|
||||
}
|
||||
})
|
||||
|
||||
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
|
||||
cmp.setup.cmdline(':', {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'path' }
|
||||
}, {
|
||||
{ name = 'cmdline' }
|
||||
})
|
||||
})
|
||||
|
||||
-- auto pairs
|
||||
local cmp_autopairs = require('nvim-autopairs.completion.cmp')
|
||||
cmp.event:on(
|
||||
'confirm_done',
|
||||
cmp_autopairs.on_confirm_done()
|
||||
)
|
||||
end
|
||||
|
||||
return {
|
||||
'hrsh7th/nvim-cmp',
|
||||
event = { "InsertEnter", "CmdlineEnter" },
|
||||
config = function()
|
||||
setup()
|
||||
end,
|
||||
dependencies = {
|
||||
'hrsh7th/cmp-nvim-lsp',
|
||||
'hrsh7th/cmp-buffer',
|
||||
'hrsh7th/cmp-path',
|
||||
'hrsh7th/cmp-cmdline',
|
||||
'hrsh7th/nvim-cmp',
|
||||
'onsails/lspkind.nvim',
|
||||
'saadparwaiz1/cmp_luasnip',
|
||||
'hrsh7th/cmp-emoji',
|
||||
{ 'windwp/nvim-autopairs', opts = {} },
|
||||
require('plugins.spec.snippets'),
|
||||
require('plugins.spec.lsp'),
|
||||
require('plugins.spec.jdtls')
|
||||
}
|
||||
}
|
||||
23
homemanager/neovim/lua/plugins/spec/dadbod.lua
Normal file
23
homemanager/neovim/lua/plugins/spec/dadbod.lua
Normal file
@@ -0,0 +1,23 @@
|
||||
return {
|
||||
"tpope/vim-dadbod",
|
||||
config = function()
|
||||
local augroup = vim.api.nvim_create_augroup("SqlCompletion", {})
|
||||
|
||||
vim.api.nvim_create_autocmd({ "FileType" }, {
|
||||
group = augroup,
|
||||
pattern = { "sql", "mysql", "plsql" },
|
||||
callback = function()
|
||||
require('cmp').setup.buffer({
|
||||
sources = {
|
||||
{ name = 'vim-dadbod-completion' }
|
||||
}
|
||||
})
|
||||
end
|
||||
})
|
||||
end,
|
||||
dependencies = {
|
||||
"kristijanhusak/vim-dadbod-ui",
|
||||
"pbogut/vim-dadbod-ssh",
|
||||
"kristijanhusak/vim-dadbod-completion"
|
||||
}
|
||||
}
|
||||
13
homemanager/neovim/lua/plugins/spec/fugitive.lua
Normal file
13
homemanager/neovim/lua/plugins/spec/fugitive.lua
Normal file
@@ -0,0 +1,13 @@
|
||||
return {
|
||||
'tpope/vim-fugitive',
|
||||
keys = {
|
||||
{ '<leader>gg', ':Git<cr>', 'Git Status' },
|
||||
{ '<leader>gc', function()
|
||||
if vim.bo.filetype == 'fugitive' then
|
||||
vim.cmd.close()
|
||||
end
|
||||
vim.cmd("Git commit")
|
||||
end, '(g)it (c)ommit' }
|
||||
},
|
||||
cmd = 'Git'
|
||||
}
|
||||
28
homemanager/neovim/lua/plugins/spec/gen.lua
Normal file
28
homemanager/neovim/lua/plugins/spec/gen.lua
Normal file
@@ -0,0 +1,28 @@
|
||||
return {
|
||||
"David-Kunz/gen.nvim",
|
||||
opts = {
|
||||
model = "deepseek-r1:14b", -- The default model to use.
|
||||
host = "localhost", -- The host running the Ollama service.
|
||||
port = "11434", -- The port on which the Ollama service is listening.
|
||||
quit_map = "q", -- set keymap for close the response window
|
||||
retry_map = "<c-r>", -- set keymap to re-send the current prompt
|
||||
init = function(options) pcall(io.popen, "ollama serve > /dev/null 2>&1 &") end,
|
||||
-- Function to initialize Ollama
|
||||
command = function(options)
|
||||
local body = { model = options.model, stream = true }
|
||||
return "curl --silent --no-buffer -X POST http://" ..
|
||||
options.host .. ":" .. options.port .. "/api/chat -d $body"
|
||||
end,
|
||||
-- The command for the Ollama service. You can use placeholders $prompt, $model and $body (shellescaped).
|
||||
-- This can also be a command string.
|
||||
-- The executed command must return a JSON object with { response, context }
|
||||
-- (context property is optional).
|
||||
-- list_models = '<omitted lua function>', -- Retrieves a list of model names
|
||||
display_mode = "split", -- The display mode. Can be "float" or "split".
|
||||
show_prompt = true, -- Shows the prompt submitted to Ollama.
|
||||
show_model = true, -- Displays which model you are using at the beginning of your chat session.
|
||||
no_auto_close = true, -- Never closes the window automatically.
|
||||
debug = false -- Prints errors and the command which is run.
|
||||
}
|
||||
}
|
||||
|
||||
8
homemanager/neovim/lua/plugins/spec/hologram.lua
Normal file
8
homemanager/neovim/lua/plugins/spec/hologram.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
return {
|
||||
'edluffy/hologram.nvim',
|
||||
event = 'VeryLazy',
|
||||
enabled = false,
|
||||
opts = {
|
||||
auto_display = true
|
||||
}
|
||||
}
|
||||
5
homemanager/neovim/lua/plugins/spec/init.lua
Normal file
5
homemanager/neovim/lua/plugins/spec/init.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
local plugins = {
|
||||
'mfussenegger/nvim-jdtls',
|
||||
}
|
||||
|
||||
return plugins
|
||||
15
homemanager/neovim/lua/plugins/spec/jdtls.lua
Normal file
15
homemanager/neovim/lua/plugins/spec/jdtls.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
return {
|
||||
enabled = false,
|
||||
"mfussenegger/nvim-jdtls",
|
||||
config = function()
|
||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
require("jdtls").start_or_attach({
|
||||
cmd = { "jdtls" },
|
||||
root_dir = vim.fs.dirname(vim.fs.find({ 'gradlew', '.git', 'mvnw', 'pom.xml' }, { upward = true })[1]),
|
||||
capabilities = capabilities
|
||||
})
|
||||
end,
|
||||
dependencies = {
|
||||
require("plugins.spec.lsp")
|
||||
}
|
||||
}
|
||||
188
homemanager/neovim/lua/plugins/spec/lsp.lua
Normal file
188
homemanager/neovim/lua/plugins/spec/lsp.lua
Normal file
@@ -0,0 +1,188 @@
|
||||
local function keymap(args)
|
||||
-- get client
|
||||
local bufnr = args.buf
|
||||
local client = vim.lsp.get_client_by_id(args.data.client_id)
|
||||
if not client then
|
||||
return
|
||||
end
|
||||
|
||||
-- loading workspace diagnostics
|
||||
require('workspace-diagnostics').populate_workspace_diagnostics(client, bufnr)
|
||||
|
||||
-- Enable completion triggered by <c-x><c-o>
|
||||
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
|
||||
|
||||
-- Mappings.
|
||||
-- See `:help vim.lsp.*` for documentation on any of the below functions
|
||||
local bufopts = { noremap = true, silent = true, buffer = bufnr }
|
||||
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts)
|
||||
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts)
|
||||
vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts)
|
||||
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts)
|
||||
vim.keymap.set('n', '<C-k>', vim.lsp.buf.signature_help, bufopts)
|
||||
vim.keymap.set('n', '<A-k>', function()
|
||||
vim.diagnostic.open_float({ focusable = false, border = "rounded" })
|
||||
end, bufopts)
|
||||
vim.keymap.set('n', '<space>wa', vim.lsp.buf.add_workspace_folder, bufopts)
|
||||
vim.keymap.set('n', '<space>wr', vim.lsp.buf.remove_workspace_folder, bufopts)
|
||||
vim.keymap.set('n', '<space>wl', function()
|
||||
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
||||
end, bufopts)
|
||||
vim.keymap.set('n', '<space>D', vim.lsp.buf.type_definition, bufopts)
|
||||
vim.keymap.set('n', '<space>ca', vim.lsp.buf.code_action, bufopts)
|
||||
vim.keymap.set('n', '<space>rn', vim.lsp.buf.rename, bufopts)
|
||||
|
||||
-- autoformat
|
||||
|
||||
if client.supports_method('textDocument/formatting') then
|
||||
vim.api.nvim_create_autocmd('BufWritePre', {
|
||||
group = vim.api.nvim_create_augroup('LspFormatting', { clear = true }),
|
||||
buffer = args.buf,
|
||||
callback = function()
|
||||
if vim.fn.exists(":LspEslintFixAll") == 1 then
|
||||
vim.cmd(":LspEslintFixAll")
|
||||
else
|
||||
vim.lsp.buf.format { bufnr = args.buf, id = client.id }
|
||||
end
|
||||
end
|
||||
})
|
||||
end
|
||||
|
||||
|
||||
-- vim.lsp.inlay_hint.enable(true, { bufnr })
|
||||
end
|
||||
|
||||
local function diagnostic_icons()
|
||||
local signs = {
|
||||
Error = " ",
|
||||
Warn = " ",
|
||||
Hint = " ",
|
||||
Info = " "
|
||||
}
|
||||
|
||||
for type, icon in pairs(signs) do
|
||||
local hl = "DiagnosticSign" .. type
|
||||
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
|
||||
end
|
||||
end
|
||||
|
||||
local function configToHandler(server, config)
|
||||
return function()
|
||||
require("lspconfig")[server].setup(config)
|
||||
end
|
||||
end
|
||||
|
||||
local function lsp_setup()
|
||||
local lspconfig = require("lspconfig")
|
||||
-- adding edge cases for workspace diagnostics
|
||||
require('workspace-diagnostics').setup {
|
||||
workspace_files = function()
|
||||
local gitPath = vim.fn.systemlist("git rev-parse --show-toplevel")[1]
|
||||
local workspace_files = vim.fn.split(vim.fn.system("git ls-files " .. gitPath), "\n")
|
||||
-- this makes nuxt laod the nuxt typescript definition
|
||||
table.insert(workspace_files, '.nuxt/nuxt.d.ts')
|
||||
return workspace_files
|
||||
end
|
||||
}
|
||||
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
desc = "LSP actions",
|
||||
callback = keymap
|
||||
})
|
||||
|
||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
|
||||
local with_defaults = function(config)
|
||||
config.capabilities = capabilities
|
||||
return config
|
||||
end
|
||||
|
||||
require('mason').setup({})
|
||||
require('mason-lspconfig').setup { ensure_installed = {} }
|
||||
|
||||
vim.lsp.enable({
|
||||
'vue_ls',
|
||||
'nil_ls',
|
||||
'nixd',
|
||||
'rust_analyzer',
|
||||
'lua_ls',
|
||||
'gdscript',
|
||||
'jsonls',
|
||||
'r_language_server',
|
||||
'tailwindcss',
|
||||
'html',
|
||||
'taplo',
|
||||
'protols',
|
||||
'yamlls',
|
||||
'clangd',
|
||||
'eslint',
|
||||
'nushell',
|
||||
'tinymist'
|
||||
-- 'jdtls'
|
||||
})
|
||||
|
||||
-- not collision between deno lsp and ts lsp
|
||||
if require("lib.lsp").has_file("deno.json") then
|
||||
vim.lsp.enable("denols")
|
||||
else
|
||||
vim.lsp.enable("vtsls")
|
||||
-- vim.lsp.enable("ts_ls") this is disabled vtsls for vue required
|
||||
end
|
||||
|
||||
vim.lsp.config('*', with_defaults({}))
|
||||
vim.lsp.config('vue_ls', with_defaults(require("plugins.spec.server_configurations.vue")))
|
||||
vim.lsp.config('nil_ls', with_defaults(require("plugins.spec.server_configurations.nix")['nil']))
|
||||
vim.lsp.config('nixd', with_defaults(require("plugins.spec.server_configurations.nix")['nixd']))
|
||||
vim.lsp.config('rust_analyzer', with_defaults(require("plugins.spec.server_configurations.rust")))
|
||||
vim.lsp.config('lua_ls', with_defaults(require("plugins.spec.server_configurations.lua")))
|
||||
vim.lsp.config('gdscript', with_defaults(require("plugins.spec.server_configurations.gdscript")))
|
||||
vim.lsp.config('ts_ls', with_defaults(require("plugins.spec.server_configurations.typescript").config()))
|
||||
vim.lsp.config('jsonls', with_defaults(require("plugins.spec.server_configurations.json")))
|
||||
vim.lsp.config('yamlls', with_defaults(require("plugins.spec.server_configurations.yaml")))
|
||||
vim.lsp.config('denols', with_defaults(require("plugins.spec.server_configurations.deno").config()))
|
||||
vim.lsp.config('r_language_server', with_defaults({
|
||||
cmd = { "R", "--no-echo", "-e", "languageserver::run()" }
|
||||
}))
|
||||
vim.lsp.config('jdtls', with_defaults(require("plugins.spec.server_configurations.java")))
|
||||
vim.lsp.config('tailwindcss', with_defaults(require("plugins.spec.server_configurations.tailwindcss")))
|
||||
vim.lsp.config('html', with_defaults(require("plugins.spec.server_configurations.html")))
|
||||
vim.lsp.config('taplo', with_defaults(require("plugins.spec.server_configurations.taplo")))
|
||||
vim.lsp.config('protols', with_defaults(require("plugins.spec.server_configurations.proto")))
|
||||
vim.lsp.config('clangd', with_defaults(require("plugins.spec.server_configurations.clang")))
|
||||
vim.lsp.config('vtsls', with_defaults(require("plugins.spec.server_configurations.vtsls").config()))
|
||||
vim.lsp.config('eslint', with_defaults(require("plugins.spec.server_configurations.eslint")))
|
||||
vim.lsp.config('tinymist', with_defaults({
|
||||
cmd = { "tinymist" }
|
||||
}))
|
||||
|
||||
vim.diagnostic.config({
|
||||
virtual_text = {
|
||||
prefix = '●', -- or '■', '▎', 'x', '' whatever you want
|
||||
spacing = 2,
|
||||
},
|
||||
underline = true,
|
||||
update_in_insert = false, -- set to true if you want real-time errors while typing
|
||||
severity_sort = true,
|
||||
signs = {
|
||||
text = {
|
||||
[vim.diagnostic.severity.ERROR] = "",
|
||||
[vim.diagnostic.severity.WARN] = "",
|
||||
[vim.diagnostic.severity.INFO] = "",
|
||||
[vim.diagnostic.severity.HINT] = "",
|
||||
}
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
return {
|
||||
'neovim/nvim-lspconfig',
|
||||
event = { "BufReadPost", "BufNewFile" },
|
||||
config = function()
|
||||
lsp_setup()
|
||||
end,
|
||||
dependencies = {
|
||||
{ 'williamboman/mason.nvim' },
|
||||
{ 'williamboman/mason-lspconfig.nvim' },
|
||||
'artemave/workspace-diagnostics.nvim',
|
||||
}
|
||||
}
|
||||
11
homemanager/neovim/lua/plugins/spec/lualine.lua
Normal file
11
homemanager/neovim/lua/plugins/spec/lualine.lua
Normal file
@@ -0,0 +1,11 @@
|
||||
return {
|
||||
'nvim-lualine/lualine.nvim',
|
||||
event = "VeryLazy",
|
||||
lazy = false,
|
||||
config = function()
|
||||
require('plugins.config.lualine')
|
||||
end,
|
||||
dependencies = {
|
||||
require("plugins.spec.theme")
|
||||
}
|
||||
}
|
||||
20
homemanager/neovim/lua/plugins/spec/markdown.lua
Normal file
20
homemanager/neovim/lua/plugins/spec/markdown.lua
Normal file
@@ -0,0 +1,20 @@
|
||||
function preview()
|
||||
if vim.bo.filetype ~= "markdown" then
|
||||
return nil
|
||||
end
|
||||
|
||||
vim.cmd("MarkdownPreview")
|
||||
end
|
||||
|
||||
return {
|
||||
"iamcco/markdown-preview.nvim",
|
||||
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
|
||||
build = "cd app && yarn install",
|
||||
keys = {
|
||||
{ "<leader>p", preview, desc = "Markdown Preview" },
|
||||
},
|
||||
init = function()
|
||||
vim.g.mkdp_filetypes = { "markdown" }
|
||||
end,
|
||||
ft = { "markdown" },
|
||||
}
|
||||
4
homemanager/neovim/lua/plugins/spec/mini.bracketed.lua
Normal file
4
homemanager/neovim/lua/plugins/spec/mini.bracketed.lua
Normal file
@@ -0,0 +1,4 @@
|
||||
return {
|
||||
"echasnovski/mini.bracketed",
|
||||
opts = {},
|
||||
}
|
||||
39
homemanager/neovim/lua/plugins/spec/noice.lua
Normal file
39
homemanager/neovim/lua/plugins/spec/noice.lua
Normal file
@@ -0,0 +1,39 @@
|
||||
return {
|
||||
'folke/noice.nvim',
|
||||
event = "UIEnter",
|
||||
enabled = true,
|
||||
opts = {
|
||||
messages = {
|
||||
enabled = false,
|
||||
view = "mini",
|
||||
view_warn = "mini",
|
||||
view_error = "mini"
|
||||
},
|
||||
lsp = {
|
||||
-- override makdown rendering so that **cmp** and other plugins use **Treesitter**
|
||||
override = {
|
||||
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
||||
["vim.lsp.util.stylize_markdown"] = true,
|
||||
["cmp.entry.get_documentation"] = true,
|
||||
},
|
||||
hover = {
|
||||
enabled = false,
|
||||
},
|
||||
signature = {
|
||||
enabled = false
|
||||
}
|
||||
},
|
||||
-- you can enable a preset for easier configuration
|
||||
presets = {
|
||||
bottom_search = true, -- use a classic bottom cmdline for search
|
||||
command_palette = true, -- position the cmdline and popupmenu together
|
||||
long_message_to_split = true, -- long messages will be sent to a split
|
||||
inc_rename = false, -- enables an input dialog for inc-rename.nvim
|
||||
lsp_doc_border = false, -- add a border to hover docs and signature help
|
||||
},
|
||||
},
|
||||
dependencies = {
|
||||
'MunifTanjim/nui.nvim',
|
||||
require("plugins.spec.notify")
|
||||
}
|
||||
}
|
||||
12
homemanager/neovim/lua/plugins/spec/notify.lua
Normal file
12
homemanager/neovim/lua/plugins/spec/notify.lua
Normal file
@@ -0,0 +1,12 @@
|
||||
return {
|
||||
'rcarriga/nvim-notify',
|
||||
event = "UIEnter",
|
||||
lazy = false,
|
||||
config = function()
|
||||
require('notify').setup {
|
||||
background_colour = "#000000",
|
||||
}
|
||||
|
||||
vim.notify = require('notify')
|
||||
end
|
||||
}
|
||||
20
homemanager/neovim/lua/plugins/spec/nvim_dap.lua
Normal file
20
homemanager/neovim/lua/plugins/spec/nvim_dap.lua
Normal file
@@ -0,0 +1,20 @@
|
||||
return {
|
||||
'mfussenegger/nvim-dap',
|
||||
dependencies = {
|
||||
{'jay-babu/mason-nvim-dap.nvim', opts = {
|
||||
handlers = {
|
||||
function (config)
|
||||
require('mason-nvim-dap').default_setup(config)
|
||||
end,
|
||||
cppdbg = function (config)
|
||||
config.adapters.lldb = {
|
||||
type = 'executable',
|
||||
command = 'lldb-vscode',
|
||||
name = 'lldb'
|
||||
}
|
||||
require('mason-nvim-dap').default_setup(config)
|
||||
end
|
||||
}
|
||||
}}
|
||||
}
|
||||
}
|
||||
20
homemanager/neovim/lua/plugins/spec/oil.lua
Normal file
20
homemanager/neovim/lua/plugins/spec/oil.lua
Normal file
@@ -0,0 +1,20 @@
|
||||
local function oil()
|
||||
require("oil").open()
|
||||
end
|
||||
|
||||
return {
|
||||
'stevearc/oil.nvim',
|
||||
opts = {
|
||||
view_options = {
|
||||
show_hidden = true
|
||||
}
|
||||
},
|
||||
lazy = false,
|
||||
cmd = 'Oil',
|
||||
keys = {
|
||||
{"<leader>ft", oil, ""}
|
||||
},
|
||||
dependencies = {
|
||||
'kyazdani42/nvim-web-devicons',
|
||||
}
|
||||
}
|
||||
6
homemanager/neovim/lua/plugins/spec/project_config.lua
Normal file
6
homemanager/neovim/lua/plugins/spec/project_config.lua
Normal file
@@ -0,0 +1,6 @@
|
||||
return {
|
||||
'windwp/nvim-projectconfig',
|
||||
enabled = true,
|
||||
opts = {},
|
||||
lazy = false
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
return {
|
||||
cmd = { "clangd" },
|
||||
filetypes = { "c", "cpp", "objc", "objcpp" },
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
return {
|
||||
config = function()
|
||||
return {}
|
||||
end
|
||||
}
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
return {
|
||||
cmd = { "vscode-eslint-language-server", "--stdio" }
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
return {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
return {
|
||||
cmd = { "vscode-html-language-server", "--stdio" },
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
return {
|
||||
cmd = { "jdtls", "-configuration", "/home/quirinecker/.cache/jdtls/config", "-data", "/home/quirinecker/.cache/jdtls/workspace" },
|
||||
java = {
|
||||
contentProvider = { preferred = 'fernflower' },
|
||||
configuration = {
|
||||
updateBuildConfiguration = 'interactive',
|
||||
},
|
||||
},
|
||||
{
|
||||
jvm_args = {},
|
||||
workspace = "/home/quirinecker/.cache/jdtls/workspace"
|
||||
},
|
||||
init_options = {
|
||||
jvm_args = {
|
||||
"--enable-preview"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
return {
|
||||
cmd = { "vscode-json-language-server", "--stdio" },
|
||||
settings = {
|
||||
json = {
|
||||
schemas = {
|
||||
{
|
||||
fileMatch = { 'package.json' },
|
||||
url = 'https://json.schemastore.org/package.json',
|
||||
},
|
||||
{
|
||||
fileMatch = { 'tsconfig.json', 'tsconfig.*.json' },
|
||||
url = 'https://json.schemastore.org/tsconfig.json'
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
function should_load_nvim_workspace()
|
||||
return true
|
||||
end
|
||||
|
||||
return {
|
||||
on_init = function(client)
|
||||
if not should_load_nvim_workspace() then
|
||||
return
|
||||
end
|
||||
|
||||
client.config.settings.Lua = vim.tbl_deep_extend('force', client.config.settings.Lua, {
|
||||
runtime = {
|
||||
-- Tell the language server which version of Lua you're using (most
|
||||
-- likely LuaJIT in the case of Neovim)
|
||||
version = 'LuaJIT',
|
||||
-- Tell the language server how to find Lua modules same way as Neovim
|
||||
-- (see `:h lua-module-load`)
|
||||
path = {
|
||||
'lua/?.lua',
|
||||
'lua/?/init.lua',
|
||||
},
|
||||
},
|
||||
-- Make the server aware of Neovim runtime files
|
||||
workspace = {
|
||||
checkThirdParty = false,
|
||||
library = {
|
||||
vim.env.VIMRUNTIME
|
||||
-- Depending on the usage, you might want to add additional paths
|
||||
-- here.
|
||||
-- '${3rd}/luv/library'
|
||||
-- '${3rd}/busted/library'
|
||||
}
|
||||
-- Or pull in all of 'runtimepath'.
|
||||
-- NOTE: this is a lot slower and will cause issues when working on
|
||||
-- your own configuration.
|
||||
-- See https://github.com/neovim/nvim-lspconfig/issues/3189
|
||||
-- library = {
|
||||
-- vim.api.nvim_get_runtime_file('', true),
|
||||
-- }
|
||||
}
|
||||
})
|
||||
end,
|
||||
settings = {
|
||||
Lua = {}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
return {
|
||||
['nil'] = {
|
||||
cmd = { "nil" },
|
||||
settings = {
|
||||
["nil"] = {
|
||||
formatting = {
|
||||
command = { "nixfmt" },
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
},
|
||||
['nixd'] = {
|
||||
cmd = { "nixd" },
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
return {
|
||||
cmd = {"protols"}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
return {
|
||||
cmd = { "pyright" },
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
return {
|
||||
cmd = { "rust-analyzer" },
|
||||
settings = {
|
||||
["rust-analyzer"] = {
|
||||
rustfmt = {
|
||||
overrideCommand = { "rustfmt" },
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
return {
|
||||
cmd = { "tailwindcss-language-server", "--stdio" },
|
||||
root_markers = { "package.json" },
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
return {
|
||||
cmd = { "taplo", "lsp", "stdio" }
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
return {
|
||||
config = function()
|
||||
local vuePluginPath = vim.fn.expand(
|
||||
"~/.config/dotfiles/homes/quirinecker/.npm_global/node_modules/@vue/typescript-plugin/")
|
||||
|
||||
return {
|
||||
cmd = { "typescript-language-server", "--stdio" },
|
||||
single_file_support = true,
|
||||
init_options = {
|
||||
plugins = {
|
||||
{
|
||||
name = "@vue/typescript-plugin",
|
||||
location = vuePluginPath,
|
||||
languages = { "javascript", "typescript", "vue" },
|
||||
},
|
||||
},
|
||||
},
|
||||
filetypes = {
|
||||
"javascript",
|
||||
"typescript",
|
||||
-- currently disabled because no attribute completions
|
||||
-- "vue",
|
||||
}
|
||||
}
|
||||
end
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
return {
|
||||
config = function()
|
||||
local vuePluginPath = vim.fn.expand(
|
||||
"~/.config/dotfiles/homes/quirinecker/.npm_global/node_modules/@vue/typescript-plugin/")
|
||||
local vue_plugin = {
|
||||
name = '@vue/typescript-plugin',
|
||||
location = vuePluginPath,
|
||||
languages = { 'vue' },
|
||||
configNamespace = 'typescript',
|
||||
}
|
||||
|
||||
return {
|
||||
settings = {
|
||||
vtsls = {
|
||||
tsserver = {
|
||||
globalPlugins = {
|
||||
vue_plugin,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
filetypes = { 'typescript', 'javascript', 'javascriptreact', 'typescriptreact', 'vue' },
|
||||
}
|
||||
end
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
return {
|
||||
cmd = { "vue-language-server", "--stdio" },
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
return {
|
||||
cmd = { "yaml-language-server", "--stdio" },
|
||||
settings = {
|
||||
yaml = {
|
||||
schemas = {
|
||||
["https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json"] =
|
||||
"compose.yaml",
|
||||
["https://raw.githubusercontent.com/SchemaStore/schemastore/refs/heads/master/src/schemas/json/github-workflow.json"] = "**/.github/workflows/*"
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
9
homemanager/neovim/lua/plugins/spec/snippets.lua
Normal file
9
homemanager/neovim/lua/plugins/spec/snippets.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
return {
|
||||
"L3MON4D3/LuaSnip",
|
||||
version = "v2.*",
|
||||
run = "make install_jsregexp",
|
||||
config = function()
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
end,
|
||||
dependencies = { 'rafamadriz/friendly-snippets' }
|
||||
}
|
||||
0
homemanager/neovim/lua/plugins/spec/something.md
Normal file
0
homemanager/neovim/lua/plugins/spec/something.md
Normal file
6
homemanager/neovim/lua/plugins/spec/supermaven.lua
Normal file
6
homemanager/neovim/lua/plugins/spec/supermaven.lua
Normal file
@@ -0,0 +1,6 @@
|
||||
return {
|
||||
enabled = true,
|
||||
"supermaven-inc/supermaven-nvim",
|
||||
-- lazy = false,
|
||||
opts = {}
|
||||
}
|
||||
5297
homemanager/neovim/lua/plugins/spec/telescope-picker/emojis.txt
Normal file
5297
homemanager/neovim/lua/plugins/spec/telescope-picker/emojis.txt
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,24 @@
|
||||
local M = {}
|
||||
|
||||
M.find_directories = function()
|
||||
local pickers = require("telescope.pickers")
|
||||
local finders = require("telescope.finders")
|
||||
local conf = require("telescope.config").values
|
||||
|
||||
pickers.new({}, {
|
||||
prompt_title = "Finde Directories",
|
||||
__locations_input = true,
|
||||
finder = finders.new_oneshot_job({ "find", "-type", "d" }, {
|
||||
entry_maker = function(entry)
|
||||
return {
|
||||
value = entry,
|
||||
display = ' ' .. entry,
|
||||
ordinal = entry,
|
||||
}
|
||||
end
|
||||
}),
|
||||
sorter = conf.file_sorter()
|
||||
}):find()
|
||||
end
|
||||
|
||||
return M
|
||||
@@ -0,0 +1,101 @@
|
||||
local pickers = require("telescope.pickers")
|
||||
local finders = require("telescope.finders")
|
||||
local conf = require("telescope.config").values
|
||||
local actions = require("telescope.actions")
|
||||
local action_state = require("telescope.actions.state")
|
||||
|
||||
local M = {}
|
||||
|
||||
local function trim(s)
|
||||
return (string.gsub(s, "^%s*(.-)%s*$", "%1"))
|
||||
end
|
||||
|
||||
local function parse_emoji_line(line)
|
||||
if not line or vim.startswith(line, "#") then
|
||||
return nil
|
||||
end
|
||||
|
||||
local id_element_split = vim.split(line, ";")
|
||||
local element = id_element_split[2]
|
||||
|
||||
if not element then
|
||||
return nil
|
||||
end
|
||||
|
||||
local state_emoji_split = vim.split(element, "#")
|
||||
local qualified = state_emoji_split[1]
|
||||
local emoji = state_emoji_split[2]
|
||||
|
||||
if not qualified or trim(qualified) ~= "fully-qualified" then
|
||||
return nil
|
||||
end
|
||||
|
||||
if not emoji then
|
||||
return nil
|
||||
end
|
||||
|
||||
local icon_description_split = vim.split(emoji, " ")
|
||||
local icon = icon_description_split[2]
|
||||
local description = icon_description_split[4]
|
||||
|
||||
if not description then
|
||||
return nil
|
||||
end
|
||||
|
||||
return {
|
||||
display = trim(icon) .. " " .. trim(description),
|
||||
value = trim(icon)
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
function M.find_emojis()
|
||||
local path = vim.fn.stdpath("config") .. "/lua/plugins/spec/telescope-picker/emojis.txt"
|
||||
print(path)
|
||||
local file = io.open(path, "r")
|
||||
|
||||
if not file then
|
||||
print("Emoji File not found")
|
||||
return nil
|
||||
end
|
||||
|
||||
local t = {}
|
||||
for line in file:lines() do
|
||||
local parsed_line = parse_emoji_line(line)
|
||||
if parsed_line then
|
||||
table.insert(t, parsed_line)
|
||||
end
|
||||
end
|
||||
|
||||
file:close()
|
||||
|
||||
local finder = finders.new_table({
|
||||
results = t,
|
||||
entry_maker = function(entry)
|
||||
return {
|
||||
value = entry.value,
|
||||
display = entry.display,
|
||||
ordinal = entry.display,
|
||||
}
|
||||
end
|
||||
})
|
||||
|
||||
pickers.new(conf, {
|
||||
prompt_title = "Find Emojis",
|
||||
finder = finder,
|
||||
sorter = conf.generic_sorter(t),
|
||||
attach_mappings = function(prompt_bufnr, _)
|
||||
actions.select_default:replace(function()
|
||||
actions.close(prompt_bufnr)
|
||||
local selection = action_state.get_selected_entry()
|
||||
local buf = vim.api.nvim_get_current_buf()
|
||||
local cursor = vim.api.nvim_win_get_cursor(0)
|
||||
vim.api.nvim_buf_set_text(buf, cursor[1] - 1, cursor[2], cursor[1] - 1, cursor[2], { selection.value })
|
||||
vim.api.nvim_win_set_cursor(0, { cursor[1], cursor[2] + 1 })
|
||||
end)
|
||||
return true
|
||||
end,
|
||||
}):find()
|
||||
end
|
||||
|
||||
return M
|
||||
@@ -0,0 +1,50 @@
|
||||
local M = {}
|
||||
|
||||
M.multi_grep = function(opts)
|
||||
local pickers = require("telescope.pickers")
|
||||
local finders = require("telescope.finders")
|
||||
local conf = require("telescope.config").values
|
||||
local make_entry = require "telescope.make_entry"
|
||||
opts = opts or {}
|
||||
opts.cwd = opts.cwd or vim.fn.getcwd()
|
||||
|
||||
local finder = finders.new_async_job {
|
||||
command_generator = function(prompt)
|
||||
if not prompt or prompt == "" then
|
||||
return nil
|
||||
end
|
||||
|
||||
local segments = vim.split(prompt, " ")
|
||||
local args = { "rg" }
|
||||
|
||||
if segments[1] then
|
||||
table.insert(args, "-e")
|
||||
table.insert(args, segments[1])
|
||||
end
|
||||
|
||||
if segments[2] then
|
||||
table.insert(args, "-g")
|
||||
table.insert(args, segments[2])
|
||||
end
|
||||
|
||||
return vim.tbl_flatten {
|
||||
args,
|
||||
{ "--color=never", "--no-heading", "--with-filename", "--line-number", "--column", "--smart-case" },
|
||||
}
|
||||
end,
|
||||
entry_maker = make_entry.gen_from_vimgrep(opts),
|
||||
cwd = opts.cwd,
|
||||
}
|
||||
|
||||
pickers.new({}, {
|
||||
debounce = 100,
|
||||
prompt_title = "Multi Grep",
|
||||
finder = finder,
|
||||
previewer = conf.grep_previewer(opts),
|
||||
sorter = require("telescope.sorters").empty(),
|
||||
}):find()
|
||||
end
|
||||
|
||||
M.multi_grep()
|
||||
|
||||
return M
|
||||
86
homemanager/neovim/lua/plugins/spec/telescope.lua
Normal file
86
homemanager/neovim/lua/plugins/spec/telescope.lua
Normal file
@@ -0,0 +1,86 @@
|
||||
local dropdown_configs = {
|
||||
layout_strategy = 'horizontal',
|
||||
layout_config = {
|
||||
prompt_position = 'bottom',
|
||||
horizontal = {
|
||||
width = 0.8,
|
||||
height = 100,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
local function find_files()
|
||||
require("telescope.builtin").find_files()
|
||||
end
|
||||
|
||||
local function find_references()
|
||||
require('telescope.builtin').lsp_references()
|
||||
end
|
||||
local function find_buffers()
|
||||
require('telescope.builtin').buffers()
|
||||
end
|
||||
|
||||
local function find_helptags()
|
||||
require('telescope.builtin').help_tags()
|
||||
end
|
||||
|
||||
local function find_text()
|
||||
require('telescope.builtin').live_grep()
|
||||
end
|
||||
|
||||
local function find_directories()
|
||||
require('plugins.spec.telescope-picker.find_directories').find_directories()
|
||||
end
|
||||
|
||||
local function find_grep()
|
||||
require('plugins.spec.telescope-picker.multi_grep').multi_grep()
|
||||
end
|
||||
|
||||
local function find_emojis()
|
||||
require('plugins.spec.telescope-picker.find_emojis').find_emojis()
|
||||
end
|
||||
|
||||
return {
|
||||
'nvim-telescope/telescope.nvim',
|
||||
config = function()
|
||||
require('telescope').setup({
|
||||
extensions = {
|
||||
['ui-select'] = {
|
||||
require('telescope.themes').get_dropdown(dropdown_configs),
|
||||
},
|
||||
},
|
||||
pickers = {
|
||||
find_files = {
|
||||
hidden = true,
|
||||
find_command = { 'rg', '--files', '--hidden', '--glob', '!**/.git/*' },
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
require('telescope').load_extension('ui-select')
|
||||
|
||||
vim.api.nvim_create_user_command("FindPluginFiles", function()
|
||||
require('telescope.builtin').find_files({
|
||||
cwd = vim.fs.joinpath(vim.fn.stdpath('data'), 'lazy'),
|
||||
})
|
||||
end, {})
|
||||
|
||||
vim.api.nvim_create_user_command("FindEmojis", function()
|
||||
find_emojis()
|
||||
end, {})
|
||||
end,
|
||||
keys = {
|
||||
{ '<leader>ff', find_files, desc = "(f)ind (f)iles" },
|
||||
{ '<leader>gr', find_references, desc = "(g)o to (r)eferences" },
|
||||
{ '<leader>fg', find_grep, desc = "(f)ind (g)rep" },
|
||||
{ '<leader>fb', find_buffers, desc = "(f)ind (b)uffers" },
|
||||
{ '<leader>fht', find_helptags, desc = "(f)ind (b)elp tags" },
|
||||
{ '<leader>fd', find_directories, desc = "(f)ind (d)irectories" },
|
||||
},
|
||||
cmd = { "Telescope", "FindPluginFiles", "FindEmojis" },
|
||||
dependencies = {
|
||||
'nvim-telescope/telescope-ui-select.nvim',
|
||||
'nvim-lua/plenary.nvim',
|
||||
'kyazdani42/nvim-web-devicons',
|
||||
}
|
||||
}
|
||||
43
homemanager/neovim/lua/plugins/spec/theme.lua
Normal file
43
homemanager/neovim/lua/plugins/spec/theme.lua
Normal file
@@ -0,0 +1,43 @@
|
||||
return {
|
||||
{
|
||||
'catppuccin/nvim',
|
||||
as = 'catppuccin',
|
||||
config = function()
|
||||
require("catppuccin").setup {
|
||||
flavour = "mocha",
|
||||
transparent_background = true
|
||||
}
|
||||
-- vim.cmd [[ colorscheme catppuccin ]]
|
||||
end
|
||||
},
|
||||
{
|
||||
'EdenEast/nightfox.nvim',
|
||||
config = function()
|
||||
require('nightfox').setup {
|
||||
options = { transparent = true }
|
||||
}
|
||||
|
||||
-- vim.cmd [[ colorscheme nightfox ]]
|
||||
end,
|
||||
},
|
||||
{
|
||||
'navarasu/onedark.nvim',
|
||||
config = function()
|
||||
require('onedark').setup {
|
||||
transparent = true,
|
||||
lualine = {
|
||||
transparent = true
|
||||
}
|
||||
}
|
||||
|
||||
-- vim.cmd [[ colorscheme onedark ]]
|
||||
end
|
||||
},
|
||||
{
|
||||
'shaunsingh/nord.nvim',
|
||||
config = function()
|
||||
vim.g.nord_disable_background = true
|
||||
vim.cmd [[colorscheme nord]]
|
||||
end
|
||||
}
|
||||
}
|
||||
78
homemanager/neovim/lua/plugins/spec/treesitter.lua
Normal file
78
homemanager/neovim/lua/plugins/spec/treesitter.lua
Normal file
@@ -0,0 +1,78 @@
|
||||
return {
|
||||
{
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
build = ':TSUpdate',
|
||||
event = { "BufReadPost", "BufNewFile" },
|
||||
config = function()
|
||||
require("nvim-treesitter.configs").setup {
|
||||
ensure_installed = {
|
||||
"lua",
|
||||
"typescript",
|
||||
"javascript",
|
||||
"css",
|
||||
"html",
|
||||
"json",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"yaml",
|
||||
"rust",
|
||||
"python",
|
||||
"gdscript",
|
||||
"vue",
|
||||
"toml",
|
||||
},
|
||||
highlight = {
|
||||
enable = true
|
||||
},
|
||||
indent = {
|
||||
enable = true
|
||||
}
|
||||
}
|
||||
end,
|
||||
dependencies = {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||
config = function()
|
||||
require("nvim-treesitter.configs").setup {
|
||||
textobjects = {
|
||||
select = {
|
||||
enable = true,
|
||||
lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim
|
||||
keymaps = {
|
||||
-- You can use the capture groups defined in textobjects.scm
|
||||
["afn"] = "@function.outer",
|
||||
["ifn"] = "@function.inner",
|
||||
["acl"] = "@class.outer",
|
||||
["icl"] = "@class.inner",
|
||||
["icm"] = "@comment.inner",
|
||||
["acm"] = "@comment.outer",
|
||||
["ib"] = "@block.inner",
|
||||
["ab"] = "@block.outer",
|
||||
["la"] = "@assignment.lhs",
|
||||
["ra"] = "@assignment.lhs"
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
},
|
||||
}
|
||||
},
|
||||
{
|
||||
'nvim-treesitter/nvim-treesitter-context',
|
||||
event = { "BufReadPost", "BufNewFile" },
|
||||
opts = {
|
||||
enable = true, -- Enable this plugin (Can be enabled/disabled later via commands)
|
||||
max_lines = 0, -- How many lines the window should span. Values <= 0 mean no limit.
|
||||
min_window_height = 0, -- Minimum editor window height to enable context. Values <= 0 mean no limit.
|
||||
line_numbers = true,
|
||||
multiline_threshold = 20, -- Maximum number of lines to collapse for a single context line
|
||||
trim_scope = 'outer', -- Which context lines to discard if `max_lines` is exceeded. Choices: 'inner', 'outer'
|
||||
mode = 'cursor', -- Line used to calculate context. Choices: 'cursor', 'topline'
|
||||
-- Separator between context and content. Should be a single character string, like '-'.
|
||||
-- When separator is set, the context will only show up when there are at least 2 lines above cursorline.
|
||||
separator = nil,
|
||||
zindex = 20, -- The Z-index of the context window
|
||||
}
|
||||
},
|
||||
}
|
||||
25
homemanager/neovim/lua/plugins/spec/trouble.lua
Normal file
25
homemanager/neovim/lua/plugins/spec/trouble.lua
Normal file
@@ -0,0 +1,25 @@
|
||||
return {
|
||||
"folke/trouble.nvim",
|
||||
dependencies = "nvim-tree/nvim-web-devicons",
|
||||
config = function()
|
||||
require("trouble").setup {}
|
||||
end,
|
||||
init = function()
|
||||
vim.api.nvim_create_autocmd("BufRead", {
|
||||
callback = function(ev)
|
||||
if vim.bo[ev.buf].buftype == "quickfix" then
|
||||
vim.schedule(function()
|
||||
vim.cmd([[cclose]])
|
||||
vim.cmd([[Trouble qflist open]])
|
||||
end)
|
||||
end
|
||||
end,
|
||||
})
|
||||
end,
|
||||
cmd = { "Trouble" },
|
||||
keys = {
|
||||
{ "<leader>dl", vim.diagnostic.setqflist, "(d)iagnostic (l)ist" },
|
||||
{ "<leader>qn", vim.cmd.cnext, "(q)uickfix (n)ext" },
|
||||
{ "<leader>qp", vim.cmd.cprev, "(q)uickfix (p)revious" },
|
||||
}
|
||||
}
|
||||
21
homemanager/neovim/lua/plugins/spec/vimtex.lua
Normal file
21
homemanager/neovim/lua/plugins/spec/vimtex.lua
Normal file
@@ -0,0 +1,21 @@
|
||||
function preview()
|
||||
if vim.bo.filetype ~= "tex" then
|
||||
return
|
||||
end
|
||||
|
||||
print("Previewing " .. vim.fn.expand("%:p"))
|
||||
|
||||
vim.cmd("VimtexCompile")
|
||||
end
|
||||
|
||||
return {
|
||||
'lervag/vimtex',
|
||||
-- event = "InsertEnter",
|
||||
config = function()
|
||||
vim.g.vimtex_view_method = "zathura"
|
||||
vim.keymap.set("n", "<leader>p", preview)
|
||||
end,
|
||||
lazy = false,
|
||||
enabled = true,
|
||||
dependencies = {}
|
||||
}
|
||||
14
homemanager/neovim/projects/docki-cli.lua
Normal file
14
homemanager/neovim/projects/docki-cli.lua
Normal file
@@ -0,0 +1,14 @@
|
||||
local dap = require("dap")
|
||||
|
||||
dap.configurations.rust = {
|
||||
{
|
||||
name = 'somethign',
|
||||
type = 'lldb',
|
||||
request = 'launch',
|
||||
program = function()
|
||||
return vim.fn.getcwd() .. '/target/debug/docki'
|
||||
end,
|
||||
cwd = "${workspaceFolder}",
|
||||
stopOnEntry = false
|
||||
}
|
||||
}
|
||||
26
homemanager/nushell.nix
Normal file
26
homemanager/nushell.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options = {
|
||||
modules.nushell.enable = lib.mkEnableOption "nushell";
|
||||
};
|
||||
config = lib.mkIf config.modules.nushell.enable {
|
||||
programs.nushell = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
$env.config = {
|
||||
show_banner: false
|
||||
edit_mode: vi
|
||||
}
|
||||
'';
|
||||
shellAliases = {
|
||||
v = "steam-run nvim";
|
||||
nix-dev = "nix develop --command fish";
|
||||
nix-shell = "nix-shell --command 'fish'";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
125
homemanager/starship.nix
Normal file
125
homemanager/starship.nix
Normal file
@@ -0,0 +1,125 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
theme = import lib/theme.nix;
|
||||
starshipLib.toLanguageConfig = symbol: {
|
||||
symbol = symbol;
|
||||
style = "bg:language";
|
||||
format = "[ $symbol ($version) ]($style)";
|
||||
};
|
||||
in
|
||||
{
|
||||
options = {
|
||||
modules.starship.enable = lib.mkEnableOption "enables starship";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.modules.starship.enable {
|
||||
programs.starship.enable = true;
|
||||
programs.starship.settings = {
|
||||
palette = "default";
|
||||
format = lib.concatStrings [
|
||||
"[](bg: secondary)"
|
||||
"$os"
|
||||
"[](fg:secondary bg:primary)"
|
||||
"$directory"
|
||||
"[](fg:primary bg:#FCA17D)"
|
||||
"$git_branch"
|
||||
"$git_status"
|
||||
"[](fg:#FCA17D bg:language)"
|
||||
"$c"
|
||||
"$elixir"
|
||||
"$elm"
|
||||
"$golang"
|
||||
"$gradle"
|
||||
"$haskell"
|
||||
"$java"
|
||||
"$julia"
|
||||
"$nodejs"
|
||||
"$nim"
|
||||
"$rust"
|
||||
"$scala"
|
||||
"$nix_shell"
|
||||
"[ ](fg:language)"
|
||||
];
|
||||
|
||||
right_format = "$cmd_duration";
|
||||
|
||||
os = {
|
||||
style = "bg:secondary";
|
||||
disabled = false; # Disabled by default
|
||||
|
||||
symbols = {
|
||||
NixOS = " ";
|
||||
};
|
||||
};
|
||||
|
||||
directory = {
|
||||
style = "bg:primary fg:primary-foreground";
|
||||
format = "[ $path ]($style)";
|
||||
truncation_length = 1;
|
||||
truncation_symbol = "";
|
||||
};
|
||||
|
||||
directory.substitutions = {
|
||||
"Documents" = " Documents";
|
||||
"Downloads" = " Downloads";
|
||||
"Music" = " Music";
|
||||
"Pictures" = " Pictures";
|
||||
};
|
||||
|
||||
nim = starshipLib.toLanguageConfig " ";
|
||||
rust = starshipLib.toLanguageConfig "";
|
||||
java = starshipLib.toLanguageConfig " ";
|
||||
golang = starshipLib.toLanguageConfig " ";
|
||||
c = starshipLib.toLanguageConfig " ";
|
||||
elixir = starshipLib.toLanguageConfig " ";
|
||||
elm = starshipLib.toLanguageConfig " ";
|
||||
gradle = starshipLib.toLanguageConfig " ";
|
||||
haskell = starshipLib.toLanguageConfig " ";
|
||||
julia = starshipLib.toLanguageConfig " ";
|
||||
nodejs = starshipLib.toLanguageConfig "";
|
||||
scala = starshipLib.toLanguageConfig " ";
|
||||
|
||||
nix_shell = {
|
||||
symbol = " ";
|
||||
style = "bg:language";
|
||||
format = "[ $symbol$state( \($name\))]($style)";
|
||||
unknown_msg = "nix-shell";
|
||||
};
|
||||
|
||||
git_branch = {
|
||||
symbol = "";
|
||||
style = "bg:#FCA17D";
|
||||
format = "[ $symbol $branch ]($style)";
|
||||
};
|
||||
|
||||
git_status = {
|
||||
style = "bg:#FCA17D";
|
||||
format = "[ $all_status$ahead_behind ]($style)";
|
||||
};
|
||||
|
||||
cmd_duration = {
|
||||
min_time = 1000;
|
||||
style = "bg:secondary";
|
||||
format = ''
|
||||
[](bg: secondary)
|
||||
[ $duration ]($style)
|
||||
[](fg:secondary)
|
||||
'';
|
||||
};
|
||||
|
||||
palettes.default = {
|
||||
primary = theme.primary;
|
||||
secondary = theme.secondary;
|
||||
accent = theme.accent;
|
||||
primary-foreground = theme.primary-foreground;
|
||||
git = theme.git;
|
||||
language = theme.language;
|
||||
docker = theme.docker;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
27
homemanager/terminal_emulators/ghostty.nix
Normal file
27
homemanager/terminal_emulators/ghostty.nix
Normal file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
configHome = "${config.home.homeDirectory}/.config/dotfiles/homes/quirinecker";
|
||||
in
|
||||
{
|
||||
options = {
|
||||
modules.terminalEmulators.ghostty.enable = lib.mkEnableOption "ghostty";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.modules.terminalEmulators.ghostty.enable {
|
||||
home.packages = [
|
||||
pkgs.ghostty
|
||||
pkgs.nerd-fonts.profont
|
||||
pkgs.nerd-fonts.heavy-data
|
||||
pkgs.meslo-lgs-nf
|
||||
];
|
||||
xdg.configFile = {
|
||||
"ghostty/config".source =
|
||||
config.lib.file.mkOutOfStoreSymlink ./ghostty/ghostty;
|
||||
};
|
||||
};
|
||||
}
|
||||
80
homemanager/terminal_emulators/ghostty/config
Normal file
80
homemanager/terminal_emulators/ghostty/config
Normal file
@@ -0,0 +1,80 @@
|
||||
theme = Nord
|
||||
window-decoration = false
|
||||
gtk-tabs-location = hidden
|
||||
background-opacity = 0.8
|
||||
window-padding-x = 20
|
||||
window-padding-y = 20
|
||||
cursor-style = bar
|
||||
font-family = ProFont IIx Nerd Font
|
||||
# font-family-bold = MesloLGS NF Bold
|
||||
# font-family-italic = MesloLGS NF Italic
|
||||
# font-family-bold-italic = MesloLGS NF Bold Italic
|
||||
font-style = false
|
||||
font-feature = "ss01"
|
||||
font-feature = "ss02"
|
||||
font-feature = "ss03"
|
||||
font-feature = "ss04"
|
||||
font-feature = "-liga, -calt, -dlig"
|
||||
|
||||
shell-integration = fish
|
||||
shell-integration-features = no-cursor
|
||||
|
||||
keybind = clear
|
||||
keybind = ctrl+comma=open_config
|
||||
keybind = shift+insert=paste_from_selection
|
||||
keybind = ctrl+page_down=next_tab
|
||||
keybind = ctrl+shift+v=paste_from_clipboard
|
||||
keybind = ctrl+alt+up=goto_split:up
|
||||
keybind = ctrl+shift+a=select_all
|
||||
keybind = super+ctrl+shift+plus=equalize_splits
|
||||
keybind = shift+up=adjust_selection:up
|
||||
keybind = alt+five=goto_tab:5
|
||||
keybind = super+ctrl+right_bracket=goto_split:next
|
||||
keybind = ctrl+equal=increase_font_size:1
|
||||
keybind = ctrl+shift+o=new_split:right
|
||||
keybind = ctrl+shift+c=copy_to_clipboard
|
||||
keybind = ctrl+shift+q=quit
|
||||
keybind = ctrl+shift+n=new_window
|
||||
keybind = ctrl+shift+page_down=jump_to_prompt:1
|
||||
keybind = ctrl+shift+comma=reload_config
|
||||
keybind = ctrl+minus=decrease_font_size:1
|
||||
keybind = shift+left=adjust_selection:left
|
||||
keybind = super+ctrl+shift+up=resize_split:up,10
|
||||
keybind = alt+eight=goto_tab:8
|
||||
keybind = shift+page_up=scroll_page_up
|
||||
keybind = ctrl+alt+shift+j=write_screen_file:open
|
||||
keybind = ctrl+shift+left=previous_tab
|
||||
keybind = ctrl+shift+w=close_tab
|
||||
keybind = shift+end=scroll_to_bottom
|
||||
keybind = ctrl+zero=reset_font_size
|
||||
keybind = alt+three=goto_tab:3
|
||||
keybind = ctrl+shift+j=write_screen_file:paste
|
||||
keybind = ctrl+page_up=previous_tab
|
||||
keybind = shift+right=adjust_selection:right
|
||||
keybind = ctrl+tab=next_tab
|
||||
keybind = ctrl+alt+left=goto_split:left
|
||||
keybind = shift+page_down=scroll_page_down
|
||||
keybind = ctrl+shift+right=next_tab
|
||||
keybind = ctrl+shift+page_up=jump_to_prompt:-1
|
||||
keybind = alt+nine=last_tab
|
||||
keybind = ctrl+shift+t=new_tab
|
||||
keybind = shift+down=adjust_selection:down
|
||||
keybind = super+ctrl+shift+left=resize_split:left,10
|
||||
keybind = ctrl+shift+tab=previous_tab
|
||||
keybind = alt+two=goto_tab:2
|
||||
keybind = ctrl+alt+down=goto_split:down
|
||||
keybind = super+ctrl+shift+down=resize_split:down,10
|
||||
keybind = super+ctrl+shift+right=resize_split:right,10
|
||||
keybind = ctrl+plus=increase_font_size:1
|
||||
keybind = alt+four=goto_tab:4
|
||||
keybind = ctrl+insert=copy_to_clipboard
|
||||
keybind = ctrl+shift+e=new_split:down
|
||||
keybind = ctrl+alt+right=goto_split:right
|
||||
keybind = alt+f4=close_window
|
||||
keybind = alt+one=goto_tab:1
|
||||
keybind = ctrl+shift+enter=toggle_split_zoom
|
||||
keybind = shift+home=scroll_to_top
|
||||
keybind = super+ctrl+left_bracket=goto_split:previous
|
||||
keybind = ctrl+shift+i=inspector:toggle
|
||||
keybind = alt+six=goto_tab:6
|
||||
keybind = alt+seven=goto_tab:7
|
||||
31
homemanager/terminal_emulators/kitty.nix
Normal file
31
homemanager/terminal_emulators/kitty.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
{ lib, config, ... }:
|
||||
{
|
||||
options = {
|
||||
modules.terminalEmulators.kitty.enable = lib.mkEnableOption "kitty";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.modules.terminalEmulators.kitty.enable {
|
||||
programs.kitty.enable = true;
|
||||
programs.kitty.settings = {
|
||||
shell = "fish";
|
||||
font_family = "MesloLGS NF";
|
||||
bold_font = "auto";
|
||||
italic_font = "auto";
|
||||
bold_italic_font = "auto";
|
||||
font_size = 12;
|
||||
background_opacity = 0.4;
|
||||
draw_minimal_borders = "yes";
|
||||
window_padding_width = 14;
|
||||
window_border_width = 0;
|
||||
hide_window_decorations = "yes";
|
||||
titlebar-only = "yes";
|
||||
active_border_color = "none";
|
||||
active_tab_title_template = "{fmt.fg._fff}{title}";
|
||||
active_tab_foreground = "#fff";
|
||||
active_tab_font_style = "bold-italic";
|
||||
active_tab_background = "#8631B4";
|
||||
inactive_tab_foreground = "#c2c2c2";
|
||||
inactive_tab_background = "#8631B4";
|
||||
};
|
||||
};
|
||||
}
|
||||
17
homemanager/terminal_emulators/wezterm.nix
Normal file
17
homemanager/terminal_emulators/wezterm.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{ lib, config, ... }:
|
||||
let
|
||||
configHome = "${config.home.homeDirectory}/.config/dotfiles/homes/quirinecker";
|
||||
in
|
||||
{
|
||||
options = {
|
||||
modules.terminalEmulators.wezterm.enable = lib.mkEnableOption "kitty";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.modules.terminalEmulators.wezterm.enable {
|
||||
programs.wezterm.enable = true;
|
||||
xdg.configFile = {
|
||||
"wezterm/wezterm.lua".source =
|
||||
config.lib.file.mkOutOfStoreSymlink ./wezterm/wezterm.lua;
|
||||
};
|
||||
};
|
||||
}
|
||||
17
homemanager/terminal_emulators/wezterm/wezterm.lua
Normal file
17
homemanager/terminal_emulators/wezterm/wezterm.lua
Normal file
@@ -0,0 +1,17 @@
|
||||
local wezterm = require('wezterm')
|
||||
|
||||
local config = wezterm.config_builder()
|
||||
|
||||
config.color_scheme = 'nightfox'
|
||||
-- config.default_cwd = '~/.config'
|
||||
config.window_decorations = 'NONE'
|
||||
config.enable_tab_bar = false
|
||||
config.default_prog = { 'fish' }
|
||||
config.enable_wayland = false
|
||||
config.front_end = 'WebGpu'
|
||||
config.colors = {
|
||||
background = 'rgba(43 48 59 50%)'
|
||||
}
|
||||
config.automatically_reload_config = false
|
||||
|
||||
return config
|
||||
51
homemanager/theme.nix
Normal file
51
homemanager/theme.nix
Normal file
@@ -0,0 +1,51 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options = {
|
||||
modules.theme.enable = lib.mkEnableOption "theme";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.modules.theme.enable {
|
||||
gtk = {
|
||||
enable = true;
|
||||
cursorTheme = {
|
||||
name = "Bibata-Modern-Classic";
|
||||
package = pkgs.bibata-cursors;
|
||||
size = 24;
|
||||
};
|
||||
iconTheme = {
|
||||
name = "Adwaita";
|
||||
package = pkgs.adwaita-icon-theme;
|
||||
};
|
||||
theme = {
|
||||
name = "Adwaita-dark";
|
||||
package = pkgs.gnome-themes-extra;
|
||||
};
|
||||
};
|
||||
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme.name = "adwaita";
|
||||
style.name = "adwaita-dark";
|
||||
};
|
||||
|
||||
dconf.settings = {
|
||||
"org/gnome/desktop/interface" = {
|
||||
color-scheme = "prefer-dark";
|
||||
};
|
||||
};
|
||||
|
||||
home.pointerCursor = {
|
||||
gtk.enable = true;
|
||||
x11.enable = true;
|
||||
package = pkgs.bibata-cursors;
|
||||
name = "Bibata-Modern-Classic";
|
||||
size = 24;
|
||||
hyprcursor.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
13
homemanager/tms/config.toml
Normal file
13
homemanager/tms/config.toml
Normal file
@@ -0,0 +1,13 @@
|
||||
clone_repo_switch = "Always"
|
||||
|
||||
[[search_dirs]]
|
||||
path = "/home/quirinecker/projects"
|
||||
depth = 10
|
||||
|
||||
[[search_dirs]]
|
||||
path = "/home/quirinecker/.config"
|
||||
depth = 10
|
||||
|
||||
[[search_dirs]]
|
||||
path = "/home/quirinecker/tmp/projects/"
|
||||
depth = 10
|
||||
54
homemanager/tmux.nix
Normal file
54
homemanager/tmux.nix
Normal file
@@ -0,0 +1,54 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
configHome = "${config.home.homeDirectory}/.config/dotfiles/homes/quirinecker";
|
||||
in
|
||||
{
|
||||
options = {
|
||||
modules.tmux.enable = lib.mkEnableOption "tmux";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.modules.tmux.enable {
|
||||
programs.tmux.enable = true;
|
||||
|
||||
programs.tmux.extraConfig = ''
|
||||
set -sg escape-time 0
|
||||
set -g base-index 1
|
||||
set -g default-terminal "screen-256color"
|
||||
unbind C-o
|
||||
unbind C-j
|
||||
bind C-j display-popup -E "tms switch"
|
||||
bind C-o display-popup -E "tms"
|
||||
set-option -g mode-keys vi
|
||||
set -g mouse on
|
||||
'';
|
||||
|
||||
programs.tmux.plugins = [
|
||||
pkgs.tmuxPlugins.nord
|
||||
{
|
||||
plugin = pkgs.tmuxPlugins.resurrect;
|
||||
extraConfig = "set -g @resurrect-strategy-nvim 'session'";
|
||||
}
|
||||
{
|
||||
plugin = pkgs.tmuxPlugins.continuum;
|
||||
extraConfig = ''
|
||||
set -g @continuum-restore 'on'
|
||||
set -g @continuum-save-interval '1' # minutes
|
||||
'';
|
||||
}
|
||||
];
|
||||
|
||||
home.packages = [
|
||||
pkgs.tmux-sessionizer
|
||||
];
|
||||
|
||||
xdg.configFile = {
|
||||
"tms/config.toml".source =
|
||||
./tms/config.toml;
|
||||
};
|
||||
};
|
||||
}
|
||||
84
homemanager/utilities.nix
Normal file
84
homemanager/utilities.nix
Normal file
@@ -0,0 +1,84 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
inputs.zen-browser.homeModules.beta
|
||||
];
|
||||
|
||||
options = {
|
||||
modules.utilities.enable = lib.mkEnableOption "utilities";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.modules.utilities.enable {
|
||||
programs.zen-browser.enable = true;
|
||||
programs.firefox.enable = true;
|
||||
|
||||
programs.nh = {
|
||||
enable = true;
|
||||
# clean.enable = true;
|
||||
# clean.extraArgs = "--keep-since 4d --keep 3";
|
||||
flake = "${config.home.homeDirectory}/.config/dotfiles";
|
||||
};
|
||||
|
||||
services.nextcloud-client = {
|
||||
enable = true;
|
||||
startInBackground = true;
|
||||
package = pkgs.nextcloud-client;
|
||||
};
|
||||
home.packages = [
|
||||
|
||||
# note taking
|
||||
pkgs.rnote
|
||||
pkgs.saber
|
||||
pkgs.playerctl
|
||||
|
||||
# tools
|
||||
pkgs.imagemagick
|
||||
pkgs.meld
|
||||
pkgs.entr
|
||||
pkgs.wl-clipboard
|
||||
pkgs.steam-run
|
||||
|
||||
# editors
|
||||
pkgs.zed-editor
|
||||
pkgs.vscode
|
||||
|
||||
# browsers
|
||||
pkgs.chromium
|
||||
|
||||
# others
|
||||
pkgs.libreoffice-qt
|
||||
pkgs.gimp
|
||||
|
||||
# language interpreters / compilers
|
||||
pkgs.bun
|
||||
pkgs.python3
|
||||
pkgs.typescript
|
||||
|
||||
# Gnome Packages
|
||||
pkgs.gnome-calendar
|
||||
pkgs.gnome-contacts
|
||||
pkgs.gnome-calculator
|
||||
pkgs.gnome-font-viewer
|
||||
pkgs.gnome-system-monitor
|
||||
pkgs.geary
|
||||
pkgs.nautilus
|
||||
|
||||
# social
|
||||
pkgs.discord
|
||||
pkgs.signal-desktop
|
||||
pkgs.spotify
|
||||
|
||||
# language interpreters / compilers
|
||||
pkgs.bun
|
||||
pkgs.python3
|
||||
pkgs.typescript
|
||||
pkgs.typst
|
||||
];
|
||||
};
|
||||
}
|
||||
51
homemanager/walker.nix
Normal file
51
homemanager/walker.nix
Normal file
@@ -0,0 +1,51 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
system,
|
||||
...
|
||||
}:
|
||||
let
|
||||
configHome = "${config.home.homeDirectory}/.config/dotfiles/homes/quirinecker";
|
||||
providerOptions = {
|
||||
desktopapplications = "Desktop application launcher";
|
||||
files = "File search and management";
|
||||
clipboard = "Clipboard history management";
|
||||
runner = "Command runner";
|
||||
symbols = "Symbols and emojis";
|
||||
calc = "Calculator and unit conversion";
|
||||
menus = "Custom menu system";
|
||||
providerlist = "Provider listing and management";
|
||||
websearch = "Web search integration";
|
||||
todo = "Todo list";
|
||||
unicode = "Unicode symbol search";
|
||||
bluetooth = "Basic Bluetooth management";
|
||||
};
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
inputs.walker.homeManagerModules.walker
|
||||
|
||||
];
|
||||
options = {
|
||||
modules.walker.enable = lib.mkEnableOption "walker";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.modules.walker.enable {
|
||||
programs.walker.enable = true;
|
||||
programs.walker.config = lib.trivial.importTOML ./walker/walker.toml;
|
||||
|
||||
home.packages = [
|
||||
pkgs.libqalculate
|
||||
];
|
||||
|
||||
xdg.configFile = {
|
||||
"elephant/menus/pw.toml".source = ./walker/elephant/menus/pw.toml;
|
||||
"elephant/elephant.toml".source = ./walker/elephant.toml;
|
||||
# "walker/plugins".source =
|
||||
# config.lib.file.mkOutOfStoreSymlink "${configHome}/.config/walker/plugins";
|
||||
# "walker/themes".source = config.lib.file.mkOutOfStoreSymlink "${configHome}/.config/walker/themes";
|
||||
};
|
||||
};
|
||||
}
|
||||
1
homemanager/walker/elephant.toml
Normal file
1
homemanager/walker/elephant.toml
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
10
homemanager/walker/elephant/menus/pw.toml
Normal file
10
homemanager/walker/elephant/menus/pw.toml
Normal file
@@ -0,0 +1,10 @@
|
||||
name = "pw"
|
||||
name_pretty = "Power"
|
||||
icon = "Power"
|
||||
global_search = true
|
||||
|
||||
[[entries]]
|
||||
text = "Shutdown"
|
||||
keywords = ["color", "picker", "hypr"]
|
||||
actions = { "cp_use" = "wl-copy $(hyprpicker)" }
|
||||
icon = "system-shutdown"
|
||||
116
homemanager/walker/walker.toml
Normal file
116
homemanager/walker/walker.toml
Normal file
@@ -0,0 +1,116 @@
|
||||
monitor = ""
|
||||
as_window = false
|
||||
timeout = 0
|
||||
disable_click_to_close = false
|
||||
force_keyboard_focus = false
|
||||
|
||||
[list]
|
||||
keyboard_scroll_style = "vim"
|
||||
max_entries = 50
|
||||
show_initial_entries = true
|
||||
single_click = true
|
||||
visibility_threshold = 20
|
||||
placeholder = "No Results"
|
||||
|
||||
[keybinds]
|
||||
next = ["ctrl n", "Down"]
|
||||
previous = ["ctrl p", "Up"]
|
||||
quick_activate = []
|
||||
|
||||
[providers]
|
||||
default = [
|
||||
"desktopapplications",
|
||||
"calc",
|
||||
"runner",
|
||||
"websearch",
|
||||
"menus",
|
||||
"pw"
|
||||
]
|
||||
|
||||
[[providers.prefixes]]
|
||||
prefix = ";"
|
||||
provider = "providerlist"
|
||||
|
||||
[[providers.prefixes]]
|
||||
prefix = "/"
|
||||
provider = "files"
|
||||
|
||||
[[providers.prefixes]]
|
||||
prefix = "."
|
||||
provider = "symbols"
|
||||
|
||||
[[providers.prefixes]]
|
||||
prefix = "!"
|
||||
provider = "todo"
|
||||
|
||||
[[providers.prefixes]]
|
||||
prefix = "="
|
||||
provider = "calc"
|
||||
|
||||
[[providers.prefixes]]
|
||||
prefix = "@"
|
||||
provider = "websearch"
|
||||
|
||||
[[providers.prefixes]]
|
||||
prefix = ":"
|
||||
provider = "clipboard"
|
||||
|
||||
[[providers.prefixes]]
|
||||
prefix = "pw "
|
||||
provider = "pw"
|
||||
|
||||
[providers.actions]
|
||||
desktopapplications = [
|
||||
{ action = "start", default = true, bind = "Return" },
|
||||
{ action = "start:keep", label = "open+next", bind = "shift Return", after = "KeepOpen" },
|
||||
{ action = "erase_history", label = "clear hist", bind = "ctrl h", after = "AsyncReload" },
|
||||
{ action = "pin", bind = "ctrl alt p", after = "AsyncReload" },
|
||||
{ action = "unpin", bind = "ctrl alt p", after = "AsyncReload" },
|
||||
{ action = "pinup", bind = "ctrl n", after = "AsyncReload" },
|
||||
{ action = "pindown", bind = "ctrl m", after = "AsyncReload" },
|
||||
]
|
||||
|
||||
[[plugins]]
|
||||
name = "wifi"
|
||||
prefix = "wifi "
|
||||
src_once = "node ~/.config/walker/plugins/wifi.cjs"
|
||||
parser = "kv"
|
||||
|
||||
[[plugins]]
|
||||
name = "power"
|
||||
prefix = "pw "
|
||||
keep_sort = false
|
||||
placeholder = "Power"
|
||||
recalculate_score = true
|
||||
show_icon_when_single = true
|
||||
switcher_only = true
|
||||
|
||||
[[plugins.entries]]
|
||||
label = "Shutdown"
|
||||
icon = "system-shutdown-symbolic"
|
||||
exec = "shutdown now"
|
||||
weight = 1
|
||||
|
||||
[[plugins.entries]]
|
||||
label = "Reboot"
|
||||
icon = "system-reboot-symbolic"
|
||||
exec = "reboot"
|
||||
weight = 2
|
||||
|
||||
[[plugins.entries]]
|
||||
label = "Sleep"
|
||||
icon = "weather-clear-night-symbolic"
|
||||
exec = "systemctl suspend"
|
||||
weight = 3
|
||||
|
||||
[[plugins.entries]]
|
||||
label = "Lock"
|
||||
icon = "system-lock-screen-symbolic"
|
||||
exec = "hyprlock"
|
||||
weight = 4
|
||||
|
||||
[[plugins.entries]]
|
||||
label = "Logout"
|
||||
icon = "system-log-out-symbolic"
|
||||
exec = "hyprctl dispatch exit"
|
||||
weight = 5
|
||||
Reference in New Issue
Block a user