Current working changes to configuration
This commit is contained in:
commit
0a24ffcef1
66 changed files with 5312 additions and 0 deletions
200
configuration.nix
Normal file
200
configuration.nix
Normal file
|
|
@ -0,0 +1,200 @@
|
|||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ config, pkgs, ... }:
|
||||
#let
|
||||
# sops-nix = builtins.fetchTarball {
|
||||
# # Pin this to a real commit rather than master.
|
||||
# url = "https://github.com/Mic92/sops-nix/archive/<COMMIT>.tar.gz";
|
||||
# sha256 = "<HASH>";
|
||||
# };
|
||||
#in
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
<home-manager/nixos>
|
||||
#"${sops-nix}/modules/sops"
|
||||
];
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
# Use latest kernel.
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
networking.hostName = "nixos"; # Define your hostname.
|
||||
networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/New_York";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_US.UTF-8";
|
||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||
LC_MEASUREMENT = "en_US.UTF-8";
|
||||
LC_MONETARY = "en_US.UTF-8";
|
||||
LC_NAME = "en_US.UTF-8";
|
||||
LC_NUMERIC = "en_US.UTF-8";
|
||||
LC_PAPER = "en_US.UTF-8";
|
||||
LC_TELEPHONE = "en_US.UTF-8";
|
||||
LC_TIME = "en_US.UTF-8";
|
||||
};
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver.xkb = {
|
||||
layout = "us";
|
||||
variant = "";
|
||||
};
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users."aselimov" = {
|
||||
isNormalUser = true;
|
||||
description = "Alex Selimov";
|
||||
extraGroups = [ "networkmanager" "wheel" "input" "uinput" ];
|
||||
packages = with pkgs; [];
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKhECKhmRPyFn63AXALvKEaRtvPQn6lWbA8p7jaymwSj alex@alexselimov.xyz"
|
||||
];
|
||||
};
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
htop
|
||||
killall
|
||||
pinentry-gnome3
|
||||
];
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
# programs.mtr.enable = true;
|
||||
# programs.gnupg.agent = {
|
||||
# enable = true;
|
||||
# enableSSHSupport = true;
|
||||
# };
|
||||
programs.niri.enable=true;
|
||||
|
||||
services.displayManager.regreet = {
|
||||
enable = true;
|
||||
cageArgs = [
|
||||
"-s"
|
||||
"-d"
|
||||
"-m"
|
||||
"last"
|
||||
];
|
||||
|
||||
settings = {
|
||||
appearance = {
|
||||
greeting_msg = "Welcome back!";
|
||||
};
|
||||
|
||||
widget.clock = {
|
||||
format = "%a %H:%M";
|
||||
};
|
||||
};
|
||||
};
|
||||
programs.git.enable=true;
|
||||
|
||||
services.keyd = {
|
||||
enable = true;
|
||||
keyboards = {
|
||||
laptop = {
|
||||
ids = [ "0001:0001"];
|
||||
|
||||
settings = {
|
||||
main = {
|
||||
leftalt = "leftmeta";
|
||||
leftmeta = "leftalt";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.zsh.enable = true;
|
||||
users.users = {
|
||||
aselimov.shell = pkgs.zsh;
|
||||
root.shell = pkgs.zsh;
|
||||
};
|
||||
|
||||
# Changes needed to get unfied super+c copy
|
||||
hardware.uinput.enable = true;
|
||||
boot.kernelModules = [
|
||||
"uinput"
|
||||
];
|
||||
|
||||
services.udev.extraRules = ''
|
||||
KERNEL=="uinput", GROUP="input", MODE:="0660", TAG+="uaccess", OPTIONS+="static_node=uinput"
|
||||
'';
|
||||
|
||||
virtualisation.podman = {
|
||||
enable = true;
|
||||
dockerSocket.enable=true;
|
||||
dockerCompat = true;
|
||||
defaultNetwork.settings.dns_enabled = true;
|
||||
};
|
||||
|
||||
# Set up doas
|
||||
|
||||
security.sudo.enable = false;
|
||||
security.doas = {
|
||||
enable = true;
|
||||
extraRules = [
|
||||
{
|
||||
users = [ "aselimov" ];
|
||||
keepEnv = true;
|
||||
persist = true;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
security.sudo-rs.execWheelOnly = false;
|
||||
|
||||
# List services that you want to enable:
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
services.openssh.enable = true;
|
||||
|
||||
# Open ports in the firewall.
|
||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
# Or disable the firewall altogether.
|
||||
# networking.firewall.enable = false;
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "26.05"; # Did you read the comment?
|
||||
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
|
||||
home-manager.users.aselimov = import ./home/aselimov/home.nix;
|
||||
home-manager.users.root = import ./home/root/home.nix;
|
||||
|
||||
# Getting gsettings working properly for systemd service
|
||||
environment.sessionVariables.XDG_DATA_DIRS = [
|
||||
"${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}"
|
||||
"${pkgs.gtk3}/share/gsettings-schemas/${pkgs.gtk3.name}"
|
||||
"${pkgs.gtk4}/share/gsettings-schemas/${pkgs.gtk4.name}"
|
||||
];
|
||||
}
|
||||
45
hardware-configuration.nix
Normal file
45
hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/mapper/luks-45dfbed5-ac16-4529-b851-2aa9a358e0b8";
|
||||
fsType = "btrfs";
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."luks-45dfbed5-ac16-4529-b851-2aa9a358e0b8".device = "/dev/disk/by-uuid/45dfbed5-ac16-4529-b851-2aa9a358e0b8";
|
||||
|
||||
fileSystems."/home" =
|
||||
{ device = "/dev/mapper/luks-45dfbed5-ac16-4529-b851-2aa9a358e0b8";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=home" ];
|
||||
};
|
||||
|
||||
fileSystems."/nix" =
|
||||
{ device = "/dev/mapper/luks-45dfbed5-ac16-4529-b851-2aa9a358e0b8";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=nix" ];
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/9364-7648";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
21
home/aselimov/firefox/firefox.nix
Normal file
21
home/aselimov/firefox/firefox.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{config, pkgs, ... }:
|
||||
{
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
|
||||
profiles.default = {
|
||||
id = 0;
|
||||
isDefault = true;
|
||||
preConfig = builtins.readFile ./user.js;
|
||||
|
||||
settings = {
|
||||
"browser.startup.page" = 3;
|
||||
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
||||
"sidebar.verticalTabs" = true;
|
||||
"sidebar.revamp" = true;
|
||||
};
|
||||
|
||||
userChrome = builtins.readFile ./userChrome.css;
|
||||
};
|
||||
};
|
||||
}
|
||||
1319
home/aselimov/firefox/user.js
Normal file
1319
home/aselimov/firefox/user.js
Normal file
File diff suppressed because it is too large
Load diff
13
home/aselimov/firefox/userChrome.css
Normal file
13
home/aselimov/firefox/userChrome.css
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
/* Niri provides window management */
|
||||
.titlebar-buttonbox-container {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.titlebar-spacer {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* Slightly more compact top toolbar */
|
||||
#nav-bar {
|
||||
min-height: 32px !important;
|
||||
}
|
||||
43
home/aselimov/fuzzel.nix
Normal file
43
home/aselimov/fuzzel.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{config, pkgs, ... }:
|
||||
{
|
||||
programs.fuzzel.enable = true;
|
||||
|
||||
xdg.configFile."fuzzel/fuzzel.ini".text = ''
|
||||
include=~/.config/fuzzel/colors.ini
|
||||
|
||||
[main]
|
||||
font=DepartureMono Nerd Font:size=10
|
||||
prompt=❯
|
||||
width=45
|
||||
lines=5
|
||||
horizontal-pad=20
|
||||
vertical-pad=12
|
||||
inner-pad=8
|
||||
|
||||
[border]
|
||||
width=2
|
||||
radius=12
|
||||
'';
|
||||
|
||||
xdg.configFile."fuzzel/themes/zenwritten-light.ini".text = ''
|
||||
[colors]
|
||||
background=eeeeeeff
|
||||
text=353535ff
|
||||
match=286486ff
|
||||
selection=cfcfcfff
|
||||
selection-text=353535ff
|
||||
selection-match=286486ff
|
||||
border=787878ff
|
||||
'';
|
||||
|
||||
xdg.configFile."fuzzel/themes/zenwritten-dark.ini".text = ''
|
||||
[colors]
|
||||
background=1c1c1cff
|
||||
text=b9b9b9ff
|
||||
match=8ba4b0ff
|
||||
selection=3a3a3aff
|
||||
selection-text=eeeeeeff
|
||||
selection-match=a8c2ceff
|
||||
border=666666ff
|
||||
'';
|
||||
}
|
||||
35
home/aselimov/ghostty/config
Normal file
35
home/aselimov/ghostty/config
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
# --- Basics
|
||||
auto-update-channel = tip
|
||||
font-family = "DepartureMono Nerd Font Mono"
|
||||
font-size = 11
|
||||
background-opacity = 1.0
|
||||
window-decoration = false
|
||||
confirm-close-surface = false
|
||||
|
||||
# Auto light/dark theme pair that matches your two palettes below
|
||||
#theme = dark:my-dark,light:my-light
|
||||
theme = dark:zenwritten-dark,light:zenwritten-light
|
||||
|
||||
# Font-size keybindings (match Ctrl+Shift+j/k from WezTerm)
|
||||
keybind = all:ctrl+shift+k=increase_font_size:1
|
||||
keybind = all:ctrl+shift+j=decrease_font_size:1
|
||||
|
||||
# Optional: make the split divider visible (newer Ghostty)
|
||||
# split-divider-color = #444444
|
||||
|
||||
keybind = cmd+shift+j=goto_split:next
|
||||
keybind = cmd+shift+k=goto_split:previous
|
||||
keybind = cmd+shift+s=new_split:down
|
||||
keybind = cmd+shift+v=new_split:right
|
||||
keybind = cmd+shift+e=equalize_splits
|
||||
|
||||
keybind = cmd+shift+u=scroll_page_up
|
||||
keybind = cmd+shift+d=scroll_page_down
|
||||
split-inherit-working-directory = true
|
||||
|
||||
keybind = cmd+shift+p=ignore
|
||||
|
||||
confirm-close-surface = true
|
||||
keybind = cmd+shift+t=close_surface
|
||||
keybind = ctrl+shift+c=copy_to_clipboard
|
||||
keybind = ctrl+shift+v=paste_from_clipboard
|
||||
28
home/aselimov/ghostty/themes/zenwritten-dark
Normal file
28
home/aselimov/ghostty/themes/zenwritten-dark
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
# Colors = your WezTerm dark palette
|
||||
foreground = #BBBBBB
|
||||
background = #191919
|
||||
cursor-color = #BBBBBB
|
||||
cursor-text = #191919
|
||||
selection-foreground = #191919
|
||||
selection-background = #BBBBBB
|
||||
bold-color = "#fefefe"
|
||||
|
||||
# ANSI 0..15
|
||||
palette = 0=#191919
|
||||
palette = 1=#DE6E7C
|
||||
palette = 2=#819B69
|
||||
palette = 3=#B77E64
|
||||
palette = 4=#6099C0
|
||||
palette = 5=#B279A7
|
||||
palette = 6=#66A5AD
|
||||
palette = 7=#BBBBBB
|
||||
palette = 8=#3d3839
|
||||
palette = 9=#E8838F
|
||||
palette = 10=#8BAE68
|
||||
palette = 11=#D68C67
|
||||
palette = 12=#61ABDA
|
||||
palette = 13=#CF86C1
|
||||
palette = 14=#65B8C1
|
||||
palette = 15=#8e8e8e
|
||||
|
||||
unfocused-split-fill=#BBBBBB
|
||||
28
home/aselimov/ghostty/themes/zenwritten-light
Normal file
28
home/aselimov/ghostty/themes/zenwritten-light
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
# Colors = your WezTerm light palette
|
||||
foreground = #4F5e68
|
||||
background = #F0EDEC
|
||||
cursor-color = #2c363c
|
||||
cursor-text = #F0EDEC
|
||||
selection-foreground = #F0EDEC
|
||||
selection-background = #2c363c
|
||||
bold-color = "#010101"
|
||||
|
||||
# ANSI 0..15
|
||||
palette = 0=#F0EDEC
|
||||
palette = 1=#A8334C
|
||||
palette = 2=#4F6C31
|
||||
palette = 3=#944927
|
||||
palette = 4=#286486
|
||||
palette = 5=#88507D
|
||||
palette = 6=#3B8992
|
||||
palette = 7=#2C363C
|
||||
palette = 8=#CFC1BA
|
||||
palette = 9=#94253E
|
||||
palette = 10=#3F5A22
|
||||
palette = 11=#803D1C
|
||||
palette = 12=#1D5573
|
||||
palette = 13=#7B3B70
|
||||
palette = 14=#2B747C
|
||||
palette = 15=#4F5E68
|
||||
|
||||
unfocused-split-fill=#CFC1BA
|
||||
125
home/aselimov/home.nix
Normal file
125
home/aselimov/home.nix
Normal file
|
|
@ -0,0 +1,125 @@
|
|||
{config, pkgs, ... }:
|
||||
let
|
||||
xremap-niri = pkgs.rustPlatform.buildRustPackage rec {
|
||||
pname = "xremap";
|
||||
version = "0.15.11";
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "xremap";
|
||||
repo = "xremap";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-N5JItxzg0nU9hsW+fOEJ9FHiq6L0rt8jXvieefuHc5k=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-45YN1ZjM485phmvMNOna/hXE+EorZcz3xLpTVZIWZn8=";
|
||||
|
||||
buildFeatures = [ "niri" ];
|
||||
};
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
../shell/shell.nix
|
||||
../neovim/neovim.nix
|
||||
./firefox/firefox.nix
|
||||
./theme/theme.nix
|
||||
./fuzzel.nix
|
||||
./mako.nix
|
||||
];
|
||||
home.username = "aselimov";
|
||||
home.homeDirectory = "/home/aselimov";
|
||||
home.stateVersion = "26.05";
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
programs.ghostty.enable = true;
|
||||
programs.mpv = {
|
||||
enable = true;
|
||||
|
||||
config = {
|
||||
save-position-on-quit = true;
|
||||
cache = true;
|
||||
demuxer-max-bytes = "500MiB";
|
||||
demuxer-max-back-bytes = "200MiB";
|
||||
demuxer-readahead-secs = 300;
|
||||
hr-seek = false;
|
||||
ytdl-format="bestvideo[vcodec^=avc1]+bestaudio/best";
|
||||
gpu-context = "wayland";
|
||||
};
|
||||
};
|
||||
home.packages = with pkgs; [
|
||||
ripgrep
|
||||
waybar
|
||||
mako
|
||||
wl-clipboard
|
||||
pavucontrol
|
||||
xremap-niri
|
||||
zip
|
||||
unzip
|
||||
glib
|
||||
jujutsu
|
||||
gnupg
|
||||
codex
|
||||
awww
|
||||
imv
|
||||
yt-dlp
|
||||
pass
|
||||
dino
|
||||
];
|
||||
home.pointerCursor = {
|
||||
enable = true;
|
||||
package = pkgs.phinger-cursors;
|
||||
name = "phinger-cursors-dark";
|
||||
size = 16;
|
||||
|
||||
gtk.enable = true;
|
||||
};
|
||||
gtk = {
|
||||
enable = true;
|
||||
|
||||
theme = {
|
||||
name = "Adwaita";
|
||||
package = pkgs.gnome-themes-extra;
|
||||
};
|
||||
};
|
||||
|
||||
dconf.enable = true;
|
||||
|
||||
xdg.configFile."niri/config.kdl".source = ./niri/config.kdl;
|
||||
xdg.configFile."ghostty" = {
|
||||
source = ./ghostty;
|
||||
recursive = true;
|
||||
};
|
||||
xdg.configFile."waybar" = {
|
||||
source = ./waybar;
|
||||
recursive = true;
|
||||
};
|
||||
|
||||
xdg.configFile."xremap/config.yml".source = ./xremap.yml;
|
||||
|
||||
home.sessionPath = [
|
||||
"$HOME/bin"
|
||||
];
|
||||
|
||||
systemd.user.services.xremap = {
|
||||
Unit = {
|
||||
Description = "xremap";
|
||||
};
|
||||
|
||||
Service = {
|
||||
ExecStart =
|
||||
"${xremap-niri}/bin/xremap --watch --ignore 'AT Translated Set 2 keyboard' %h/.config/xremap/config.yml";
|
||||
|
||||
Restart = "on-failure";
|
||||
RestartSec = 1;
|
||||
};
|
||||
};
|
||||
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
|
||||
pinentry.package = pkgs.pinentry-gnome3;
|
||||
|
||||
defaultCacheTtl = 86400;
|
||||
maxCacheTtl = 86400;
|
||||
};
|
||||
|
||||
}
|
||||
52
home/aselimov/mako.nix
Normal file
52
home/aselimov/mako.nix
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
{config, pgs, ... }:
|
||||
{
|
||||
services.mako = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
anchor = "top-right";
|
||||
layer = "overlay";
|
||||
|
||||
width = 360;
|
||||
height = 110;
|
||||
margin = 12;
|
||||
padding = 14;
|
||||
|
||||
font = "JetBrainsMono Nerd Font 11";
|
||||
|
||||
border-size = 2;
|
||||
border-radius = 10;
|
||||
|
||||
icons = true;
|
||||
max-icon-size = 48;
|
||||
|
||||
markup = true;
|
||||
actions = true;
|
||||
|
||||
default-timeout = 5000;
|
||||
};
|
||||
|
||||
extraConfig = ''
|
||||
include=~/.config/mako/theme.conf
|
||||
|
||||
[urgency=low]
|
||||
default-timeout=3000
|
||||
|
||||
[urgency=critical]
|
||||
default-timeout=0
|
||||
'';
|
||||
};
|
||||
xdg.configFile."mako/themes/zenwritten-light.conf".text = ''
|
||||
background-color=#eeeeee
|
||||
text-color=#353535
|
||||
border-color=#787878
|
||||
progress-color=over #286486
|
||||
'';
|
||||
|
||||
xdg.configFile."mako/themes/zenwritten-dark.conf".text = ''
|
||||
background-color=#1c1c1c
|
||||
text-color=#b9b9b9
|
||||
border-color=#666666
|
||||
progress-color=over #8ba4b0
|
||||
'';
|
||||
}
|
||||
623
home/aselimov/niri/config.kdl
Normal file
623
home/aselimov/niri/config.kdl
Normal file
|
|
@ -0,0 +1,623 @@
|
|||
// This config is in the KDL format: https://kdl.dev
|
||||
// "/-" comments out the following node.
|
||||
// Check the wiki for a full description of the configuration:
|
||||
// https://niri-wm.github.io/niri/Configuration:-Introduction
|
||||
|
||||
// Input device configuration.
|
||||
// Find the full list of options on the wiki:
|
||||
// https://niri-wm.github.io/niri/Configuration:-Input
|
||||
input {
|
||||
keyboard {
|
||||
xkb {
|
||||
// You can set rules, model, layout, variant and options.
|
||||
// For more information, see xkeyboard-config(7).
|
||||
|
||||
// For example:
|
||||
// layout "us,ru"
|
||||
// options "grp:win_space_toggle,compose:ralt,ctrl:nocaps"
|
||||
|
||||
// If this section is empty, niri will fetch xkb settings
|
||||
// from org.freedesktop.locale1. You can control these using
|
||||
// localectl set-x11-keymap.
|
||||
options "caps:escape"
|
||||
}
|
||||
|
||||
// Enable numlock on startup, omitting this setting disables it.
|
||||
numlock
|
||||
}
|
||||
|
||||
// Next sections include libinput settings.
|
||||
// Omitting settings disables them, or leaves them at their default values.
|
||||
// All commented-out settings here are examples, not defaults.
|
||||
touchpad {
|
||||
// off
|
||||
tap
|
||||
// dwt
|
||||
// dwtp
|
||||
// drag false
|
||||
// drag-lock
|
||||
// natural-scroll
|
||||
// accel-speed 0.2
|
||||
// accel-profile "flat"
|
||||
// scroll-method "two-finger"
|
||||
// disabled-on-external-mouse
|
||||
}
|
||||
|
||||
mouse {
|
||||
// off
|
||||
// natural-scroll
|
||||
accel-speed -1.0
|
||||
accel-profile "flat"
|
||||
// scroll-method "no-scroll"
|
||||
}
|
||||
|
||||
trackpoint {
|
||||
// off
|
||||
// natural-scroll
|
||||
// accel-speed 0.2
|
||||
// accel-profile "flat"
|
||||
// scroll-method "on-button-down"
|
||||
// scroll-button 273
|
||||
// scroll-button-lock
|
||||
// middle-emulation
|
||||
}
|
||||
|
||||
// Uncomment this to make the mouse warp to the center of newly focused windows.
|
||||
warp-mouse-to-focus
|
||||
|
||||
// Focus windows and outputs automatically when moving the mouse into them.
|
||||
// Setting max-scroll-amount="0%" makes it work only on windows already fully on screen.
|
||||
// focus-follows-mouse max-scroll-amount="0%"
|
||||
}
|
||||
|
||||
// You can configure outputs by their name, which you can find
|
||||
// by running `niri msg outputs` while inside a niri instance.
|
||||
// The built-in laptop monitor is usually called "eDP-1".
|
||||
// Find more information on the wiki:
|
||||
// https://niri-wm.github.io/niri/Configuration:-Outputs
|
||||
// Remember to uncomment the node by removing "/-"!
|
||||
output "eDP-1" {
|
||||
// Uncomment this line to disable this output.
|
||||
// off
|
||||
|
||||
// Resolution and, optionally, refresh rate of the output.
|
||||
// The format is "<width>x<height>" or "<width>x<height>@<refresh rate>".
|
||||
// If the refresh rate is omitted, niri will pick the highest refresh rate
|
||||
// for the resolution.
|
||||
// If the mode is omitted altogether or is invalid, niri will pick one automatically.
|
||||
// Run `niri msg outputs` while inside a niri instance to list all outputs and their modes.
|
||||
mode "1920x1080@120.030"
|
||||
|
||||
// You can use integer or fractional scale, for example use 1.5 for 150% scale.
|
||||
scale 1
|
||||
|
||||
// Transform allows to rotate the output counter-clockwise, valid values are:
|
||||
// normal, 90, 180, 270, flipped, flipped-90, flipped-180 and flipped-270.
|
||||
transform "normal"
|
||||
|
||||
// Position of the output in the global coordinate space.
|
||||
// This affects directional monitor actions like "focus-monitor-left", and cursor movement.
|
||||
// The cursor can only move between directly adjacent outputs.
|
||||
// Output scale and rotation has to be taken into account for positioning:
|
||||
// outputs are sized in logical, or scaled, pixels.
|
||||
// For example, a 3840×2160 output with scale 2.0 will have a logical size of 1920×1080,
|
||||
// so to put another output directly adjacent to it on the right, set its x to 1920.
|
||||
// If the position is unset or results in an overlap, the output is instead placed
|
||||
// automatically.
|
||||
position x=0 y=0
|
||||
}
|
||||
|
||||
cursor {
|
||||
xcursor-theme "phinger-cursors-dark"
|
||||
xcursor-size 24
|
||||
}
|
||||
|
||||
// Settings that influence how windows are positioned and sized.
|
||||
// Find more information on the wiki:
|
||||
// https://niri-wm.github.io/niri/Configuration:-Layout
|
||||
layout {
|
||||
// Set gaps around windows in logical pixels.
|
||||
gaps 16
|
||||
|
||||
// When to center a column when changing focus, options are:
|
||||
// - "never", default behavior, focusing an off-screen column will keep at the left
|
||||
// or right edge of the screen.
|
||||
// - "always", the focused column will always be centered.
|
||||
// - "on-overflow", focusing a column will center it if it doesn't fit
|
||||
// together with the previously focused column.
|
||||
center-focused-column "never"
|
||||
|
||||
// You can customize the widths that "switch-preset-column-width" (Mod+R) toggles between.
|
||||
preset-column-widths {
|
||||
// Proportion sets the width as a fraction of the output width, taking gaps into account.
|
||||
// For example, you can perfectly fit four windows sized "proportion 0.25" on an output.
|
||||
// The default preset widths are 1/3, 1/2 and 2/3 of the output.
|
||||
proportion 0.33333
|
||||
proportion 0.5
|
||||
proportion 0.66667
|
||||
|
||||
// Fixed sets the width in logical pixels exactly.
|
||||
// fixed 1920
|
||||
}
|
||||
|
||||
// You can also customize the heights that "switch-preset-window-height" (Mod+Ctrl+Shift+R) toggles between.
|
||||
// preset-window-heights { }
|
||||
|
||||
// You can change the default width of the new windows.
|
||||
default-column-width { proportion 0.5; }
|
||||
// If you leave the brackets empty, the windows themselves will decide their initial width.
|
||||
// default-column-width {}
|
||||
|
||||
// By default focus ring and border are rendered as a solid background rectangle
|
||||
// behind windows. That is, they will show up through semitransparent windows.
|
||||
// This is because windows using client-side decorations can have an arbitrary shape.
|
||||
//
|
||||
// If you don't like that, you should uncomment `prefer-no-csd` below.
|
||||
// Niri will draw focus ring and border *around* windows that agree to omit their
|
||||
// client-side decorations.
|
||||
//
|
||||
// Alternatively, you can override it with a window rule called
|
||||
// `draw-border-with-background`.
|
||||
|
||||
// You can change how the focus ring looks.
|
||||
focus-ring {
|
||||
// Uncomment this line to disable the focus ring.
|
||||
// off
|
||||
|
||||
// How many logical pixels the ring extends out from the windows.
|
||||
width 4
|
||||
|
||||
// Colors can be set in a variety of ways:
|
||||
// - CSS named colors: "red"
|
||||
// - RGB hex: "#rgb", "#rgba", "#rrggbb", "#rrggbbaa"
|
||||
// - CSS-like notation: "rgb(255, 127, 0)", rgba(), hsl() and a few others.
|
||||
|
||||
// Color of the ring on the active monitor.
|
||||
active-color "#7fc8ff"
|
||||
|
||||
// Color of the ring on inactive monitors.
|
||||
//
|
||||
// The focus ring only draws around the active window, so the only place
|
||||
// where you can see its inactive-color is on other monitors.
|
||||
inactive-color "#505050"
|
||||
|
||||
// You can also use gradients. They take precedence over solid colors.
|
||||
// Gradients are rendered the same as CSS linear-gradient(angle, from, to).
|
||||
// The angle is the same as in linear-gradient, and is optional,
|
||||
// defaulting to 180 (top-to-bottom gradient).
|
||||
// You can use any CSS linear-gradient tool on the web to set these up.
|
||||
// Changing the color space is also supported, check the wiki for more info.
|
||||
//
|
||||
// active-gradient from="#80c8ff" to="#c7ff7f" angle=45
|
||||
|
||||
// You can also color the gradient relative to the entire view
|
||||
// of the workspace, rather than relative to just the window itself.
|
||||
// To do that, set relative-to="workspace-view".
|
||||
//
|
||||
// inactive-gradient from="#505050" to="#808080" angle=45 relative-to="workspace-view"
|
||||
}
|
||||
|
||||
// You can also add a border. It's similar to the focus ring, but always visible.
|
||||
border {
|
||||
// The settings are the same as for the focus ring.
|
||||
// If you enable the border, you probably want to disable the focus ring.
|
||||
off
|
||||
|
||||
width 4
|
||||
active-color "#ffc87f"
|
||||
inactive-color "#505050"
|
||||
|
||||
// Color of the border around windows that request your attention.
|
||||
urgent-color "#9b0000"
|
||||
|
||||
// Gradients can use a few different interpolation color spaces.
|
||||
// For example, this is a pastel rainbow gradient via in="oklch longer hue".
|
||||
//
|
||||
// active-gradient from="#e5989b" to="#ffb4a2" angle=45 relative-to="workspace-view" in="oklch longer hue"
|
||||
|
||||
// inactive-gradient from="#505050" to="#808080" angle=45 relative-to="workspace-view"
|
||||
}
|
||||
|
||||
// You can enable drop shadows for windows.
|
||||
shadow {
|
||||
// Uncomment the next line to enable shadows.
|
||||
// on
|
||||
|
||||
// By default, the shadow draws only around its window, and not behind it.
|
||||
// Uncomment this setting to make the shadow draw behind its window.
|
||||
//
|
||||
// Note that niri has no way of knowing about the CSD window corner
|
||||
// radius. It has to assume that windows have square corners, leading to
|
||||
// shadow artifacts inside the CSD rounded corners. This setting fixes
|
||||
// those artifacts.
|
||||
//
|
||||
// However, instead you may want to set prefer-no-csd and/or
|
||||
// geometry-corner-radius. Then, niri will know the corner radius and
|
||||
// draw the shadow correctly, without having to draw it behind the
|
||||
// window. These will also remove client-side shadows if the window
|
||||
// draws any.
|
||||
//
|
||||
// draw-behind-window true
|
||||
|
||||
// You can change how shadows look. The values below are in logical
|
||||
// pixels and match the CSS box-shadow properties.
|
||||
|
||||
// Softness controls the shadow blur radius.
|
||||
softness 30
|
||||
|
||||
// Spread expands the shadow.
|
||||
spread 5
|
||||
|
||||
// Offset moves the shadow relative to the window.
|
||||
offset x=0 y=5
|
||||
|
||||
// You can also change the shadow color and opacity.
|
||||
color "#0007"
|
||||
}
|
||||
|
||||
// Struts shrink the area occupied by windows, similarly to layer-shell panels.
|
||||
// You can think of them as a kind of outer gaps. They are set in logical pixels.
|
||||
// Left and right struts will cause the next window to the side to always be visible.
|
||||
// Top and bottom struts will simply add outer gaps in addition to the area occupied by
|
||||
// layer-shell panels and regular gaps.
|
||||
struts {
|
||||
// left 64
|
||||
// right 64
|
||||
// top 64
|
||||
// bottom 64
|
||||
}
|
||||
}
|
||||
|
||||
// Add lines like this to spawn processes at startup.
|
||||
// Note that running niri as a session supports xdg-desktop-autostart,
|
||||
// which may be more convenient to use.
|
||||
// See the binds section below for more spawn examples.
|
||||
|
||||
// This line starts waybar, a commonly used bar for Wayland compositors.
|
||||
spawn-at-startup "sh" "-c" "systemctl --user import-environment XDG_DATA_DIRS WAYLAND_DISPLAY XDG_RUNTIME_DIR DBUS_SESSION_BUS_ADDRESS NIRI_SOCKET && systemctl --user restart awww.service wallpaper.service"
|
||||
spawn-at-startup "systemctl" "--user" "restart" "xremap"
|
||||
spawn-at-startup "waybar"
|
||||
|
||||
|
||||
// To run a shell command (with variables, pipes, etc.), use spawn-sh-at-startup:
|
||||
// spawn-sh-at-startup "qs -c ~/source/qs/MyAwesomeShell"
|
||||
|
||||
hotkey-overlay {
|
||||
// Uncomment this line to disable the "Important Hotkeys" pop-up at startup.
|
||||
skip-at-startup
|
||||
}
|
||||
|
||||
// Uncomment this line to ask the clients to omit their client-side decorations if possible.
|
||||
// If the client will specifically ask for CSD, the request will be honored.
|
||||
// Additionally, clients will be informed that they are tiled, removing some client-side rounded corners.
|
||||
// This option will also fix border/focus ring drawing behind some semitransparent windows.
|
||||
// After enabling or disabling this, you need to restart the apps for this to take effect.
|
||||
// prefer-no-csd
|
||||
|
||||
// You can change the path where screenshots are saved.
|
||||
// A ~ at the front will be expanded to the home directory.
|
||||
// The path is formatted with strftime(3) to give you the screenshot date and time.
|
||||
screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png"
|
||||
|
||||
// You can also set this to null to disable saving screenshots to disk.
|
||||
// screenshot-path null
|
||||
|
||||
// Animation settings.
|
||||
// The wiki explains how to configure individual animations:
|
||||
// https://niri-wm.github.io/niri/Configuration:-Animations
|
||||
animations {
|
||||
// Uncomment to turn off all animations.
|
||||
// off
|
||||
|
||||
// Slow down all animations by this factor. Values below 1 speed them up instead.
|
||||
// slowdown 3.0
|
||||
}
|
||||
|
||||
// Window rules let you adjust behavior for individual windows.
|
||||
// Find more information on the wiki:
|
||||
// https://niri-wm.github.io/niri/Configuration:-Window-Rules
|
||||
|
||||
|
||||
// Open the Firefox picture-in-picture player as floating by default.
|
||||
window-rule {
|
||||
// This app-id regular expression will work for both:
|
||||
// - host Firefox (app-id is "firefox")
|
||||
// - Flatpak Firefox (app-id is "org.mozilla.firefox")
|
||||
match app-id=r#"firefox$"# title="^Picture-in-Picture$"
|
||||
open-floating true
|
||||
}
|
||||
|
||||
// Example: block out two password managers from screen capture.
|
||||
// (This example rule is commented out with a "/-" in front.)
|
||||
/-window-rule {
|
||||
match app-id=r#"^org\.keepassxc\.KeePassXC$"#
|
||||
match app-id=r#"^org\.gnome\.World\.Secrets$"#
|
||||
|
||||
block-out-from "screen-capture"
|
||||
|
||||
// Use this instead if you want them visible on third-party screenshot tools.
|
||||
// block-out-from "screencast"
|
||||
}
|
||||
|
||||
// Example: enable rounded corners for all windows.
|
||||
// (This example rule is commented out with a "/-" in front.)
|
||||
window-rule {
|
||||
geometry-corner-radius 12
|
||||
clip-to-geometry true
|
||||
}
|
||||
|
||||
window-rule {
|
||||
match app-id="^mpv$"
|
||||
open-floating true
|
||||
default-floating-position x=10 y=10 relative-to="top-right"
|
||||
default-column-width {
|
||||
fixed 700
|
||||
}
|
||||
|
||||
default-window-height {
|
||||
fixed 394
|
||||
}
|
||||
}
|
||||
|
||||
binds {
|
||||
// Keys consist of modifiers separated by + signs, followed by an XKB key name
|
||||
// in the end. To find an XKB name for a particular key, you may use a program
|
||||
// like wev.
|
||||
//
|
||||
// "Mod" is a special modifier equal to Super when running on a TTY, and to Alt
|
||||
// when running as a winit window.
|
||||
//
|
||||
// Most actions that you can bind here can also be invoked programmatically with
|
||||
// `niri msg action do-something`.
|
||||
|
||||
// Mod-Shift-/, which is usually the same as Mod-?,
|
||||
// shows a list of important hotkeys.
|
||||
Mod+Shift+Slash { show-hotkey-overlay; }
|
||||
|
||||
// Suggested binds for running programs: terminal, app launcher, screen locker.
|
||||
Mod+Shift+Return hotkey-overlay-title="Open a Terminal: ghostty" { spawn "ghostty"; }
|
||||
Mod+P hotkey-overlay-title="Run an Application: fuzzel" { spawn "fuzzel"; }
|
||||
Super+Alt+L hotkey-overlay-title="Lock the Screen: swaylock" { spawn "swaylock"; }
|
||||
|
||||
// Example volume keys mappings for PipeWire & WirePlumber.
|
||||
// The allow-when-locked=true property makes them work even when the session is locked.
|
||||
// Using spawn-sh allows to pass multiple arguments together with the command.
|
||||
// "-l 1.0" limits the volume to 100%.
|
||||
XF86AudioRaiseVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1+ -l 1.0"; }
|
||||
XF86AudioLowerVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1-"; }
|
||||
XF86AudioMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; }
|
||||
XF86AudioMicMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"; }
|
||||
|
||||
// Example media keys mapping using playerctl.
|
||||
// This will work with any MPRIS-enabled media player.
|
||||
XF86AudioPlay allow-when-locked=true { spawn-sh "playerctl play-pause"; }
|
||||
XF86AudioPause allow-when-locked=true { spawn-sh "playerctl play-pause"; }
|
||||
XF86AudioStop allow-when-locked=true { spawn-sh "playerctl stop"; }
|
||||
XF86AudioPrev allow-when-locked=true { spawn-sh "playerctl previous"; }
|
||||
XF86AudioNext allow-when-locked=true { spawn-sh "playerctl next"; }
|
||||
|
||||
// Example brightness key mappings for brightnessctl.
|
||||
// You can use regular spawn with multiple arguments too (to avoid going through "sh"),
|
||||
// but you need to manually put each argument in separate "" quotes.
|
||||
XF86MonBrightnessUp allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "+10%"; }
|
||||
XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "10%-"; }
|
||||
|
||||
// Open/close the Overview: a zoomed-out view of workspaces and windows.
|
||||
// You can also move the mouse into the top-left hot corner,
|
||||
// or do a four-finger swipe up on a touchpad.
|
||||
Mod+O repeat=false { toggle-overview; }
|
||||
|
||||
Mod+Q repeat=false { close-window; }
|
||||
|
||||
Mod+Left { focus-column-left; }
|
||||
Mod+Down { focus-window-down; }
|
||||
Mod+Up { focus-window-up; }
|
||||
Mod+Right { focus-column-right; }
|
||||
Mod+H { focus-column-left; }
|
||||
Mod+L { focus-column-right; }
|
||||
|
||||
Mod+Shift+Left { move-column-left; }
|
||||
Mod+Shift+Down { move-window-down; }
|
||||
Mod+Shift+Up { move-window-up; }
|
||||
Mod+Shift+Right { move-column-right; }
|
||||
Mod+Shift+H { move-column-left; }
|
||||
Mod+Shift+L { move-column-right; }
|
||||
|
||||
// Alternative commands that move across workspaces when reaching
|
||||
// the first or last window in a column.
|
||||
Mod+J { focus-window-or-workspace-down; }
|
||||
Mod+K { focus-window-or-workspace-up; }
|
||||
Mod+Shift+J { move-window-down-or-to-workspace-down; }
|
||||
Mod+Shift+K { move-window-up-or-to-workspace-up; }
|
||||
|
||||
Mod+Home { focus-column-first; }
|
||||
Mod+End { focus-column-last; }
|
||||
Mod+Ctrl+Home { move-column-to-first; }
|
||||
Mod+Ctrl+End { move-column-to-last; }
|
||||
|
||||
//Mod+Shift+Left { focus-monitor-left; }
|
||||
//Mod+Shift+Down { focus-monitor-down; }
|
||||
//Mod+Shift+Up { focus-monitor-up; }
|
||||
//Mod+Shift+Right { focus-monitor-right; }
|
||||
//Mod+Shift+H { focus-monitor-left; }
|
||||
//Mod+Shift+J { focus-monitor-down; }
|
||||
//Mod+Shift+K { focus-monitor-up; }
|
||||
//Mod+Shift+L { focus-monitor-right; }
|
||||
|
||||
//Mod+Shift+Ctrl+Left { move-column-to-monitor-left; }
|
||||
//Mod+Shift+Ctrl+Down { move-column-to-monitor-down; }
|
||||
//Mod+Shift+Ctrl+Up { move-column-to-monitor-up; }
|
||||
//Mod+Shift+Ctrl+Right { move-column-to-monitor-right; }
|
||||
//Mod+Shift+Ctrl+H { move-column-to-monitor-left; }
|
||||
//Mod+Shift+Ctrl+J { move-column-to-monitor-down; }
|
||||
//Mod+Shift+Ctrl+K { move-column-to-monitor-up; }
|
||||
//Mod+Shift+Ctrl+L { move-column-to-monitor-right; }
|
||||
|
||||
// Alternatively, there are commands to move just a single window:
|
||||
// Mod+Shift+Ctrl+Left { move-window-to-monitor-left; }
|
||||
// ...
|
||||
|
||||
// And you can also move a whole workspace to another monitor:
|
||||
// Mod+Shift+Ctrl+Left { move-workspace-to-monitor-left; }
|
||||
// ...
|
||||
|
||||
// Alternatively, there are commands to move just a single window:
|
||||
// Mod+Ctrl+Page_Down { move-window-to-workspace-down; }
|
||||
// ...
|
||||
|
||||
// You can bind mouse wheel scroll ticks using the following syntax.
|
||||
// These binds will change direction based on the natural-scroll setting.
|
||||
//
|
||||
// To avoid scrolling through workspaces really fast, you can use
|
||||
// the cooldown-ms property. The bind will be rate-limited to this value.
|
||||
// You can set a cooldown on any bind, but it's most useful for the wheel.
|
||||
Mod+WheelScrollDown cooldown-ms=150 { focus-workspace-down; }
|
||||
Mod+WheelScrollUp cooldown-ms=150 { focus-workspace-up; }
|
||||
Mod+Ctrl+WheelScrollDown cooldown-ms=150 { move-column-to-workspace-down; }
|
||||
Mod+Ctrl+WheelScrollUp cooldown-ms=150 { move-column-to-workspace-up; }
|
||||
|
||||
Mod+WheelScrollRight { focus-column-right; }
|
||||
Mod+WheelScrollLeft { focus-column-left; }
|
||||
Mod+Ctrl+WheelScrollRight { move-column-right; }
|
||||
Mod+Ctrl+WheelScrollLeft { move-column-left; }
|
||||
|
||||
// Usually scrolling up and down with Shift in applications results in
|
||||
// horizontal scrolling; these binds replicate that.
|
||||
Mod+Shift+WheelScrollDown { focus-column-right; }
|
||||
Mod+Shift+WheelScrollUp { focus-column-left; }
|
||||
Mod+Ctrl+Shift+WheelScrollDown { move-column-right; }
|
||||
Mod+Ctrl+Shift+WheelScrollUp { move-column-left; }
|
||||
|
||||
// Similarly, you can bind touchpad scroll "ticks".
|
||||
// Touchpad scrolling is continuous, so for these binds it is split into
|
||||
// discrete intervals.
|
||||
// These binds are also affected by touchpad's natural-scroll, so these
|
||||
// example binds are "inverted", since we have natural-scroll enabled for
|
||||
// touchpads by default.
|
||||
// Mod+TouchpadScrollDown { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.02+"; }
|
||||
// Mod+TouchpadScrollUp { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.02-"; }
|
||||
|
||||
// You can refer to workspaces by index. However, keep in mind that
|
||||
// niri is a dynamic workspace system, so these commands are kind of
|
||||
// "best effort". Trying to refer to a workspace index bigger than
|
||||
// the current workspace count will instead refer to the bottommost
|
||||
// (empty) workspace.
|
||||
//
|
||||
// For example, with 2 workspaces + 1 empty, indices 3, 4, 5 and so on
|
||||
// will all refer to the 3rd workspace.
|
||||
Mod+1 { focus-workspace 1; }
|
||||
Mod+2 { focus-workspace 2; }
|
||||
Mod+3 { focus-workspace 3; }
|
||||
Mod+4 { focus-workspace 4; }
|
||||
Mod+5 { focus-workspace 5; }
|
||||
Mod+6 { focus-workspace 6; }
|
||||
Mod+7 { focus-workspace 7; }
|
||||
Mod+8 { focus-workspace 8; }
|
||||
Mod+9 { focus-workspace 9; }
|
||||
Mod+Ctrl+1 { move-column-to-workspace 1; }
|
||||
Mod+Ctrl+2 { move-column-to-workspace 2; }
|
||||
Mod+Ctrl+3 { move-column-to-workspace 3; }
|
||||
Mod+Ctrl+4 { move-column-to-workspace 4; }
|
||||
Mod+Ctrl+5 { move-column-to-workspace 5; }
|
||||
Mod+Ctrl+6 { move-column-to-workspace 6; }
|
||||
Mod+Ctrl+7 { move-column-to-workspace 7; }
|
||||
Mod+Ctrl+8 { move-column-to-workspace 8; }
|
||||
Mod+Ctrl+9 { move-column-to-workspace 9; }
|
||||
|
||||
// Alternatively, there are commands to move just a single window:
|
||||
// Mod+Ctrl+1 { move-window-to-workspace 1; }
|
||||
|
||||
// Switches focus between the current and the previous workspace.
|
||||
// Mod+Tab { focus-workspace-previous; }
|
||||
|
||||
// The following binds move the focused window in and out of a column.
|
||||
// If the window is alone, they will consume it into the nearby column to the side.
|
||||
// If the window is already in a column, they will expel it out.
|
||||
Mod+BracketLeft { consume-or-expel-window-left; }
|
||||
Mod+BracketRight { consume-or-expel-window-right; }
|
||||
|
||||
// Consume one window from the right to the bottom of the focused column.
|
||||
Mod+Comma { consume-window-into-column; }
|
||||
// Expel the bottom window from the focused column to the right.
|
||||
Mod+Period { expel-window-from-column; }
|
||||
|
||||
// Cycle through widths set in preset-column-widths.
|
||||
Mod+R { switch-preset-column-width; }
|
||||
// Cycling through the presets in reverse order is also possible.
|
||||
Mod+Shift+R { switch-preset-column-width-back; }
|
||||
|
||||
Mod+Ctrl+Shift+R { switch-preset-window-height; }
|
||||
Mod+Ctrl+R { reset-window-height; }
|
||||
|
||||
Mod+F { maximize-column; }
|
||||
Mod+Shift+F { fullscreen-window; }
|
||||
|
||||
// While maximize-column leaves gaps and borders around the window,
|
||||
// maximize-window-to-edges doesn't: the window expands to the edges of the screen.
|
||||
// This bind corresponds to normal window maximizing,
|
||||
// e.g. by double-clicking on the titlebar.
|
||||
Mod+M { maximize-window-to-edges; }
|
||||
|
||||
// Expand the focused column to space not taken up by other fully visible columns.
|
||||
// Makes the column "fill the rest of the space".
|
||||
Mod+Ctrl+F { expand-column-to-available-width; }
|
||||
|
||||
Mod+C { center-column; }
|
||||
|
||||
// Center all fully visible columns on screen.
|
||||
Mod+Ctrl+C { center-visible-columns; }
|
||||
|
||||
// Finer width adjustments.
|
||||
// This command can also:
|
||||
// * set width in pixels: "1000"
|
||||
// * adjust width in pixels: "-5" or "+5"
|
||||
// * set width as a percentage of screen width: "25%"
|
||||
// * adjust width as a percentage of screen width: "-10%" or "+10%"
|
||||
// Pixel sizes use logical, or scaled, pixels. I.e. on an output with scale 2.0,
|
||||
// set-column-width "100" will make the column occupy 200 physical screen pixels.
|
||||
Mod+Minus { set-column-width "-10%"; }
|
||||
Mod+Equal { set-column-width "+10%"; }
|
||||
|
||||
// Finer height adjustments when in column with other windows.
|
||||
Mod+Shift+Minus { set-window-height "-10%"; }
|
||||
Mod+Shift+Equal { set-window-height "+10%"; }
|
||||
|
||||
// Move the focused window between the floating and the tiling layout.
|
||||
Mod+U { toggle-window-floating; }
|
||||
Mod+Shift+U { switch-focus-between-floating-and-tiling; }
|
||||
|
||||
// Toggle tabbed column display mode.
|
||||
// Windows in this column will appear as vertical tabs,
|
||||
// rather than stacked on top of each other.
|
||||
Mod+W { toggle-column-tabbed-display; }
|
||||
|
||||
// Actions to switch layouts.
|
||||
// Note: if you uncomment these, make sure you do NOT have
|
||||
// a matching layout switch hotkey configured in xkb options above.
|
||||
// Having both at once on the same hotkey will break the switching,
|
||||
// since it will switch twice upon pressing the hotkey (once by xkb, once by niri).
|
||||
// Mod+Space { switch-layout "next"; }
|
||||
// Mod+Shift+Space { switch-layout "prev"; }
|
||||
|
||||
Mod+S { screenshot; }
|
||||
Ctrl+Print { screenshot-screen; }
|
||||
Alt+Print { screenshot-window; }
|
||||
|
||||
// Applications such as remote-desktop clients and software KVM switches may
|
||||
// request that niri stops processing the keyboard shortcuts defined here
|
||||
// so they may, for example, forward the key presses as-is to a remote machine.
|
||||
// It's a good idea to bind an escape hatch to toggle the inhibitor,
|
||||
// so a buggy application can't hold your session hostage.
|
||||
//
|
||||
// The allow-inhibiting=false property can be applied to other binds as well,
|
||||
// which ensures niri always processes them, even when an inhibitor is active.
|
||||
Mod+Escape allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; }
|
||||
|
||||
// The quit action will show a confirmation dialog to avoid accidental exits.
|
||||
Mod+Shift+E { quit; }
|
||||
Ctrl+Alt+Delete { quit; }
|
||||
|
||||
// Powers off the monitors. To turn them back on, do any input like
|
||||
// moving the mouse or pressing any other key.
|
||||
//Mod+Shift+P { power-off-monitors; }
|
||||
}
|
||||
91
home/aselimov/theme/theme.nix
Normal file
91
home/aselimov/theme/theme.nix
Normal file
|
|
@ -0,0 +1,91 @@
|
|||
{config, pkgs, ... }:
|
||||
{
|
||||
home.file."bin/themer.sh" = {
|
||||
executable = true;
|
||||
text = ''
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set_theme() {
|
||||
scheme="$(${pkgs.glib}/bin/gsettings get \
|
||||
org.gnome.desktop.interface color-scheme)"
|
||||
|
||||
if [[ "$scheme" == *dark* ]]; then
|
||||
wallpaper="$HOME/media/pics/wall-dark.png"
|
||||
fuzzel="$HOME/.config/fuzzel/themes/zenwritten-dark.ini"
|
||||
mako="$HOME/.config/mako/themes/zenwritten-dark.conf"
|
||||
tmux="$HOME/.config/tmux/themes/zenwritten-dark.conf"
|
||||
keys=$'<C-\\><C-n>:silent! let g:light_mode=0 | set background=dark | doautocmd ColorScheme | redraw!<CR>'
|
||||
|
||||
else
|
||||
wallpaper="$HOME/media/pics/wall-light.png"
|
||||
fuzzel="$HOME/.config/fuzzel/themes/zenwritten-light.ini"
|
||||
mako="$HOME/.config/mako/themes/zenwritten-light.conf"
|
||||
tmux="$HOME/.config/tmux/themes/zenwritten-light.conf"
|
||||
keys=$'<C-\\><C-n>:silent! let g:light_mode=1 | set background=light | doautocmd ColorScheme | redraw!<CR>'
|
||||
fi
|
||||
|
||||
${pkgs.awww}/bin/awww img "$wallpaper" \
|
||||
--transition-type fade \
|
||||
--transition-duration 0.4
|
||||
|
||||
ln -sf "$fuzzel" "$HOME/.config/fuzzel/colors.ini"
|
||||
ln -sf "$mako" "$HOME/.config/mako/theme.conf"
|
||||
ln -sf "$tmux" $HOME/.config/tmux/theme.conf
|
||||
makoctl reload
|
||||
tmux source-file ~/.config/tmux/theme.conf
|
||||
for dir in "$XDG_RUNTIME_DIR-}" "/tmp" "$HOME/.local/state/nvim"; do
|
||||
[ -d "$dir" ] || continue
|
||||
find "$dir" -type s -name 'nvim*' 2>/dev/null | while read -r sock; do
|
||||
timeout 1s nvim --server "$sock" --remote-send "$keys" >/dev/null 2>&1 || true
|
||||
done
|
||||
done
|
||||
|
||||
}
|
||||
|
||||
set_theme
|
||||
|
||||
${pkgs.glib}/bin/gsettings monitor \
|
||||
org.gnome.desktop.interface color-scheme |
|
||||
while read -r _; do
|
||||
set_theme
|
||||
done
|
||||
'';
|
||||
};
|
||||
home.file."media/pics/wall-light.png".source = ./wall-light.png;
|
||||
home.file."media/pics/wall-dark.png".source = ./wall-dark.png;
|
||||
|
||||
systemd.user.services.awww = {
|
||||
Unit = {
|
||||
Description = "Awww wallpaper daemon";
|
||||
After = [ "graphical-session.target" ];
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
};
|
||||
|
||||
Service = {
|
||||
ExecStart = "${pkgs.awww}/bin/awww-daemon";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
|
||||
Install = {
|
||||
WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.services.themer = {
|
||||
Unit = {
|
||||
Description = "gsettings monitor to swap light/dark themes";
|
||||
After = [ "graphical-session.target" "awww.service"];
|
||||
Requires = [ "awww.service" ];
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
};
|
||||
|
||||
Service = {
|
||||
ExecStart = "/home/aselimov/bin/themer.sh";
|
||||
Restart = "always";
|
||||
};
|
||||
|
||||
Install = {
|
||||
WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
BIN
home/aselimov/theme/wall-dark.png
Normal file
BIN
home/aselimov/theme/wall-dark.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 72 KiB |
BIN
home/aselimov/theme/wall-light.png
Normal file
BIN
home/aselimov/theme/wall-light.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 74 KiB |
64
home/aselimov/waybar/config.jsonc
Normal file
64
home/aselimov/waybar/config.jsonc
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
{
|
||||
"reload_style_on_change": true,
|
||||
"layer": "top",
|
||||
"position": "top",
|
||||
"height": 28,
|
||||
"spacing": 8,
|
||||
"modules-left": [
|
||||
"niri/workspaces"
|
||||
],
|
||||
"modules-center": [
|
||||
"clock"
|
||||
],
|
||||
"modules-right": [
|
||||
"pulseaudio",
|
||||
"network",
|
||||
"battery",
|
||||
"tray"
|
||||
],
|
||||
"niri/workspaces": {
|
||||
"format": "{icon}",
|
||||
"format-icons": {
|
||||
"active": "●",
|
||||
"default": "○"
|
||||
}
|
||||
},
|
||||
"niri/window": {
|
||||
"format": "{title}",
|
||||
"max-length": 45
|
||||
},
|
||||
"clock": {
|
||||
"format": "{:%a %d %H:%M}",
|
||||
"tooltip-format": "{:%A, %B %d, %Y}"
|
||||
},
|
||||
"pulseaudio": {
|
||||
"format": "{volume}% ",
|
||||
"format-muted": "mute ",
|
||||
"scroll-step": 5,
|
||||
"on-click": "pavucontrol"
|
||||
},
|
||||
"network": {
|
||||
"format-wifi": "{signalStrength}% ",
|
||||
"format-ethernet": "",
|
||||
"format-disconnected": "",
|
||||
"tooltip-format-wifi": "{essid}"
|
||||
},
|
||||
"battery": {
|
||||
"format": "{capacity}% {icon}",
|
||||
"format-charging": "{capacity}% ",
|
||||
"format-icons": [
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
""
|
||||
],
|
||||
"states": {
|
||||
"warning": 25,
|
||||
"critical": 10
|
||||
}
|
||||
},
|
||||
"tray": {
|
||||
"spacing": 8
|
||||
}
|
||||
}
|
||||
67
home/aselimov/waybar/style-dark.css
Normal file
67
home/aselimov/waybar/style-dark.css
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
/* Ghostty: zenwritten-dark */
|
||||
|
||||
* {
|
||||
font-family: "DepartureMono Nerd Font Mono";
|
||||
font-size: 12px;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background: #191919;
|
||||
color: #bbbbbb;
|
||||
border-bottom: 1px solid #3d3839;
|
||||
}
|
||||
|
||||
#workspaces,
|
||||
#window,
|
||||
#clock,
|
||||
#pulseaudio,
|
||||
#network,
|
||||
#battery,
|
||||
#tray {
|
||||
padding: 0 7px;
|
||||
margin: 0;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
padding: 0 4px;
|
||||
margin: 0;
|
||||
color: #8e8e8e;
|
||||
background: transparent;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
color: #bbbbbb;
|
||||
}
|
||||
|
||||
#workspaces button:hover {
|
||||
color: #6099c0;
|
||||
background: transparent;
|
||||
box-shadow: none;
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
#window {
|
||||
color: #8e8e8e;
|
||||
}
|
||||
|
||||
#clock {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#battery.warning {
|
||||
color: #b77e64;
|
||||
}
|
||||
|
||||
#battery.critical {
|
||||
color: #de6e7c;
|
||||
}
|
||||
|
||||
tooltip {
|
||||
background: #191919;
|
||||
color: #bbbbbb;
|
||||
border: 1px solid #3d3839;
|
||||
}
|
||||
67
home/aselimov/waybar/style-light.css
Normal file
67
home/aselimov/waybar/style-light.css
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
/* Ghostty: zenwritten-light */
|
||||
|
||||
* {
|
||||
font-family: "DepartureMono Nerd Font Mono";
|
||||
font-size: 12px;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background: #f0edec;
|
||||
color: #4f5e68;
|
||||
border-bottom: 1px solid #cfc1ba;
|
||||
}
|
||||
|
||||
#workspaces,
|
||||
#window,
|
||||
#clock,
|
||||
#pulseaudio,
|
||||
#network,
|
||||
#battery,
|
||||
#tray {
|
||||
padding: 0 7px;
|
||||
margin: 0;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
padding: 0 4px;
|
||||
margin: 0;
|
||||
color: #4f5e68;
|
||||
background: transparent;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
color: #2c363c;
|
||||
}
|
||||
|
||||
#workspaces button:hover {
|
||||
color: #286486;
|
||||
background: transparent;
|
||||
box-shadow: none;
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
#window {
|
||||
color: #4f5e68;
|
||||
}
|
||||
|
||||
#clock {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#battery.warning {
|
||||
color: #944927;
|
||||
}
|
||||
|
||||
#battery.critical {
|
||||
color: #a8334c;
|
||||
}
|
||||
|
||||
tooltip {
|
||||
background: #f0edec;
|
||||
color: #4f5e68;
|
||||
border: 1px solid #cfc1ba;
|
||||
}
|
||||
67
home/aselimov/waybar/style.css
Normal file
67
home/aselimov/waybar/style.css
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
/* ~/.config/waybar/style.css */
|
||||
|
||||
* {
|
||||
font-family: "DepartureMono Nerd Font Mono";
|
||||
font-size: 12px;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background: #f0edec;
|
||||
color: #4f5e68;
|
||||
border-bottom: 1px solid #cfc1ba;
|
||||
}
|
||||
|
||||
#workspaces,
|
||||
#window,
|
||||
#clock,
|
||||
#pulseaudio,
|
||||
#network,
|
||||
#battery,
|
||||
#tray {
|
||||
padding: 0 7px;
|
||||
margin: 0;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
padding: 0 4px;
|
||||
margin: 0;
|
||||
color: #4f5e68;
|
||||
background: transparent;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
color: #2c363c;
|
||||
}
|
||||
|
||||
#workspaces button:hover {
|
||||
color: #286486;
|
||||
background: transparent;
|
||||
box-shadow: none;
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
#window {
|
||||
color: #4f5e68;
|
||||
}
|
||||
|
||||
#clock {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#battery.warning {
|
||||
color: #944927;
|
||||
}
|
||||
|
||||
#battery.critical {
|
||||
color: #a8334c;
|
||||
}
|
||||
|
||||
tooltip {
|
||||
background: #f0edec;
|
||||
color: #4f5e68;
|
||||
border: 1px solid #cfc1ba;
|
||||
}
|
||||
23
home/aselimov/xremap.yml
Normal file
23
home/aselimov/xremap.yml
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
keymap:
|
||||
- name: macOS-style shortcuts
|
||||
application:
|
||||
not:
|
||||
- com.mitchellh.ghostty
|
||||
|
||||
remap:
|
||||
Super-c: Ctrl-c
|
||||
Super-v: Ctrl-v
|
||||
Super-x: Ctrl-x
|
||||
Super-a: Ctrl-a
|
||||
Super-z: Ctrl-z
|
||||
Super-f: Ctrl-f
|
||||
Super-s: Ctrl-s
|
||||
|
||||
- name: Ghostty shortcuts
|
||||
application:
|
||||
only:
|
||||
- com.mitchellh.ghostty
|
||||
|
||||
remap:
|
||||
Super-c: Ctrl-Shift-c
|
||||
Super-v: Ctrl-Shift-v
|
||||
22
home/neovim/neovim.nix
Normal file
22
home/neovim/neovim.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{config, pkgs, ... }:
|
||||
{
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
|
||||
extraPackages = with pkgs; [
|
||||
fd
|
||||
lua-language-server
|
||||
stylua
|
||||
tree-sitter
|
||||
clang
|
||||
deno
|
||||
nodejs
|
||||
shellcheck
|
||||
];
|
||||
};
|
||||
xdg.configFile."nvim" = {
|
||||
source = ./neovim;
|
||||
recursive = true;
|
||||
};
|
||||
}
|
||||
380
home/neovim/neovim/GoogleStyle.xml
Normal file
380
home/neovim/neovim/GoogleStyle.xml
Normal file
|
|
@ -0,0 +1,380 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<profiles version="21">
|
||||
<profile kind="CodeFormatterProfile" name="GoogleStyle" version="21">
|
||||
<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="space"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indentation.size" value="2"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="2"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.text_block_indentation" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_record_header" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_body" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.indent_empty_lines" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.align_with_spaces" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_record_declaration" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_record_constructor" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_lambda_body" value="end_of_line"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration" value="preserve_positions"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation" value="preserve_positions"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration" value="preserve_positions"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_record_declaration" value="preserve_positions"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation" value="preserve_positions"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration" value="preserve_positions"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement" value="preserve_positions"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment" value="preserve_positions"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement" value="preserve_positions"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause" value="preserve_positions"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause" value="preserve_positions"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_record_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_record_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_record_components" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_record_components" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_record_declaration" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_record_declaration" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_record_constructor" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_case" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_switch_case_expressions" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_switch_case_expressions" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_not_operator" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_additive_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_additive_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_shift_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_shift_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_relational_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_relational_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_logical_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_logical_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="3"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="2"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_last_class_body_declaration" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="2"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_field" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_abstract_method" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_method" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_label" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_simple_for_body_on_same_line" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_simple_while_body_on_same_line" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_simple_do_while_body_on_same_line" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_loop_body_block_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_if_then_body_block_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_lambda_body_block_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_code_block_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_method_body_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_simple_getter_setter_on_one_line" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_type_declaration_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_anonymous_type_declaration_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_enum_declaration_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_enum_constant_declaration_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_record_declaration_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_record_constructor_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.keep_annotation_declaration_on_one_line" value="one_line_never"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="180"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="1"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_method_declaration" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_record_components" value="18"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_record_declaration" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_additive_operator" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_additive_operator" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_string_concatenation" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_string_concatenation" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_shift_operator" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_shift_operator" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_relational_operator" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_relational_operator" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_logical_operator" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_logical_operator" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value="48"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression_chain" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_conditional_operator" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_assignment" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_assignment_operator" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header" value="2"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_loops" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_resources_in_try" value="80"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch" value="18"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_assertion_message" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_assertion_message_operator" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_type_arguments" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_type_parameters" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_package" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_type" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_enum_constant" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_field" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_method" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_local_variable" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_annotations_on_parameter" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_type_annotations" value="16"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_module_statements" value="0"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="180"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.join_lines_in_comments" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_html" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_source_code" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_between_different_tags" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.align_tags_names_descriptions" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.align_tags_descriptions_grouped" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value="do not insert"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.indent_tag_description" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="false"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.use_on_off_tags" value="true"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.enabling_tag" value="@formatter:on"/>
|
||||
<setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/>
|
||||
</profile>
|
||||
</profiles>
|
||||
26
home/neovim/neovim/README.md
Normal file
26
home/neovim/neovim/README.md
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
# Neovim Configuration
|
||||
|
||||
This is a personal Neovim configuration tailored for a variety of programming languages. It uses `lazy.nvim` for plugin management.
|
||||
|
||||
## Features
|
||||
|
||||
* **Plugin Manager**: Plugins are managed using [lazy.nvim](https://github.com/folke/lazy.nvim).
|
||||
* **LSP**: Language Server Protocol support is provided by [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig), with LSP management through [mason.nvim](https://github.com/williamboman/mason.nvim).
|
||||
* **Completion**: Autocompletion is handled by [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) with [LuaSnip](https://github.com/L3MON4D3/LuaSnip) for snippets.
|
||||
* **Fuzzy Finder**: [Telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) is used for fuzzy finding files, buffers, and more.
|
||||
* **Formatting**: Code formatting is done with [conform.nvim](https://github.com/stevearc/conform.nvim), supporting a range of formatters.
|
||||
* **Themes**: The colorscheme is [zenbones.nvim](https://github.com/zenbones-theme/zenbones.nvim).
|
||||
|
||||
## Supported Languages
|
||||
|
||||
This configuration has specific support for the following languages:
|
||||
|
||||
* C/C++
|
||||
* CUDA
|
||||
* Java
|
||||
* Python
|
||||
* Lua
|
||||
* LaTeX
|
||||
* Markdown
|
||||
* Shell
|
||||
* Rust
|
||||
8
home/neovim/neovim/ftplugin/'
Normal file
8
home/neovim/neovim/ftplugin/'
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
set spell spelllang=en_us
|
||||
map <C-b> : w % <Bar> ! md2pdf % <CR>
|
||||
map <A-b> : w % <Bar> ! md2docx % <CR>
|
||||
map <C-z> : !zathura %:r.pdf & <CR>
|
||||
inoremap ;i ** <++><Esc>5hi
|
||||
inoremap ;b **** <++><Esc>6hi
|
||||
inoremap ;I <Esc>6hi
|
||||
inoremap ;c ```<CR>```<Esc>Oi
|
||||
2
home/neovim/neovim/ftplugin/cpp.lua
Normal file
2
home/neovim/neovim/ftplugin/cpp.lua
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
vim.keymap.set({ "v", "n", "i" }, "<C-b>", ": CMakeBuild<CR>")
|
||||
vim.keymap.set({ "v", "n", "i" }, "<C-t>", ": CMakeTest<CR>")
|
||||
2
home/neovim/neovim/ftplugin/cuda.lua
Normal file
2
home/neovim/neovim/ftplugin/cuda.lua
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
vim.keymap.set({ "v", "n", "i" }, "<C-b>", ": CMakeBuild<CR>")
|
||||
vim.keymap.set({ "v", "n", "i" }, "<C-t>", ": CMakeTest<CR>")
|
||||
2
home/neovim/neovim/ftplugin/gitcommit.vim
Normal file
2
home/neovim/neovim/ftplugin/gitcommit.vim
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
set colorcolumn=72
|
||||
set tw=72
|
||||
2
home/neovim/neovim/ftplugin/haskell.lua
Normal file
2
home/neovim/neovim/ftplugin/haskell.lua
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
vim.opt.sw = 2
|
||||
vim.opt.ts = 2
|
||||
12
home/neovim/neovim/ftplugin/html.vim
Normal file
12
home/neovim/neovim/ftplugin/html.vim
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
if &ft=="markdown"
|
||||
finish
|
||||
endif
|
||||
map <C-b> : w % <Bar> ! firefox % & <CR>
|
||||
inoremap ;d <div class="" ><Return><++><Return></div><Esc>kkf"a
|
||||
inoremap ;a <a href=""><++></a><Esc>2F"a
|
||||
inoremap ;p <p><Return></p><Esc>O
|
||||
inoremap ;b <strong></strong> <++><Esc>2F>a
|
||||
inoremap ;li <li></li><Esc>F>a
|
||||
inoremap ;ll <ul><Return></ul><Esc>O
|
||||
inoremap ;i <img src="" alt="<++>" width="<++>" height=auto><Esc>5F"i
|
||||
inoremap ;s <body><Enter><div class="container"><Enter></div><Enter></body><Esc>kO
|
||||
4
home/neovim/neovim/ftplugin/java.lua
Normal file
4
home/neovim/neovim/ftplugin/java.lua
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
vim.opt_local.shiftwidth = 2
|
||||
vim.opt_local.tabstop = 2
|
||||
vim.opt_local.tw = 100
|
||||
vim.opt_local.colorcolumn = "+1"
|
||||
2
home/neovim/neovim/ftplugin/javascript.lua
Normal file
2
home/neovim/neovim/ftplugin/javascript.lua
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
vim.opt_local.shiftwidth = 2
|
||||
vim.opt_local.tabstop = 2
|
||||
1
home/neovim/neovim/ftplugin/mail.viim
Normal file
1
home/neovim/neovim/ftplugin/mail.viim
Normal file
|
|
@ -0,0 +1 @@
|
|||
set textwidth=0
|
||||
20
home/neovim/neovim/ftplugin/markdown.vim
Normal file
20
home/neovim/neovim/ftplugin/markdown.vim
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
set spell spellfile="~/.config/nvim/spell/wordlist"
|
||||
setlocal conceallevel=0
|
||||
setlocal concealcursor=
|
||||
let g:markdown_fenced_languages = ['html', 'python', 'bash=sh', 'fortran']
|
||||
let g:vim_markdown_math = 1
|
||||
let g:tex_conceal = "abdmg"
|
||||
let g:tex_superscripts= "[]"
|
||||
let g:tex_subscripts= "[]"
|
||||
let g:tex_conceal_frac=1
|
||||
hi clear Conceal
|
||||
map <C-b> : w % <Bar> AsyncRun md2pdf "%" <CR>
|
||||
map <A-p> : w % <Bar> AsyncRun md2beamer "%" <CR>
|
||||
map <A-b> : w % <Bar> AsyncRun md2docx % <CR>
|
||||
map <C-z> : !zathura %:r.pdf & <CR>
|
||||
inoremap <leader>b ****<esc>hi
|
||||
inoremap <leader>i **<esc>i
|
||||
command Stab Tabularize /\s\+\zs\s/l1c0
|
||||
nnoremap ;t :Tabularize /\s\+\zs\s/l1c0<CR>
|
||||
set tw=1000
|
||||
set colorcolumn=
|
||||
4
home/neovim/neovim/ftplugin/python.lua
Normal file
4
home/neovim/neovim/ftplugin/python.lua
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
vim.opt_local.colorcolumn = "88"
|
||||
vim.opt_local.textwidth = 1000
|
||||
vim.keymap.set("n", "<leader>x", "[hv]h]hk$;sc", { buffer = true })
|
||||
vim.keymap.set("n", "<leader>r", ":!python3 %<CR>", { buffer = true })
|
||||
37
home/neovim/neovim/ftplugin/sh.lua
Normal file
37
home/neovim/neovim/ftplugin/sh.lua
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
vim.opt_local.colorcolumn = "100"
|
||||
vim.opt_local.textwidth = 100
|
||||
vim.opt_local.expandtab = true
|
||||
|
||||
local function detect_indent(bufnr)
|
||||
local lines = vim.api.nvim_buf_get_lines(bufnr, 0, 100, false)
|
||||
local counts = {}
|
||||
for _, line in ipairs(lines) do
|
||||
local spaces = line:match("^( +)[^ ]")
|
||||
if spaces then
|
||||
local n = #spaces
|
||||
counts[n] = (counts[n] or 0) + 1
|
||||
end
|
||||
end
|
||||
-- find the smallest indent size with meaningful usage
|
||||
for _, size in ipairs({ 2, 4, 8 }) do
|
||||
if (counts[size] or 0) > 0 then
|
||||
return size
|
||||
end
|
||||
end
|
||||
return 4 -- default
|
||||
end
|
||||
|
||||
local bufnr = vim.api.nvim_get_current_buf()
|
||||
local size = detect_indent(bufnr)
|
||||
|
||||
vim.opt_local.shiftwidth = size
|
||||
vim.opt_local.tabstop = size
|
||||
vim.opt_local.softtabstop = size
|
||||
|
||||
-- update beautysh indent size for this buffer
|
||||
local ok, conform = pcall(require, "conform")
|
||||
if ok then
|
||||
conform.formatters.beautysh = {
|
||||
prepend_args = { "--indent-size", tostring(size) },
|
||||
}
|
||||
end
|
||||
21
home/neovim/neovim/ftplugin/tex.vim
Normal file
21
home/neovim/neovim/ftplugin/tex.vim
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
set spell
|
||||
set spelllang=en_us
|
||||
map <C-b> : w % <Bar> make! <CR>
|
||||
map <C-z> : !make read & <CR>
|
||||
inoremap ;f \begin{figure}<Enter>\centering<Enter>\includegraphics[]{<++>}<Enter>\caption{<++>}<Enter>\end{figure}<Esc>2kf[a
|
||||
inoremap ;2f \begin{figure}<CR>\centering<CR>\begin{subfigure}[t]{0.49\textwidth}<CR>\centering<CR>\includegraphics[width=\textwidth]{<++>}<CR>\caption{<++>}<CR>\end{subfigure}<CR>\begin{subfigure}[t]{0.49\textwidth}<CR>\centering<CR>\includegraphics[width=\textwidth]{<++>}<CR>\caption{<++>}<CR>\end{subfigure}<CR>\end{figure}<Esc>8k/<++><Enter>"_c4l
|
||||
inoremap ;3f \begin{figure}<CR>\centering<CR>\begin{subfigure}[t]{0.32\textwidth}<CR>\centering<CR>\includegraphics[width=\textwidth]{<++>}<CR>\caption{<++>}<CR>\end{subfigure}<CR>\begin{subfigure}[t]{0.32\textwidth}<CR>\centering<CR>\includegraphics[width=\textwidth]{<++>}<CR>\caption{<++>}<CR>\end{subfigure}<CR>\begin{subfigure}[t]{0.32\textwidth}<CR>\centering<CR>\includegraphics[width=\textwidth]{<++>}<CR>\caption{<++>}<CR>\end{subfigure}<CR>\end{figure}<Esc>13k/<++><Enter>"_c4l
|
||||
inoremap ;F \begin{frame}{<++>}<Enter>\end{frame}<Esc>O<++><Esc>-i
|
||||
inoremap ;b \textbf{} <++><Esc>F{a
|
||||
inoremap ;c \caption{}<Esc>i
|
||||
inoremap ;C \begin{columns}<Enter>\column{0.49\textwidth}<Enter>\column{0.49\textwidth}<Enter><++><Enter>\end{columns}<Esc>2kO
|
||||
inoremap ;ig \includegraphics[width=\textwidth]{<++>}<Esc>16hi
|
||||
inoremap ;li \begin{itemize}<Enter>\item<Enter>\end{itemize}<Esc>kA
|
||||
inoremap ;le \begin{enumerate}<Enter>\item<Enter>\end{enumerate}<Esc>kA
|
||||
inoremap ;ll \item<Space>
|
||||
inoremap ;2t \begin{table}[h!]<Enter>\begin{center}<Enter>\begin{tabular}{c c}<Enter> \toprule<Enter>\textbf{} & \textbf{<++>} \\<Enter>\midrule<Enter><++> & <++> \\<Enter>\bottomrule<Enter>\end{tabular}<Enter>\end{center}<Enter>\end{table}<Esc>6kf{a
|
||||
inoremap ;e \begin{equation}<Enter>\label{<++>}<Enter>\end{equation}<ESC>kO
|
||||
inoremap ;fw width=\textwidth<Esc>F\i
|
||||
inoremap ;fh height=\textheight<Esc>F\i
|
||||
|
||||
set tw=5000
|
||||
2
home/neovim/neovim/ftplugin/typescript.lua
Normal file
2
home/neovim/neovim/ftplugin/typescript.lua
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
vim.opt_local.shiftwidth = 2
|
||||
vim.opt_local.tabstop = 2
|
||||
38
home/neovim/neovim/init.lua
Normal file
38
home/neovim/neovim/init.lua
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
-- set to true for light mode
|
||||
local handle = io.popen(
|
||||
"gsettings get org.gnome.desktop.interface color-scheme"
|
||||
)
|
||||
|
||||
if handle then
|
||||
local scheme = handle:read("*a")
|
||||
handle:close()
|
||||
|
||||
if scheme:match("prefer%-dark") then
|
||||
vim.g.light_mode = false
|
||||
else
|
||||
vim.g.light_mode = true
|
||||
end
|
||||
end
|
||||
vim.g.vim_markdown_conceal = 0
|
||||
|
||||
-- Neovim configuration
|
||||
-- Modularized structure for better organization
|
||||
|
||||
-- Load core configuration
|
||||
require("config.options")
|
||||
require("config.keymaps")
|
||||
require("config.autocmds")
|
||||
require("config.lazy")
|
||||
|
||||
-- Setup lazy.nvim and load plugins
|
||||
require("lazy").setup({
|
||||
-- Import all plugin configurations
|
||||
{ import = "plugins" },
|
||||
})
|
||||
|
||||
-- Load additional configuration
|
||||
require("colorizer").setup()
|
||||
require("config.formatting")
|
||||
|
||||
-- Add configuration to listen so we can live reload
|
||||
pcall(vim.fn.serverstart, vim.fn.stdpath("run") .. "/nvim-" .. vim.fn.getpid())
|
||||
50
home/neovim/neovim/lazy-lock.json
Normal file
50
home/neovim/neovim/lazy-lock.json
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
{
|
||||
"LuaSnip": { "branch": "master", "commit": "a62e1083a3cfe8b6b206e7d3d33a51091df25357" },
|
||||
"asyncrun.vim": { "branch": "master", "commit": "98d3c0fdeb983f0ef62fe3a49da440f6d2c045ce" },
|
||||
"claude-code.nvim": { "branch": "main", "commit": "55c0cb59828fbc3bec744288286a46f5d5750b83" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" },
|
||||
"cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
||||
"conform.nvim": { "branch": "master", "commit": "086a40dc7ed8242c03be9f47fbcee68699cc2395" },
|
||||
"fidget.nvim": { "branch": "main", "commit": "889e2e96edef4e144965571d46f7a77bcc4d0ddf" },
|
||||
"git-blame.nvim": { "branch": "main", "commit": "5c536e2d4134d064aa3f41575280bc8a2a0e03d7" },
|
||||
"iron.nvim": { "branch": "master", "commit": "88cd340407b959f1168af2a6ae5a3d180e6df32c" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
||||
"lush.nvim": { "branch": "main", "commit": "9c60ec2279d62487d942ce095e49006af28eed6e" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "0a3b42c3e503df87aef6d6513e13148381495c3a" },
|
||||
"mason-tool-installer.nvim": { "branch": "main", "commit": "443f1ef8b5e6bf47045cb2217b6f748a223cf7dc" },
|
||||
"mason.nvim": { "branch": "main", "commit": "b03fb0f20bc1d43daf558cda981a2be22e73ac42" },
|
||||
"mini.nvim": { "branch": "main", "commit": "29447d7b0e1fc9bc9d0384953e63be3fae816736" },
|
||||
"neogen": { "branch": "main", "commit": "b2e78708876f4da507839726816010a68e33fec8" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "a1d504892f2bc56c2e79b65c6faded2fd21f3eca" },
|
||||
"nvim-colorizer.lua": { "branch": "master", "commit": "5cfe7fffbd01e17b3c1e14af85d5febdef88bd8c" },
|
||||
"nvim-jdtls": { "branch": "master", "commit": "77ccaeb422f8c81b647605da5ddb4a7f725cda90" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "4b7fbaa239c5db6b36f424a4521ca9f1a401be33" },
|
||||
"nvim-markdown": { "branch": "master", "commit": "37850581fdaec153ce84af677d43bf8fce60813a" },
|
||||
"nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "c72328a5494b4502947a022fe69c0c47e53b6aa6" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" },
|
||||
"rainbow_csv": { "branch": "master", "commit": "3dbbfd7d17536aebfb80f571255548495574c32b" },
|
||||
"render-markdown.nvim": { "branch": "main", "commit": "0fd43fb4b1f073931c4b481f5f3b7cea3749e190" },
|
||||
"runst.nvim": { "branch": "main", "commit": "9760caf73d8f020b6054d34f5527a85836a11a24" },
|
||||
"rustaceanvim": { "branch": "master", "commit": "88575b98bb9937fb9983ddec5e532b67e75ce677" },
|
||||
"snacks.nvim": { "branch": "main", "commit": "ad9ede6a9cddf16cedbd31b8932d6dcdee9b716e" },
|
||||
"tabular": { "branch": "master", "commit": "12437cd1b53488e24936ec4b091c9324cafee311" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" },
|
||||
"telescope-live-grep-args.nvim": { "branch": "master", "commit": "53e9df55b3651dd7cf77e172f1e8c9a17407acca" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "471eebb1037899fd942cc0f52c012f8773505da1" },
|
||||
"tex-conceal.vim": { "branch": "master", "commit": "93ae39d9222b0892684d02324b85ee9d3647bf8e" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" },
|
||||
"vim-abolish": { "branch": "master", "commit": "dcbfe065297d31823561ba787f51056c147aa682" },
|
||||
"vim-cmake": { "branch": "master", "commit": "896bc2189c8ade62d00a0ebedc59c65d9d9b0d65" },
|
||||
"vim-gitgutter": { "branch": "main", "commit": "21c977e8597c468c7dc76001389b0b430d46a4b0" },
|
||||
"vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" },
|
||||
"vim-table-mode": { "branch": "master", "commit": "bb025308a45c67c7c8f0763ba37bc2ee3f534df0" },
|
||||
"vim-textobj-hydrogen": { "branch": "master", "commit": "e6f9a6b26a3524615bac347503c35327636fab72" },
|
||||
"vim-textobj-user": { "branch": "master", "commit": "41a675ddbeefd6a93664a4dc52f302fe3086a933" },
|
||||
"vim-tmux-navigator": { "branch": "master", "commit": "e41c431a0c7b7388ae7ba341f01a0d217eb3a432" },
|
||||
"windsurf.vim": { "branch": "main", "commit": "a8d47ec54fe82df920b2545559f767003e8a7f8d" },
|
||||
"zenbones.nvim": { "branch": "main", "commit": "22b7fb75593412e0dc81b4bdefae718e9e84aa82" }
|
||||
}
|
||||
62
home/neovim/neovim/lua/autopair.lua
Normal file
62
home/neovim/neovim/lua/autopair.lua
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
local remap = vim.api.nvim_set_keymap
|
||||
local npairs = require('nvim-autopairs')
|
||||
|
||||
npairs.setup({ map_bs = false, map_cr = false })
|
||||
|
||||
vim.g.coq_settings = { keymap = { recommended = false } }
|
||||
|
||||
-- these mappings are coq recommended mappings unrelated to nvim-autopairs
|
||||
remap('i', '<esc>', [[pumvisible() ? "<c-e><esc>" : "<esc>"]], { expr = true, noremap = true })
|
||||
remap('i', '<c-c>', [[pumvisible() ? "<c-e><c-c>" : "<c-c>"]], { expr = true, noremap = true })
|
||||
remap('i', '<tab>', [[pumvisible() ? "<c-n>" : "<tab>"]], { expr = true, noremap = true })
|
||||
remap('i', '<s-tab>', [[pumvisible() ? "<c-p>" : "<bs>"]], { expr = true, noremap = true })
|
||||
|
||||
-- skip it, if you use another global object
|
||||
_G.MUtils= {}
|
||||
|
||||
MUtils.CR = function()
|
||||
if vim.fn.pumvisible() ~= 0 then
|
||||
if vim.fn.complete_info({ 'selected' }).selected ~= -1 then
|
||||
return npairs.esc('<c-y>')
|
||||
else
|
||||
return npairs.esc('<c-e>') .. npairs.autopairs_cr()
|
||||
end
|
||||
else
|
||||
return npairs.autopairs_cr()
|
||||
end
|
||||
end
|
||||
remap('i', '<cr>', 'v:lua.MUtils.CR()', { expr = true, noremap = true })
|
||||
|
||||
MUtils.BS = function()
|
||||
if vim.fn.pumvisible() ~= 0 and vim.fn.complete_info({ 'mode' }).mode == 'eval' then
|
||||
return npairs.esc('<c-e>') .. npairs.autopairs_bs()
|
||||
else
|
||||
return npairs.autopairs_bs()
|
||||
end
|
||||
end
|
||||
remap('i', '<bs>', 'v:lua.MUtils.BS()', { expr = true, noremap = true })
|
||||
|
||||
|
||||
-- put this to setup function and press <a-e> to use fast_wrap
|
||||
npairs.setup({
|
||||
fast_wrap = {},
|
||||
})
|
||||
|
||||
-- change default fast_wrap
|
||||
npairs.setup({
|
||||
fast_wrap = {
|
||||
map = '<M-e>',
|
||||
chars = { '{', '[', '(', '"', "'" },
|
||||
pattern = [=[[%'%"%>%]%)%}%,]]=],
|
||||
end_key = '$',
|
||||
before_key = 'h',
|
||||
after_key = 'l',
|
||||
cursor_pos_before = true,
|
||||
keys = 'qwertyuiopzxcvbnmasdfghjkl',
|
||||
manual_position = true,
|
||||
highlight = 'Search',
|
||||
highlight_grey='Comment'
|
||||
},
|
||||
})
|
||||
|
||||
npairs.remove_rule('`')
|
||||
35
home/neovim/neovim/lua/config/autocmds.lua
Normal file
35
home/neovim/neovim/lua/config/autocmds.lua
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
-- Autocmds configuration
|
||||
|
||||
-- Disable semantic tokens
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
callback = function(args)
|
||||
local client = vim.lsp.get_client_by_id(args.data.client_id)
|
||||
client.server_capabilities.semanticTokensProvider = nil
|
||||
end,
|
||||
})
|
||||
|
||||
-- Go back to last edited line when reopening file
|
||||
vim.api.nvim_create_autocmd("BufRead", {
|
||||
callback = function(opts)
|
||||
vim.api.nvim_create_autocmd("BufWinEnter", {
|
||||
once = true,
|
||||
buffer = opts.buf,
|
||||
callback = function()
|
||||
local ft = vim.bo[opts.buf].filetype
|
||||
local last_known_line = vim.api.nvim_buf_get_mark(opts.buf, '"')[1]
|
||||
if
|
||||
not (ft:match("gitcommit") and ft:match("gitrebase"))
|
||||
and last_known_line > 1
|
||||
and last_known_line <= vim.api.nvim_buf_line_count(opts.buf)
|
||||
then
|
||||
vim.api.nvim_feedkeys([[g`"]], "nx", false)
|
||||
end
|
||||
end,
|
||||
})
|
||||
end,
|
||||
})
|
||||
|
||||
-- Disable semantic highlights
|
||||
for _, group in ipairs(vim.fn.getcompletion("@lsp", "highlight")) do
|
||||
vim.api.nvim_set_hl(0, group, {})
|
||||
end
|
||||
32
home/neovim/neovim/lua/config/formatting.lua
Normal file
32
home/neovim/neovim/lua/config/formatting.lua
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
-- Formatting configuration
|
||||
|
||||
-- Commands to disable/enable formatting
|
||||
require("conform").setup({
|
||||
format_on_save = function(bufnr)
|
||||
-- Disable with a global or buffer-local variable
|
||||
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
|
||||
return
|
||||
end
|
||||
return { timeout_ms = 500, lsp_fallback = true }
|
||||
end,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_user_command("FormatDisable", function(args)
|
||||
if args.bang then
|
||||
-- FormatDisable! will disable formatting just for this buffer
|
||||
vim.b.disable_autoformat = true
|
||||
else
|
||||
vim.g.disable_autoformat = true
|
||||
end
|
||||
end, {
|
||||
desc = "Disable autoformat-on-save",
|
||||
bang = true,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_user_command("FormatEnable", function()
|
||||
vim.b.disable_autoformat = false
|
||||
vim.g.disable_autoformat = false
|
||||
end, {
|
||||
desc = "Re-enable autoformat-on-save",
|
||||
})
|
||||
|
||||
20
home/neovim/neovim/lua/config/keymaps.lua
Normal file
20
home/neovim/neovim/lua/config/keymaps.lua
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
-- Keymaps configuration
|
||||
|
||||
-- Clear search highlight
|
||||
vim.keymap.set("n", "<Esc>", "<cmd>nohlsearch<CR>")
|
||||
|
||||
-- Diagnostic keymaps
|
||||
vim.keymap.set("n", "[d", vim.diagnostic.goto_prev, { desc = "Go to previous [D]iagnostic message" })
|
||||
vim.keymap.set("n", "]d", vim.diagnostic.goto_next, { desc = "Go to next [D]iagnostic message" })
|
||||
vim.keymap.set("n", "<leader>e", vim.diagnostic.open_float, { desc = "Show diagnostic [E]rror messages" })
|
||||
vim.keymap.set("n", "<leader>q", vim.diagnostic.setloclist, { desc = "Open diagnostic [Q]uickfix list" })
|
||||
|
||||
-- Window navigation
|
||||
vim.keymap.set("n", "<C-h>", "<C-w><C-h>", { desc = "Move focus to the left window" })
|
||||
vim.keymap.set("n", "<C-l>", "<C-w><C-l>", { desc = "Move focus to the right window" })
|
||||
vim.keymap.set("n", "<C-j>", "<C-w><C-j>", { desc = "Move focus to the lower window" })
|
||||
vim.keymap.set("n", "<C-k>", "<C-w><C-k>", { desc = "Move focus to the upper window" })
|
||||
|
||||
-- LSP keymaps
|
||||
vim.keymap.set("n", "gd", vim.lsp.buf.definition, { desc = "Goto Definition" })
|
||||
|
||||
16
home/neovim/neovim/lua/config/lazy.lua
Normal file
16
home/neovim/neovim/lua/config/lazy.lua
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
-- Lazy.nvim plugin manager setup
|
||||
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||
vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
-- User dictionary for spell checking
|
||||
local path = vim.fn.stdpath("config") .. "/spell/en.utf-8.add"
|
||||
local words = {}
|
||||
|
||||
for word in io.open(path, "r"):lines() do
|
||||
table.insert(words, word)
|
||||
end
|
||||
44
home/neovim/neovim/lua/config/options.lua
Normal file
44
home/neovim/neovim/lua/config/options.lua
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
-- Options configuration
|
||||
vim.g.mapleader = ";"
|
||||
vim.g.maplocalleader = ";"
|
||||
|
||||
-- Line numbers
|
||||
vim.opt.number = true
|
||||
vim.opt.relativenumber = true
|
||||
|
||||
-- Mouse
|
||||
vim.opt.mouse = ""
|
||||
|
||||
-- Mode display
|
||||
vim.opt.showmode = false
|
||||
|
||||
-- Search
|
||||
vim.opt.ignorecase = true
|
||||
vim.opt.smartcase = true
|
||||
vim.opt.hlsearch = true
|
||||
|
||||
-- Sign column
|
||||
vim.opt.signcolumn = "yes"
|
||||
|
||||
-- Splits
|
||||
vim.opt.splitright = true
|
||||
vim.opt.splitbelow = true
|
||||
|
||||
-- Whitespace display
|
||||
vim.opt.list = true
|
||||
vim.opt.listchars = { tab = "» ", trail = "·", nbsp = "␣" }
|
||||
|
||||
-- Live substitution preview
|
||||
vim.opt.inccommand = "split"
|
||||
|
||||
-- Cursor line
|
||||
vim.opt.cursorline = true
|
||||
|
||||
-- General settings
|
||||
vim.opt.shiftwidth = 4
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.expandtab = true
|
||||
vim.opt.tw = 100
|
||||
vim.opt.colorcolumn = "+1"
|
||||
vim.opt.termguicolors = true
|
||||
vim.opt.pumheight = 5
|
||||
45
home/neovim/neovim/lua/iron.lua
Normal file
45
home/neovim/neovim/lua/iron.lua
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
local iron = require("iron.core")
|
||||
local view = require("iron.view")
|
||||
|
||||
iron.setup {
|
||||
config = {
|
||||
-- Whether a repl should be discarded or not
|
||||
scratch_repl = true,
|
||||
-- Your repl definitions come here
|
||||
repl_definition = {
|
||||
python = {
|
||||
-- Can be a table or a function that
|
||||
-- returns a table (see below)
|
||||
command = "ipython --no-autoindent"
|
||||
}
|
||||
},
|
||||
-- How the repl window will be displayed
|
||||
-- See below for more information
|
||||
repl_open_cmd = require('iron.view').bottom(20),
|
||||
},
|
||||
-- Iron doesn't set keymaps by default anymore.
|
||||
-- You can set them here or manually add keymaps to the functions in iron.core
|
||||
keymaps = {
|
||||
visual_send = ";sc",
|
||||
send_file = ";sf",
|
||||
send_line = ";sl",
|
||||
cr = ";s<cr>",
|
||||
interrupt = ";s<space>",
|
||||
exit = ";sq",
|
||||
clear = ";cl",
|
||||
},
|
||||
-- If the highlight is on, you can change how it looks
|
||||
-- For the available options, check nvim_set_hl
|
||||
highlight = {
|
||||
italic = true
|
||||
},
|
||||
ignore_blank_lines = true, -- ignore blank lines when sending visual select lines
|
||||
}
|
||||
|
||||
-- iron also has a list of commands, see :h iron-commands for all available commands
|
||||
vim.keymap.set('n', ';rs', '<cmd>IronRepl<cr>')
|
||||
vim.keymap.set('n', ';rr', '<cmd>IronRestart<cr>')
|
||||
vim.keymap.set('n', ';rf', '<cmd>IronFocus<cr>')
|
||||
vim.keymap.set('n', ';rh', '<cmd>IronHide<cr>')
|
||||
|
||||
repl_open_cmd = "horizontal bot 20 split"
|
||||
59
home/neovim/neovim/lua/plugins/autopairs.lua
Normal file
59
home/neovim/neovim/lua/plugins/autopairs.lua
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
-- Autopairs plugin configuration
|
||||
|
||||
return {
|
||||
"windwp/nvim-autopairs",
|
||||
config = function()
|
||||
local remap = vim.api.nvim_set_keymap
|
||||
local npairs = require("nvim-autopairs")
|
||||
|
||||
npairs.setup({ map_bs = false, map_cr = false })
|
||||
|
||||
_G.MUtils = {}
|
||||
|
||||
MUtils.CR = function()
|
||||
if vim.fn.pumvisible() ~= 0 then
|
||||
if vim.fn.complete_info({ "selected" }).selected ~= -1 then
|
||||
return npairs.esc("<c-y>")
|
||||
else
|
||||
return npairs.esc("<c-e>") .. npairs.autopairs_cr()
|
||||
end
|
||||
else
|
||||
return npairs.autopairs_cr()
|
||||
end
|
||||
end
|
||||
remap("i", "<cr>", "v:lua.MUtils.CR()", { expr = true, noremap = true })
|
||||
|
||||
MUtils.BS = function()
|
||||
if vim.fn.pumvisible() ~= 0 and vim.fn.complete_info({ "mode" }).mode == "eval" then
|
||||
return npairs.esc("<c-e>") .. npairs.autopairs_bs()
|
||||
else
|
||||
return npairs.autopairs_bs()
|
||||
end
|
||||
end
|
||||
remap("i", "<bs>", "v:lua.MUtils.BS()", { expr = true, noremap = true })
|
||||
|
||||
-- put this to setup function and press <a-e> to use fast_wrap
|
||||
npairs.setup({
|
||||
fast_wrap = {},
|
||||
})
|
||||
|
||||
-- change default fast_wrap
|
||||
npairs.setup({
|
||||
fast_wrap = {
|
||||
map = "<M-e>",
|
||||
chars = { "{", "[", "(", '"', "'" },
|
||||
pattern = [=[[%'%"%>%]%)%}%,]]=],
|
||||
end_key = "$",
|
||||
before_key = "h",
|
||||
after_key = "l",
|
||||
cursor_pos_before = true,
|
||||
keys = "qwertyuiopzxcvbnmasdfghjkl",
|
||||
manual_position = true,
|
||||
highlight = "Search",
|
||||
highlight_grey = "Comment",
|
||||
},
|
||||
})
|
||||
|
||||
npairs.remove_rule("`")
|
||||
end,
|
||||
}
|
||||
137
home/neovim/neovim/lua/plugins/completion.lua
Normal file
137
home/neovim/neovim/lua/plugins/completion.lua
Normal file
|
|
@ -0,0 +1,137 @@
|
|||
-- Completion and snippets configuration
|
||||
|
||||
return {
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
event = "InsertEnter",
|
||||
dependencies = {
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
build = (function()
|
||||
if vim.fn.has("win32") == 1 or vim.fn.executable("make") == 0 then
|
||||
return
|
||||
end
|
||||
return "make install_jsregexp"
|
||||
end)(),
|
||||
config = function()
|
||||
require("luasnip.loaders.from_snipmate").lazy_load({ paths = "./snippets" })
|
||||
local ls = require("luasnip")
|
||||
|
||||
vim.keymap.set({ "i", "s" }, "<leader>j", function()
|
||||
if ls.expand_or_locally_jumpable() then
|
||||
ls.expand_or_jump()
|
||||
end
|
||||
end, { silent = true })
|
||||
vim.keymap.set({ "i", "s" }, "<leader>k", function()
|
||||
if ls.locally_jumpable(-1) then
|
||||
ls.jump(-1)
|
||||
end
|
||||
end, { silent = true })
|
||||
|
||||
local snip = ls.snippet
|
||||
local node = ls.snippet_node
|
||||
local text = ls.text_node
|
||||
local insert = ls.insert_node
|
||||
local func = ls.function_node
|
||||
local choice = ls.choice_node
|
||||
local dynamicn = ls.dynamic_node
|
||||
|
||||
ls.add_snippets(nil, {
|
||||
python = {
|
||||
snip({
|
||||
trig = "imp",
|
||||
namr = "Imports",
|
||||
dscr = "Comments for imports",
|
||||
}, {
|
||||
text({ "# Core modules", "" }),
|
||||
insert(1),
|
||||
text({ "", "# Non-core modules", "" }),
|
||||
insert(2),
|
||||
text({ "", "# SEI modules", "" }),
|
||||
insert(3),
|
||||
}),
|
||||
},
|
||||
tex = {
|
||||
snip({
|
||||
trig = "input",
|
||||
namr = "Input Cell",
|
||||
dscr = "Cell for SEIInputTable",
|
||||
}, {
|
||||
text({ "\\hypertarget{" }),
|
||||
insert(1),
|
||||
text({ "}{" }),
|
||||
insert(2),
|
||||
text({ "} & \\SEICell{", "\t" }),
|
||||
insert(3),
|
||||
text({ "", "}\\\\", "" }),
|
||||
}),
|
||||
},
|
||||
markdown = {
|
||||
snip({
|
||||
trig = "img",
|
||||
namr = "image",
|
||||
dscr = "Markdown img",
|
||||
}, {
|
||||
text({ ",
|
||||
insert(2),
|
||||
text(")"),
|
||||
}),
|
||||
snip({
|
||||
trig = "header",
|
||||
namr = "header",
|
||||
dscr = "Yaml header for markdown notes",
|
||||
}, {
|
||||
text({ "---", "" }),
|
||||
text("title: "),
|
||||
insert(1),
|
||||
text({ "", "author: Alex Selimov", "" }),
|
||||
text("tags: ["),
|
||||
insert(2),
|
||||
text({ "]", "", "" }),
|
||||
text({ "---", "" }),
|
||||
}),
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"hrsh7th/cmp-path",
|
||||
},
|
||||
config = function()
|
||||
local cmp = require("cmp")
|
||||
local luasnip = require("luasnip")
|
||||
luasnip.config.setup({})
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
completion = { completeopt = "menu,menuone,noinsert" },
|
||||
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
["<C-n>"] = cmp.mapping.select_next_item(),
|
||||
["<C-p>"] = cmp.mapping.select_prev_item(),
|
||||
["<C-y>"] = cmp.mapping.confirm({ select = true }),
|
||||
}),
|
||||
sources = {
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "luasnip" },
|
||||
{ name = "path" },
|
||||
},
|
||||
})
|
||||
end,
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
local luasnip = require("luasnip")
|
||||
if not luasnip then
|
||||
return
|
||||
end
|
||||
luasnip.lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
||||
74
home/neovim/neovim/lua/plugins/dev-tools.lua
Normal file
74
home/neovim/neovim/lua/plugins/dev-tools.lua
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
-- Development tools and utilities
|
||||
|
||||
return {
|
||||
{
|
||||
"codersauce/runst.nvim",
|
||||
lazy = false,
|
||||
opts = {},
|
||||
config = function()
|
||||
require("runst").setup()
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"mrcjkb/rustaceanvim",
|
||||
version = "^6", -- Recommended
|
||||
lazy = false, -- This plugin is already lazy
|
||||
},
|
||||
|
||||
{
|
||||
"cdelledonne/vim-cmake",
|
||||
cond = vim.fn.executable("cmake") == 1,
|
||||
},
|
||||
|
||||
{
|
||||
"f-person/git-blame.nvim",
|
||||
opts = {
|
||||
enabled = false,
|
||||
message_template = "<<sha>> • <author> • <summary> • <date>",
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
"Exafunction/windsurf.vim",
|
||||
event = "BufEnter",
|
||||
cond = os.getenv("NVIM_USE_WINDSURF") == "true",
|
||||
},
|
||||
|
||||
{
|
||||
"danymat/neogen",
|
||||
setup = {
|
||||
snippet_engine = "luasnip",
|
||||
},
|
||||
config = function()
|
||||
require("neogen").setup({})
|
||||
local opts = { noremap = true, silent = true }
|
||||
vim.api.nvim_set_keymap("n", "<Leader>dg", ":lua require('neogen').generate()<CR>", opts)
|
||||
end,
|
||||
version = "*",
|
||||
},
|
||||
{
|
||||
"greggh/claude-code.nvim",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim", -- Required for git operations
|
||||
},
|
||||
config = function()
|
||||
require("claude-code").setup({
|
||||
window = {
|
||||
split_ratio = 0.3, -- Percentage of screen for the terminal window (height for horizontal, width for vertical splits)
|
||||
position = "vertical", -- Position of the window: "botright", "topleft", "vertical", "float", etc.
|
||||
},
|
||||
keymaps = {
|
||||
toggle = {
|
||||
normal = "<leader>cc", -- Normal mode keymap for toggling Claude Code, false to disable
|
||||
terminal = "<leader>cc", -- Terminal mode keymap for toggling Claude Code, false to disable
|
||||
variants = {
|
||||
continue = "<leader>cC", -- Normal mode keymap for Claude Code with continue flag
|
||||
verbose = "<leader>cV", -- Normal mode keymap for Claude Code with verbose flag
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
23
home/neovim/neovim/lua/plugins/editor.lua
Normal file
23
home/neovim/neovim/lua/plugins/editor.lua
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
-- Editor enhancement plugins
|
||||
|
||||
return {
|
||||
"christoomey/vim-tmux-navigator",
|
||||
"kana/vim-textobj-user",
|
||||
"mechatroner/rainbow_csv",
|
||||
{
|
||||
"GCBallesteros/vim-textobj-hydrogen",
|
||||
dependencies = {
|
||||
"kana/vim-textobj-user",
|
||||
},
|
||||
},
|
||||
"godlygeek/tabular",
|
||||
"tpope/vim-sleuth",
|
||||
"catgoose/nvim-colorizer.lua",
|
||||
{ "ixru/nvim-markdown", ft = "markdown" },
|
||||
"KeitaNakamura/tex-conceal.vim",
|
||||
"skywind3000/asyncrun.vim",
|
||||
"airblade/vim-gitgutter",
|
||||
"tpope/vim-abolish",
|
||||
"dhruvasagar/vim-table-mode",
|
||||
}
|
||||
|
||||
40
home/neovim/neovim/lua/plugins/formatting.lua
Normal file
40
home/neovim/neovim/lua/plugins/formatting.lua
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
-- Formatting plugins
|
||||
|
||||
return {
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
opts = {
|
||||
notify_on_error = false,
|
||||
format_on_save = {
|
||||
timeout_ms = 2500,
|
||||
lsp_fallback = true,
|
||||
},
|
||||
formatters = {
|
||||
beautysh = {
|
||||
prepend_args = { "--indent-size", "2" },
|
||||
},
|
||||
golines = {
|
||||
prepend_args = {
|
||||
"--max-len=100",
|
||||
"--base-formatter=gofmt",
|
||||
},
|
||||
},
|
||||
},
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
python = { "ruff_format" },
|
||||
cpp = { "clang-format" },
|
||||
c = { "clang-format" },
|
||||
sh = { "beautysh" },
|
||||
tex = { "latexindent" },
|
||||
java = { "google-java-format" },
|
||||
javascript = { "prettier" },
|
||||
typescript = { "deno_fmt" },
|
||||
typescriptreact = { "deno_fmt" },
|
||||
svelte = { "deno_fmt" },
|
||||
json = { "prettier" },
|
||||
go = { "golines" },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
51
home/neovim/neovim/lua/plugins/iron.lua
Normal file
51
home/neovim/neovim/lua/plugins/iron.lua
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
-- Iron REPL plugin configuration
|
||||
|
||||
return {
|
||||
"Vigemus/iron.nvim",
|
||||
ft = { "python" },
|
||||
config = function()
|
||||
local iron = require("iron.core")
|
||||
local view = require("iron.view")
|
||||
|
||||
iron.setup({
|
||||
config = {
|
||||
-- Whether a repl should be discarded or not
|
||||
scratch_repl = true,
|
||||
-- Your repl definitions come here
|
||||
repl_definition = {
|
||||
python = {
|
||||
-- Can be a table or a function that
|
||||
-- returns a table (see below)
|
||||
command = "ipython --no-autoindent",
|
||||
},
|
||||
},
|
||||
-- How the repl window will be displayed
|
||||
-- See below for more information
|
||||
repl_open_cmd = require("iron.view").bottom(20),
|
||||
},
|
||||
-- Iron doesn't set keymaps by default anymore.
|
||||
-- You can set them here or manually add keymaps to the functions in iron.core
|
||||
keymaps = {
|
||||
visual_send = "<leader>sc",
|
||||
send_file = "<leader>sf",
|
||||
send_line = "<leader>sl",
|
||||
cr = "<leader>s<cr>",
|
||||
interrupt = "<leader>s<space>",
|
||||
exit = "<leader>sq",
|
||||
clear = "<leader>cl",
|
||||
},
|
||||
-- If the highlight is on, you can change how it looks
|
||||
-- For the available options, check nvim_set_hl
|
||||
highlight = {
|
||||
italic = true,
|
||||
},
|
||||
ignore_blank_lines = false, -- ignore blank lines when sending visual select lines
|
||||
})
|
||||
vim.keymap.set("n", ";rs", "<cmd>IronRepl<cr>")
|
||||
vim.keymap.set("n", ";rr", "<cmd>IronRestart<cr>")
|
||||
vim.keymap.set("n", ";rf", "<cmd>IronFocus<cr>")
|
||||
vim.keymap.set("n", ";rh", "<cmd>IronHide<cr>")
|
||||
|
||||
repl_open_cmd = "horizontal bot 20 split"
|
||||
end,
|
||||
}
|
||||
262
home/neovim/neovim/lua/plugins/lsp.lua
Normal file
262
home/neovim/neovim/lua/plugins/lsp.lua
Normal file
|
|
@ -0,0 +1,262 @@
|
|||
-- LSP configuration
|
||||
|
||||
return {
|
||||
{
|
||||
"mfussenegger/nvim-jdtls",
|
||||
ft = "java",
|
||||
config = function()
|
||||
local jdtls = require("jdtls")
|
||||
|
||||
-- Find project root
|
||||
local root_dir = require("jdtls.setup").find_root({ ".git", "mvnw", "gradlew" })
|
||||
|
||||
-- Path to your exported Eclipse/IntelliJ style xml
|
||||
local style_path = vim.fn.expand("~/.config/nvim/formatters/eclipse-java-google-style.xml")
|
||||
|
||||
local java_home = os.getenv("NVIM_JDTLS_JAVA_HOME")
|
||||
|
||||
local config = {
|
||||
cmd = {
|
||||
java_home .. "/bin/java",
|
||||
"-Declipse.application=org.eclipse.jdt.ls.core.id1",
|
||||
"-Dosgi.bundles.defaultStartLevel=4",
|
||||
"-Declipse.product=org.eclipse.jdt.ls.core.product",
|
||||
"-Dlog.protocol=true",
|
||||
"-Dlog.level=ALL",
|
||||
"-Xms1g",
|
||||
"--add-modules=ALL-SYSTEM",
|
||||
"--add-opens",
|
||||
"java.base/java.util=ALL-UNNAMED",
|
||||
"--add-opens",
|
||||
"java.base/java.lang=ALL-UNNAMED",
|
||||
"-jar",
|
||||
vim.fn.glob(
|
||||
vim.fn.stdpath("data") .. "/mason/packages/jdtls/plugins/org.eclipse.equinox.launcher_*.jar"
|
||||
),
|
||||
"-configuration",
|
||||
vim.fn.glob(vim.fn.stdpath("data") .. "/mason/packages/jdtls/config_mac"),
|
||||
"-data",
|
||||
vim.fn.expand("~/.cache/jdtls-workspace/") .. "/" .. root_dir:gsub(":", "_"),
|
||||
},
|
||||
root_dir = root_dir,
|
||||
settings = {
|
||||
java = {
|
||||
format = {
|
||||
enabled = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
jdtls.start_or_attach(config)
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
opts = {
|
||||
autoformat = false,
|
||||
},
|
||||
dependencies = {
|
||||
"williamboman/mason.nvim",
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
"WhoIsSethDaniel/mason-tool-installer.nvim",
|
||||
{ "j-hui/fidget.nvim", opts = {} },
|
||||
},
|
||||
config = function()
|
||||
local util = require("lspconfig.util")
|
||||
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
group = vim.api.nvim_create_augroup("kickstart-lsp-attach", { clear = true }),
|
||||
callback = function(event)
|
||||
local map = function(keys, func, desc)
|
||||
vim.keymap.set("n", keys, func, { buffer = event.buf, desc = "LSP: " .. desc })
|
||||
end
|
||||
|
||||
map("gr", require("telescope.builtin").lsp_references, "[G]oto [R]eferences")
|
||||
map("<leader>I", require("telescope.builtin").lsp_implementations, "[G]oto [I]mplementation")
|
||||
map("<leader>D", require("telescope.builtin").lsp_type_definitions, "Type [D]efinition")
|
||||
map("<leader>ds", require("telescope.builtin").lsp_document_symbols, "[D]ocument [S]ymbols")
|
||||
map(
|
||||
"<leader>ws",
|
||||
require("telescope.builtin").lsp_dynamic_workspace_symbols,
|
||||
"[W]orkspace [S]ymbols"
|
||||
)
|
||||
map("<leader>rn", vim.lsp.buf.rename, "[R]e[n]ame")
|
||||
map("<leader>ca", vim.lsp.buf.code_action, "[C]ode [A]ction")
|
||||
map("K", vim.lsp.buf.hover, "Hover Documentation")
|
||||
map("gD", vim.lsp.buf.declaration, "[G]oto [D]eclaration")
|
||||
|
||||
local client = vim.lsp.get_client_by_id(event.data.client_id)
|
||||
if client and client.server_capabilities.documentHighlightProvider then
|
||||
vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, {
|
||||
buffer = event.buf,
|
||||
callback = vim.lsp.buf.document_highlight,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd({ "CursorMoved", "CursorMovedI" }, {
|
||||
buffer = event.buf,
|
||||
callback = vim.lsp.buf.clear_references,
|
||||
})
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities = vim.tbl_deep_extend("force", capabilities, require("cmp_nvim_lsp").default_capabilities())
|
||||
|
||||
local function is_executable(path)
|
||||
return path and vim.fn.executable(path) == 1
|
||||
end
|
||||
|
||||
local function get_python_path(root_dir)
|
||||
local candidates = {}
|
||||
local active_venv = os.getenv("VIRTUAL_ENV")
|
||||
|
||||
if root_dir then
|
||||
vim.list_extend(candidates, {
|
||||
util.path.join(root_dir, ".venv", "bin", "python"),
|
||||
util.path.join(root_dir, "venv", "bin", "python"),
|
||||
})
|
||||
end
|
||||
|
||||
if active_venv then
|
||||
table.insert(candidates, util.path.join(active_venv, "bin", "python"))
|
||||
end
|
||||
|
||||
table.insert(candidates, vim.fn.exepath("python3"))
|
||||
table.insert(candidates, vim.fn.exepath("python"))
|
||||
|
||||
for _, path in ipairs(candidates) do
|
||||
if is_executable(path) then
|
||||
return path
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local servers = {
|
||||
clangd = {
|
||||
filetypes = {
|
||||
"c",
|
||||
"cpp",
|
||||
"cuda",
|
||||
},
|
||||
},
|
||||
yamlls = { settings = { yaml = { format = { enable = true } } } },
|
||||
pyright = {
|
||||
root_dir = util.root_pattern(
|
||||
"pyproject.toml",
|
||||
"uv.lock",
|
||||
"setup.py",
|
||||
"setup.cfg",
|
||||
"requirements.txt",
|
||||
".git"
|
||||
),
|
||||
before_init = function(_, config)
|
||||
local python_path = get_python_path(config.root_dir)
|
||||
config.settings = vim.tbl_deep_extend("force", config.settings or {}, {
|
||||
python = {
|
||||
pythonPath = python_path,
|
||||
analysis = {
|
||||
autoSearchPaths = true,
|
||||
useLibraryCodeForTypes = true,
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
ruff = {
|
||||
on_attach = function(client)
|
||||
client.server_capabilities.documentFormattingProvider = false
|
||||
end,
|
||||
},
|
||||
jsonls = {},
|
||||
denols = {},
|
||||
svelte = {},
|
||||
arduino_language_server = {},
|
||||
zls = {},
|
||||
ltex = {
|
||||
settings = {
|
||||
ltex = {
|
||||
enabled = { "latex", "tex", "bib", "markdown" },
|
||||
language = "auto",
|
||||
diagnosticSeverity = "information",
|
||||
sentenceCacheSize = 2000,
|
||||
latex = {
|
||||
commands = {
|
||||
["\\hypertarget"] = "dummy",
|
||||
},
|
||||
},
|
||||
dictionary = (function()
|
||||
local files = {}
|
||||
for _, file in ipairs(vim.api.nvim_get_runtime_file("dict/*", true)) do
|
||||
local lang = vim.fn.fnamemodify(file, ":t:r")
|
||||
local fullpath = vim.fs.normalize(file, ":p")
|
||||
files[lang] = { ":" .. fullpath }
|
||||
end
|
||||
|
||||
if files.default then
|
||||
for lang, _ in pairs(files) do
|
||||
if lang ~= "default" then
|
||||
vim.list_extend(files[lang], files.default)
|
||||
end
|
||||
end
|
||||
files.default = nil
|
||||
end
|
||||
return files
|
||||
end)(),
|
||||
},
|
||||
},
|
||||
},
|
||||
lua_ls = {
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = { version = "LuaJIT" },
|
||||
workspace = {
|
||||
checkThirdParty = false,
|
||||
library = {
|
||||
"${3rd}/luv/library",
|
||||
unpack(vim.api.nvim_get_runtime_file("", true)),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
require("mason").setup()
|
||||
|
||||
local ensure_installed = vim.tbl_keys(servers or {})
|
||||
vim.list_extend(ensure_installed, {
|
||||
"jdtls",
|
||||
"stylua",
|
||||
"ruff",
|
||||
"clang-format",
|
||||
"beautysh",
|
||||
"latexindent",
|
||||
"prettier",
|
||||
})
|
||||
require("mason-tool-installer").setup({ ensure_installed = ensure_installed })
|
||||
|
||||
require("mason-lspconfig").setup({
|
||||
handlers = {
|
||||
function(server_name)
|
||||
local server = servers[server_name] or {}
|
||||
require("lspconfig")[server_name].setup({
|
||||
cmd = server.cmd,
|
||||
on_attach = server.on_attach,
|
||||
before_init = server.before_init,
|
||||
on_init = function(client)
|
||||
client.offset_encoding = "utf-8"
|
||||
end,
|
||||
root_dir = server.root_dir,
|
||||
settings = server.settings,
|
||||
filetypes = server.filetypes,
|
||||
capabilities = vim.tbl_deep_extend("force", {}, capabilities, server.capabilities or {}),
|
||||
})
|
||||
end,
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
36
home/neovim/neovim/lua/plugins/telescope.lua
Normal file
36
home/neovim/neovim/lua/plugins/telescope.lua
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
-- Telescope fuzzy finder configuration
|
||||
|
||||
return {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
event = "VeryLazy",
|
||||
branch = "master",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
{ "nvim-tree/nvim-web-devicons" },
|
||||
{ "nvim-telescope/telescope-live-grep-args.nvim" },
|
||||
{
|
||||
"nvim-telescope/telescope-fzf-native.nvim",
|
||||
build = "make",
|
||||
cond = function()
|
||||
return vim.fn.executable("make") == 1
|
||||
end,
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
require("telescope").setup({
|
||||
defaults = vim.tbl_extend("force", require("telescope.themes").get_ivy(), {
|
||||
path_display = { "smart" },
|
||||
}),
|
||||
})
|
||||
|
||||
pcall(require("telescope").load_extension("live_grep_args"))
|
||||
local builtin = require("telescope.builtin")
|
||||
vim.keymap.set("n", "<C-g>", require("telescope").extensions.live_grep_args.live_grep_args)
|
||||
vim.keymap.set(
|
||||
"x",
|
||||
"<C-g>",
|
||||
"\"zy:lua require('telescope').extensions.live_grep_args.live_grep_args(require('telescope.themes').get_ivy({}))<cr><c-r>z"
|
||||
)
|
||||
vim.keymap.set("n", "<C-f>", builtin.find_files)
|
||||
end,
|
||||
}
|
||||
143
home/neovim/neovim/lua/plugins/ui.lua
Normal file
143
home/neovim/neovim/lua/plugins/ui.lua
Normal file
|
|
@ -0,0 +1,143 @@
|
|||
-- UI and appearance plugins
|
||||
|
||||
return {
|
||||
{
|
||||
"zenbones-theme/zenbones.nvim",
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
dependencies = "rktjmp/lush.nvim",
|
||||
config = function()
|
||||
if vim.g.light_mode then
|
||||
vim.o.background = "light"
|
||||
else
|
||||
vim.o.background = "dark"
|
||||
end
|
||||
vim.cmd.colorscheme("zenwritten")
|
||||
vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
|
||||
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
|
||||
end,
|
||||
},
|
||||
|
||||
{ "folke/todo-comments.nvim", dependencies = { "nvim-lua/plenary.nvim" }, opts = { signs = false } },
|
||||
|
||||
{
|
||||
"echasnovski/mini.nvim",
|
||||
keys = {
|
||||
{
|
||||
"<leader>m",
|
||||
function()
|
||||
require("mini.files").open(vim.api.nvim_buf_get_name(0), true)
|
||||
end,
|
||||
desc = "Open mini.files (Directory of Current File)",
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
require("mini.files").setup()
|
||||
local getWords = require("utils.statusline").getWords
|
||||
require("mini.statusline").setup({
|
||||
content = {
|
||||
active = function()
|
||||
local mode, mode_hl = MiniStatusline.section_mode({ trunc_width = 120 })
|
||||
local git = MiniStatusline.section_git({ trunc_width = 75 })
|
||||
local diagnostics = MiniStatusline.section_diagnostics({ trunc_width = 75 })
|
||||
local filename = MiniStatusline.section_filename({ trunc_width = 140 })
|
||||
local fileinfo = MiniStatusline.section_fileinfo({ trunc_width = 120 })
|
||||
local location = MiniStatusline.section_location({ trunc_width = 75 })
|
||||
local search = MiniStatusline.section_searchcount({ trunc_width = 75 })
|
||||
local words = getWords()
|
||||
return MiniStatusline.combine_groups({
|
||||
|
||||
{ hl = mode_hl, strings = { mode } },
|
||||
{ hl = "MiniStatuslineDevinfo", strings = { git, diagnostics } },
|
||||
"%<",
|
||||
{ hl = "MiniStatuslineFilename", strings = { filename } },
|
||||
"%=",
|
||||
{ hl = "MiniStatuslineFileinfo", strings = { fileinfo } },
|
||||
{ hl = "MiniStatuslineFileinfo", strings = { words } },
|
||||
{ hl = mode_hl, strings = { search, location } },
|
||||
})
|
||||
end,
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
branch = "main",
|
||||
main = "nvim-treesitter",
|
||||
build = ":TSUpdate",
|
||||
init = function()
|
||||
-- Install parsers that aren't already present
|
||||
local ensure_installed = { "bash", "c", "html", "lua", "markdown", "vim", "vimdoc" }
|
||||
local already_installed = require("nvim-treesitter.config").get_installed()
|
||||
local to_install = vim.iter(ensure_installed)
|
||||
:filter(function(parser)
|
||||
return not vim.tbl_contains(already_installed, parser)
|
||||
end)
|
||||
:totable()
|
||||
if #to_install > 0 then
|
||||
require("nvim-treesitter").install(to_install)
|
||||
end
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"folke/snacks.nvim",
|
||||
priority = 1000,
|
||||
lazy = false,
|
||||
opts = {
|
||||
dashboard = { enabled = true },
|
||||
input = { enabled = true },
|
||||
terminal = { enabled = true },
|
||||
notify = { enabled = true },
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<leader>T",
|
||||
function()
|
||||
Snacks.terminal()
|
||||
end,
|
||||
desc = "Toggle Terminal",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
"folke/trouble.nvim",
|
||||
opts = {},
|
||||
cmd = "Trouble",
|
||||
keys = {
|
||||
{
|
||||
"<leader>xx",
|
||||
"<cmd>Trouble diagnostics toggle<cr>",
|
||||
desc = "Diagnostics (Trouble)",
|
||||
},
|
||||
{
|
||||
"<leader>xX",
|
||||
"<cmd>Trouble diagnostics toggle filter.buf=0<cr>",
|
||||
desc = "Buffer Diagnostics (Trouble)",
|
||||
},
|
||||
{
|
||||
"<leader>cs",
|
||||
"<cmd>Trouble symbols toggle focus=false<cr>",
|
||||
desc = "Symbols (Trouble)",
|
||||
},
|
||||
{
|
||||
"<leader>cl",
|
||||
"<cmd>Trouble lsp toggle focus=false win.position=right<cr>",
|
||||
desc = "LSP Definitions / references / ... (Trouble)",
|
||||
},
|
||||
{
|
||||
"<leader>xL",
|
||||
"<cmd>Trouble loclist toggle<cr>",
|
||||
desc = "Location List (Trouble)",
|
||||
},
|
||||
{
|
||||
"<leader>xQ",
|
||||
"<cmd>Trouble qflist toggle<cr>",
|
||||
desc = "Quickfix List (Trouble)",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
5
home/neovim/neovim/lua/telescope_settings.lua
Normal file
5
home/neovim/neovim/lua/telescope_settings.lua
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
require('telescope').setup{
|
||||
defaults = {
|
||||
path_display={"smart"},
|
||||
}
|
||||
}
|
||||
55
home/neovim/neovim/lua/todo-config.lua
Normal file
55
home/neovim/neovim/lua/todo-config.lua
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
require("todo-comments").setup({
|
||||
signs = true, -- show icons in the signs column
|
||||
sign_priority = 8, -- sign priority
|
||||
-- keywords recognized as todo comments
|
||||
keywords = {
|
||||
FIX = {
|
||||
icon = " ", -- icon used for the sign, and in search results
|
||||
color = "error", -- can be a hex color, or a named color (see below)
|
||||
alt = { "FIXME", "BUG", "FIXIT", "ISSUE" }, -- a set of other keywords that all map to this FIX keywords
|
||||
-- signs = false, -- configure signs for some keywords individually
|
||||
},
|
||||
TODO = { icon = " ", color = "info" },
|
||||
HACK = { icon = " ", color = "warning" },
|
||||
WARN = { icon = " ", color = "warning", alt = { "WARNING", "XXX" } },
|
||||
PERF = { icon = " ", alt = { "OPTIM", "PERFORMANCE", "OPTIMIZE" } },
|
||||
NOTE = { icon = " ", color = "hint", alt = { "INFO" } },
|
||||
},
|
||||
merge_keywords = true, -- when true, custom keywords will be merged with the defaults
|
||||
-- highlighting of the line containing the todo comment
|
||||
-- * before: highlights before the keyword (typically comment characters)
|
||||
-- * keyword: highlights of the keyword
|
||||
-- * after: highlights after the keyword (todo text)
|
||||
highlight = {
|
||||
before = "", -- "fg" or "bg" or empty
|
||||
keyword = "wide", -- "fg", "bg", "wide" or empty. (wide is the same as bg, but will also highlight surrounding characters)
|
||||
after = "fg", -- "fg" or "bg" or empty
|
||||
pattern = [[.*<(KEYWORDS)\s*:]], -- pattern or table of patterns, used for highlightng (vim regex)
|
||||
comments_only = true, -- uses treesitter to match keywords in comments only
|
||||
max_line_len = 400, -- ignore lines longer than this
|
||||
exclude = {}, -- list of file types to exclude highlighting
|
||||
},
|
||||
-- list of named colors where we try to extract the guifg from the
|
||||
-- list of hilight groups or use the hex color if hl not found as a fallback
|
||||
colors = {
|
||||
error = { "DiagnosticError", "ErrorMsg", "#DC2626" },
|
||||
warning = { "DiagnosticWarning", "WarningMsg", "#FBBF24" },
|
||||
info = { "DiagnosticInfo", "#2563EB" },
|
||||
hint = { "DiagnosticHint", "#10B981" },
|
||||
default = { "Identifier", "#7C3AED" },
|
||||
},
|
||||
search = {
|
||||
command = "rg",
|
||||
args = {
|
||||
"--color=never",
|
||||
"--no-heading",
|
||||
"--with-filename",
|
||||
"--line-number",
|
||||
"--column",
|
||||
},
|
||||
-- regex that will be used to match keywords.
|
||||
-- don't replace the (KEYWORDS) placeholder
|
||||
pattern = [[\b(KEYWORDS):]], -- ripgrep regex
|
||||
-- pattern = [[\b(KEYWORDS)\b]], -- match without the extra colon. You'll likely get false positives
|
||||
},
|
||||
})
|
||||
15
home/neovim/neovim/lua/utils/statusline.lua
Normal file
15
home/neovim/neovim/lua/utils/statusline.lua
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
-- Statusline utilities
|
||||
|
||||
local M = {}
|
||||
|
||||
-- Function to get word count in status line
|
||||
function M.getWords()
|
||||
-- the third string here is the string for visual-block mode (^V)
|
||||
if vim.fn.mode() == "v" or vim.fn.mode() == "V" or vim.fn.mode() == "" then
|
||||
return vim.fn.wordcount().visual_words .. ""
|
||||
else
|
||||
return vim.fn.wordcount().words .. ""
|
||||
end
|
||||
end
|
||||
|
||||
return M
|
||||
25
home/neovim/neovim/lua/workspace.lua
Normal file
25
home/neovim/neovim/lua/workspace.lua
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
local util = require('lspconfig.util')
|
||||
|
||||
local join = util.path.join
|
||||
|
||||
local M = {}
|
||||
|
||||
local env = {
|
||||
HOME = vim.loop.os_homedir(),
|
||||
XDG_CACHE_HOME = os.getenv('XDG_CACHE_HOME'),
|
||||
}
|
||||
|
||||
---Returns the default workspace directory
|
||||
---@return string
|
||||
function M.get_default_workspace()
|
||||
local cache_dir = env.XDG_CACHE_HOME and env.XDG_CACHE_HOME
|
||||
or join(env.HOME, '.cache')
|
||||
local project_name = vim.fn.fnamemodify(vim.fn.getcwd(), ':p:h:t')
|
||||
|
||||
local path =
|
||||
join(cache_dir, 'jdtls', 'workspaces', project_name)
|
||||
|
||||
return path
|
||||
end
|
||||
|
||||
return M
|
||||
52
home/neovim/neovim/spell/en.utf-8.add
Normal file
52
home/neovim/neovim/spell/en.utf-8.add
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
interphase
|
||||
nanolaminate
|
||||
microstructures
|
||||
multilayers
|
||||
multiscale
|
||||
microrotation
|
||||
microcontinuum
|
||||
microstructure
|
||||
heterostructured
|
||||
proven
|
||||
diffusionless
|
||||
martensitic
|
||||
embrittlement
|
||||
deliverables
|
||||
minima
|
||||
energetics
|
||||
Predictiveness
|
||||
atomistic
|
||||
foundational
|
||||
diffusivity
|
||||
equilibrated
|
||||
compositionally
|
||||
compositional
|
||||
nanometers
|
||||
undeformed
|
||||
interdiffusion
|
||||
nanolaminates
|
||||
interdiffused
|
||||
monatomic
|
||||
atomistics
|
||||
interfacial
|
||||
interatomic
|
||||
Fortran
|
||||
runtimes
|
||||
spacings
|
||||
unrelaxed
|
||||
a
|
||||
nm
|
||||
centroids
|
||||
microrotations
|
||||
centroid
|
||||
evolutions
|
||||
recomendations
|
||||
rhombohedron
|
||||
inhibitive
|
||||
parallelized
|
||||
assumming
|
||||
exhibitted
|
||||
manyfold
|
||||
reusability
|
||||
Architected
|
||||
roadmaps
|
||||
BIN
home/neovim/neovim/spell/en.utf-8.add.spl
Normal file
BIN
home/neovim/neovim/spell/en.utf-8.add.spl
Normal file
Binary file not shown.
13
home/root/home.nix
Normal file
13
home/root/home.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{config, pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
../shell/shell.nix
|
||||
../neovim/neovim.nix
|
||||
];
|
||||
|
||||
home.username = "root";
|
||||
home.homeDirectory = "/root";
|
||||
home.stateVersion = "26.05";
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
}
|
||||
80
home/shell/.tmux.conf
Normal file
80
home/shell/.tmux.conf
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
#Make nicer tmux motion keys that work with vim as well
|
||||
set -g xterm-keys on
|
||||
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
|
||||
| grep -iqE '^[^TXZ ]+ +(\\S+\/)?g?(view|n?vim?x?)(diff)?$'"
|
||||
|
||||
bind-key -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
|
||||
bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
|
||||
bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
|
||||
bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
|
||||
bind-key -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
|
||||
|
||||
unbind C-b
|
||||
set -g prefix C-p
|
||||
bind C-p send-prefix
|
||||
|
||||
#Sane split commands
|
||||
bind v split-window -h -c "#{pane_current_path}"
|
||||
bind s split-window -v -c "#{pane_current_path}"
|
||||
unbind '"'
|
||||
unbind %
|
||||
|
||||
# New windows open in current directory
|
||||
bind c new-window -c "#{pane_current_path}"
|
||||
|
||||
# reload config file (change file location to your the tmux.conf you want to use)
|
||||
bind r source-file ~/.tmux.conf
|
||||
|
||||
# Vim key bindings
|
||||
set-window-option -g mode-keys vi
|
||||
|
||||
bind-key -T copy-mode-vi v send-keys -X begin-selection
|
||||
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -in -selection primary"
|
||||
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xclip -in -selection primary"
|
||||
|
||||
# don't do anything when a 'bell' rings
|
||||
set -g visual-activity off
|
||||
set -g visual-bell off
|
||||
set -g visual-silence off
|
||||
setw -g monitor-activity off
|
||||
set -g bell-action none
|
||||
|
||||
# clock mode
|
||||
setw -g clock-mode-colour "#BBBBBB"
|
||||
|
||||
# copy mode
|
||||
setw -g mode-style 'fg=black bg=red bold'
|
||||
|
||||
# panes
|
||||
set -g pane-border-style 'fg=red'
|
||||
set -g pane-active-border-style 'fg=yellow'
|
||||
|
||||
# statusbar
|
||||
set -g status-position bottom
|
||||
set -g status-justify left
|
||||
set -g status-style 'fg=black bold'
|
||||
|
||||
set -g status-left '#( [ -n "$SSH_CONNECTION" ] && printf " #[fg=red,bold][SSH]" ) '
|
||||
set -g status-left-length 10
|
||||
|
||||
set -g status-right-style 'fg=white bold bg=black'
|
||||
set -g status-right '%Y-%m-%d %H:%M '
|
||||
set -g status-right-length 50
|
||||
|
||||
setw -g window-status-current-style 'fg=red bold bg=black'
|
||||
setw -g window-status-current-format ' #I #W #F '
|
||||
|
||||
setw -g window-status-style 'fg=white bg=black'
|
||||
setw -g window-status-format ' #I #[fg=white]#W #F '
|
||||
|
||||
setw -g window-status-bell-style 'fg=yellow bg=red bold'
|
||||
|
||||
# messages
|
||||
set -g message-style 'fg=white bg=black'
|
||||
|
||||
# Pass through shift+enter
|
||||
set -g extended-keys on
|
||||
set -g extended-keys-format csi-u
|
||||
|
||||
# Dim inactive panes
|
||||
source-file ~/.config/tmux/theme.conf
|
||||
225
home/shell/.zshrc
Normal file
225
home/shell/.zshrc
Normal file
|
|
@ -0,0 +1,225 @@
|
|||
#==============================================================================
|
||||
# Zsh Configuration
|
||||
#==============================================================================
|
||||
# History settings
|
||||
HISTFILE=~/.histfile
|
||||
HISTSIZE=100000
|
||||
SAVEHIST=100000
|
||||
setopt extendedglob notify
|
||||
unsetopt autocd beep
|
||||
setopt INC_APPEND_HISTORY # Write to history file immediately, not when shell exits
|
||||
setopt APPEND_HISTORY # Append instead of overwriting the file
|
||||
setopt HIST_IGNORE_DUPS # Don't save duplicate commands
|
||||
setopt HIST_IGNORE_SPACE # Don't save commands starting with space
|
||||
|
||||
#==============================================================================
|
||||
# Environment Variables
|
||||
#==============================================================================
|
||||
|
||||
export OMPI_MCA_rmaps_base_oversubscribe=1
|
||||
export CLICOLOR=1
|
||||
export LSCOLORS=ExGxBxDxCxEgEdxbxgxcxd
|
||||
export LS_COLORS='di=1;37:ln=35:so=32:pi=33:ex=1;32:bd=34;46:cd=34;43:su=30;41:sg=30;46:tw=30;42:ow=30;43'
|
||||
export XKB_DEFAULT_OPTIONS="caps:escape"
|
||||
export PASSWORD_STORE_CHARACTER_SET='a-zA-Z0-9+\-$!*_='
|
||||
export XDEB_PKGROOT=${HOME}/.config/xdeb
|
||||
export EDITOR=nvim
|
||||
export TERMINAL=ghostty
|
||||
export GOOGLE_CLOUD_PROJECT=slurm-slinky-k8s
|
||||
export SU2_RUN="~/.local/bin/"
|
||||
export SU2_HOME="~/builds/SU2/"
|
||||
export PYTHONPATH=$SU2_RUN:$PYTHONPATH
|
||||
|
||||
if [[ -f /etc/profiles/per-user/$USER/etc/profile.d/hm-session-vars.sh ]]; then
|
||||
source /etc/profiles/per-user/$USER/etc/profile.d/hm-session-vars.sh
|
||||
fi
|
||||
|
||||
# Custom path additions
|
||||
if [ -f "$HOME/.profile" ]; then
|
||||
source ~/.profile
|
||||
fi
|
||||
|
||||
if [ -f "$HOME/.local/share/os/habits.sh" ]; then
|
||||
source "$HOME/.local/share/os/habits.sh"
|
||||
fi
|
||||
|
||||
#==============================================================================
|
||||
# Aliases
|
||||
#==============================================================================
|
||||
|
||||
alias clip2png="xclip -selection clipboard -target image/png -out"
|
||||
if which kubectl > /dev/null; then
|
||||
alias k="kubectl"
|
||||
source <(k completion zsh)
|
||||
fi
|
||||
cc() {
|
||||
CLAUDE_SESSION="${1:-unnamed}" claude "${@:2}"
|
||||
}
|
||||
|
||||
ssh_no_tmux() {
|
||||
NO_TMUX=1 nohup ghostty --command="ssh $*" >/dev/null 2>&1 &
|
||||
}
|
||||
|
||||
alias jjn="jj new -B @ --no-edit"
|
||||
alias jjs="jj squash --interactive --from @ --into @-"
|
||||
alias jjp="jj bookmark move master --to @-; jj git push"
|
||||
alias pkg_search="nix search nixpkgs --extra-experimental-features 'nix-command flakes'"
|
||||
|
||||
sandbox() {
|
||||
local host_repos="$HOME/repos"
|
||||
local sandbox_cwd="/workspace"
|
||||
|
||||
if [[ "$PWD" == "$host_repos" ]]; then
|
||||
sandbox_cwd="/workspace"
|
||||
elif [[ "$PWD" == "$host_repos"/* ]]; then
|
||||
sandbox_cwd="/workspace/${PWD#$host_repos/}"
|
||||
fi
|
||||
|
||||
if ! docker ps -a --format '{{.Names}}' | grep -q '^dev-sandbox$'; then
|
||||
docker run -dit --name dev-sandbox \
|
||||
--env-file "$host_repos/dev_sandbox/.env" \
|
||||
-v "$host_repos:/workspace" \
|
||||
-v pi-state:/root/.pi \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
dev-sandbox:latest
|
||||
else
|
||||
docker start dev-sandbox 2>/dev/null
|
||||
fi
|
||||
|
||||
if (( $# > 0 )); then
|
||||
docker exec -it -w "$sandbox_cwd" dev-sandbox /bin/zsh -l -c 'exec "$@"' sandbox "$@"
|
||||
else
|
||||
docker exec -it -w "$sandbox_cwd" dev-sandbox /bin/zsh -l
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
#==============================================================================
|
||||
# Functions
|
||||
#==============================================================================
|
||||
|
||||
load_env() {
|
||||
set -a
|
||||
. "./$1"
|
||||
set +a
|
||||
}
|
||||
|
||||
#==============================================================================
|
||||
# os functions
|
||||
#==============================================================================
|
||||
alias t="nvim ~/.local/share/os/tasks.md"
|
||||
alias h="habits open"
|
||||
alias books="nvim ~/.local/share/os/books.md"
|
||||
alias mindset="nvim ~/.local/share/os/mindset.md"
|
||||
|
||||
#==============================================================================
|
||||
# Completions
|
||||
#==============================================================================
|
||||
|
||||
autoload -Uz compinit
|
||||
compinit
|
||||
zstyle ':compinstall' filename '/home/aselimov/.zshrc'
|
||||
zstyle -e ':completion:*:hosts' hosts 'reply=(
|
||||
${=${${(f)"$(cat {/etc/ssh_,~/ar.ssh/known_}hosts(|2)(N) 2>/dev/null)"}%%[#| ]*}//,/ }
|
||||
${=${${${${(@M)${(f)"$(cat ~/.ssh/config 2>/dev/null)"}:#Host *}#Host }:#*\**}:#*\?*}}
|
||||
)'
|
||||
|
||||
#==============================================================================
|
||||
# Plugins & Tools
|
||||
#==============================================================================
|
||||
|
||||
# nvm
|
||||
# Lazy-load nvm - only initialize when first used
|
||||
export NVM_DIR="$HOME/.nvm"
|
||||
|
||||
# Function to load nvm (called only once)
|
||||
load_nvm() {
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
|
||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
|
||||
}
|
||||
|
||||
# Create placeholder functions that load nvm once, then call the real command
|
||||
nvm() {
|
||||
unset -f nvm node npm
|
||||
load_nvm
|
||||
nvm "$@"
|
||||
}
|
||||
|
||||
node() {
|
||||
unset -f nvm node npm
|
||||
load_nvm
|
||||
node "$@"
|
||||
}
|
||||
|
||||
npm() {
|
||||
unset -f nvm node npm
|
||||
load_nvm
|
||||
npm "$@"
|
||||
}
|
||||
|
||||
# ghcup
|
||||
[ -f "/home/aselimov/.ghcup/env" ] && . "/home/aselimov/.ghcup/env" # ghcup-env
|
||||
|
||||
# pyenv
|
||||
if command -v pyenv >/dev/null 2>&1; then
|
||||
export PYENV_ROOT="$HOME/.pyenv"
|
||||
[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
|
||||
eval "$(pyenv init - zsh)"
|
||||
fi
|
||||
|
||||
# jenv
|
||||
if command -v jenv >/dev/null 2>&1; then
|
||||
export PATH="$HOME/.jenv/bin:$PATH"
|
||||
eval "$(jenv init -)"
|
||||
fi
|
||||
|
||||
# Simple notify function
|
||||
notify() {
|
||||
local cmd="$*"
|
||||
eval "$cmd"
|
||||
local rc=$?
|
||||
osascript -e "display notification \"Done (exit=$rc)\" with title \"${cmd//\"/\\\"}\""
|
||||
return $rc
|
||||
}
|
||||
|
||||
|
||||
# zsh-autosuggestions
|
||||
source "$HOME/.config/zsh/zsh-autosuggestions/zsh-autosuggestions.zsh"
|
||||
|
||||
# zsh-syntax-highlighting
|
||||
source "$HOME/.config/zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
|
||||
|
||||
# zsh-history-substring-search
|
||||
source "$HOME/.config/zsh/zsh-history-substring-search/zsh-history-substring-search.zsh"
|
||||
|
||||
#==============================================================================
|
||||
# Keybindings
|
||||
#==============================================================================
|
||||
|
||||
bindkey -v
|
||||
bindkey '^[[A' history-substring-search-up
|
||||
bindkey '^[[B' history-substring-search-down
|
||||
|
||||
#==============================================================================
|
||||
# OS-Specific Configuration
|
||||
#==============================================================================
|
||||
|
||||
if [ "$(uname)" = "Darwin" ]; then
|
||||
alias ls="gls --classify --group-directories-first --color"
|
||||
export NVIM_JDTLS_JAVA_HOME="/Library/Java/JavaVirtualMachines/temurin-21.jdk/Contents/Home/"
|
||||
else
|
||||
alias ls="ls --classify --group-directories-first --color"
|
||||
fi
|
||||
|
||||
# starship
|
||||
eval "$(starship init zsh)"
|
||||
|
||||
if [[ -z "$TMUX" ]] && [[ -n "$PS1" ]] && [[ -z "$NO_TMUX" ]]; then
|
||||
tmux attach -t dev || tmux new -s dev
|
||||
fi
|
||||
|
||||
# Get remaining habits
|
||||
if [ -n "$HABITS" ]; then
|
||||
echo "Habits remaining are:"
|
||||
habits left
|
||||
fi
|
||||
51
home/shell/shell.nix
Normal file
51
home/shell/shell.nix
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
{config, pkgs, ...}:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
starship
|
||||
];
|
||||
xdg.configFile."starship.toml".source = ./starship.toml;
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
initContent=''
|
||||
source ${./.zshrc}
|
||||
'';
|
||||
shellAliases = {
|
||||
sudo = "doas";
|
||||
};
|
||||
};
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
|
||||
config = {
|
||||
global = {
|
||||
hide_env_diff = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
xdg.configFile."zsh/zsh-syntax-highlighting".source = builtins.fetchGit {
|
||||
url = "https://forge.alexselimov.com/aselimov/zsh-syntax-highlighting.git";
|
||||
rev = "2fc57d63067c18b1100ecdbf684fa5baf49459d1";
|
||||
};
|
||||
|
||||
xdg.configFile."zsh/zsh-history-substring-search".source = builtins.fetchGit {
|
||||
url = "https://forge.alexselimov.com/aselimov/zsh-history-substring-search.git";
|
||||
rev = "14c8d2e0ffaee98f2df9850b19944f32546fdea5";
|
||||
};
|
||||
|
||||
xdg.configFile."zsh/zsh-autosuggestions".source = builtins.fetchGit {
|
||||
url = "https://forge.alexselimov.com/aselimov/zsh-autosuggestions.git";
|
||||
rev = "85919cd1ffa7d2d5412f6d3fe437ebdbeeec4fc5";
|
||||
};
|
||||
|
||||
programs.tmux.enable = true;
|
||||
xdg.configFile."tmux/tmux.conf".source = ./.tmux.conf;
|
||||
xdg.configFile."tmux/themes/zenwritten-light.conf".text = ''
|
||||
set -g window-style 'bg=gray'
|
||||
'';
|
||||
xdg.configFile."tmux/themes/zenwritten-dark.conf".text = ''
|
||||
set -g window-style 'bg=brightblack'
|
||||
'';
|
||||
}
|
||||
166
home/shell/starship.toml
Normal file
166
home/shell/starship.toml
Normal file
|
|
@ -0,0 +1,166 @@
|
|||
#8e8e8e normal
|
||||
#BBBBBB bold
|
||||
#66a5ad accent
|
||||
|
||||
format = """
|
||||
$username\
|
||||
$hostname\
|
||||
$shlvl\
|
||||
$kubernetes\
|
||||
$directory\
|
||||
$hg_branch\
|
||||
$docker_context\
|
||||
$package\
|
||||
$cmake\
|
||||
$dart\
|
||||
$dotnet\
|
||||
$elixir\
|
||||
$elm\
|
||||
$erlang\
|
||||
$golang\
|
||||
$helm\
|
||||
$java\
|
||||
$julia\
|
||||
$kotlin\
|
||||
$nim\
|
||||
$nodejs\
|
||||
$ocaml\
|
||||
$perl\
|
||||
$php\
|
||||
$purescript\
|
||||
$python\
|
||||
$ruby\
|
||||
$rust\
|
||||
$swift\
|
||||
$terraform\
|
||||
$zig\
|
||||
$nix_shell\
|
||||
$conda\
|
||||
$memory_usage\
|
||||
$aws\
|
||||
$gcloud\
|
||||
$openstack\
|
||||
$env_var\
|
||||
$crystal\
|
||||
$custom\
|
||||
$cmd_duration\
|
||||
$line_break\
|
||||
$lua\
|
||||
$jobs\
|
||||
$battery\
|
||||
$time\
|
||||
$status\
|
||||
$character"""
|
||||
|
||||
[username]
|
||||
style_user = 'bold #66a5ad'
|
||||
|
||||
[hostname]
|
||||
style = 'bold #BBBBBB'
|
||||
ssh_symbol = ""
|
||||
|
||||
[singularity]
|
||||
style = 'bold #BBBBBB'
|
||||
|
||||
[kubernetes]
|
||||
style = 'bold #BBBBBB'
|
||||
|
||||
[vcsh]
|
||||
style = 'bold white'
|
||||
|
||||
[git_branch]
|
||||
style = 'bold #BBBBBB'
|
||||
|
||||
[git_commit]
|
||||
style = 'bold #BBBBBB'
|
||||
|
||||
[docker_context]
|
||||
style = 'bold #BBBBBB'
|
||||
[package]
|
||||
style = 'bold #BBBBBB'
|
||||
symbol = " "
|
||||
[cmake]
|
||||
style = 'bold #BBBBBB'
|
||||
[dart]
|
||||
style = 'bold #BBBBBB'
|
||||
[dotnet]
|
||||
style = 'bold #BBBBBB'
|
||||
[elixir]
|
||||
style = 'bold #BBBBBB'
|
||||
[elm]
|
||||
style = 'bold #BBBBBB'
|
||||
[erlang]
|
||||
style = 'bold #BBBBBB'
|
||||
[golang]
|
||||
style = 'bold #BBBBBB'
|
||||
[helm]
|
||||
style = 'bold #BBBBBB'
|
||||
[java]
|
||||
style = 'bold #BBBBBB'
|
||||
[julia]
|
||||
style = 'bold #BBBBBB'
|
||||
[kotlin]
|
||||
style = 'bold #BBBBBB'
|
||||
[nim]
|
||||
style = 'bold #BBBBBB'
|
||||
[nodejs]
|
||||
style = 'bold #BBBBBB'
|
||||
[ocaml]
|
||||
style = 'bold #BBBBBB'
|
||||
[perl]
|
||||
style = 'bold #BBBBBB'
|
||||
[php]
|
||||
style = 'bold #BBBBBB'
|
||||
[purescript]
|
||||
style = 'bold #BBBBBB'
|
||||
[ruby]
|
||||
style = 'bold #BBBBBB'
|
||||
[swift]
|
||||
style = 'bold #BBBBBB'
|
||||
[terraform]
|
||||
style = 'bold #BBBBBB'
|
||||
[zig]
|
||||
style = 'bold #BBBBBB'
|
||||
[nix_shell]
|
||||
style = 'bold #BBBBBB'
|
||||
[conda]
|
||||
style = 'bold #BBBBBB'
|
||||
[memory_usage]
|
||||
style = 'bold #BBBBBB'
|
||||
[aws]
|
||||
style = 'bold #BBBBBB'
|
||||
[gcloud]
|
||||
style = 'bold #BBBBBB'
|
||||
disabled=true
|
||||
[openstack]
|
||||
style = 'bold #BBBBBB'
|
||||
[crystal]
|
||||
style = 'bold #BBBBBB'
|
||||
[cmd_duration]
|
||||
style = 'bold #BBBBBB'
|
||||
[lua]
|
||||
style = 'bold #BBBBBB'
|
||||
symbol = " "
|
||||
[jobs]
|
||||
style = 'bold #BBBBBB'
|
||||
[time]
|
||||
style = 'bold #BBBBBB'
|
||||
|
||||
|
||||
[python]
|
||||
symbol = " "
|
||||
style = 'bold #BBBBBB'
|
||||
|
||||
[rust]
|
||||
symbol = " "
|
||||
style = 'bold #BBBBBB'
|
||||
|
||||
[directory]
|
||||
truncate_to_repo = false
|
||||
style = 'bold #BBBBBB'
|
||||
|
||||
[character]
|
||||
success_symbol = "[](bold green)"
|
||||
error_symbol = "[](bold red)"
|
||||
vicmd_symbol = "[N](bold green)"
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue