From 3beb78a829fd5c67f6d01986c590a4c1206f473d Mon Sep 17 00:00:00 2001 From: nico Date: Tue, 6 Jan 2026 21:25:19 +0100 Subject: [PATCH] mainly xfce. And a lot of other things i dont remember --- configuration.nix | 81 +++++----- flake.lock | 145 +++++++----------- flake.nix | 8 +- home-nico.nix | 10 +- packages/default.nix | 12 +- packages/niri/config.kdl | 12 +- packages/nvim/default.nix | 14 +- packages/nvim/init.lua | 19 +-- packages/nvim/lua/plugins/avante.lua | 29 ++++ packages/nvim/lua/plugins/copilot.lua | 6 + packages/nvim/lua/plugins/lsp.lua | 86 ++++++++--- packages/nvim/lua/plugins/mason-lspconfig.lua | 8 + packages/nvim/lua/plugins/mason.lua | 79 +++++----- packages/nvim/lua/plugins/notify.lua | 6 + packages/nvim/lua/plugins/nvim-tree.lua | 15 ++ .../nvim/lua/plugins/plugins/autopair.lua | 7 + .../nvim/lua/plugins/plugins/blankline.lua | 7 + .../nvim/lua/plugins/plugins/blink-cmp.lua | 48 ++++++ .../nvim/lua/plugins/plugins/catppuccin.lua | 1 + packages/nvim/lua/plugins/plugins/comment.lua | 6 + .../nvim/lua/plugins/plugins/comment.lua~ | 0 packages/nvim/lua/plugins/plugins/coq.lua | 30 ++++ packages/nvim/lua/plugins/plugins/dap.lua | 1 + packages/nvim/lua/plugins/plugins/flutter.lua | 10 ++ .../lua/plugins/plugins/highlight-colors.lua | 1 + packages/nvim/lua/plugins/plugins/lazydev.lua | 33 ++++ .../nvim/lua/plugins/plugins/lazydev.lua~ | 0 packages/nvim/lua/plugins/plugins/lazygit.lua | 21 +++ packages/nvim/lua/plugins/plugins/lsp.lua | 30 ++++ packages/nvim/lua/plugins/plugins/lsp.lua~ | 13 ++ packages/nvim/lua/plugins/plugins/lualine.lua | 5 + .../nvim/lua/plugins/plugins/lualine.lua~ | 0 packages/nvim/lua/plugins/plugins/mason.lua | 37 +++++ .../nvim/lua/plugins/plugins/rustaceanvim.lua | 5 + packages/nvim/lua/plugins/plugins/tabout.lua | 44 ++++++ .../nvim/lua/plugins/plugins/telescope.lua | 4 + .../nvim/lua/plugins/plugins/treesitter.lua | 15 ++ packages/nvim/lua/plugins/plugins/trouble.lua | 37 +++++ .../nvim/lua/plugins/plugins/whichkey.lua | 18 +++ .../nvim/lua/plugins/plugins/whichkey.lua~ | 0 packages/nvim/lua/plugins/rustaceanvim.lua | 30 +++- packages/nvim/lua/plugins/typst.lua | 6 + packages/other/default.nix | 6 +- packages/waybar/config | 21 ++- packages/zed-editor/default.nix | 54 +++++++ packages/zed-editor/settings.json | 57 +++++++ packages/zen/default.nix | 51 ++++++ packages/zen/zen-mod.nix | 53 +++++++ 48 files changed, 958 insertions(+), 223 deletions(-) create mode 100644 packages/nvim/lua/plugins/avante.lua create mode 100644 packages/nvim/lua/plugins/copilot.lua create mode 100644 packages/nvim/lua/plugins/mason-lspconfig.lua create mode 100644 packages/nvim/lua/plugins/notify.lua create mode 100644 packages/nvim/lua/plugins/nvim-tree.lua create mode 100644 packages/nvim/lua/plugins/plugins/autopair.lua create mode 100644 packages/nvim/lua/plugins/plugins/blankline.lua create mode 100644 packages/nvim/lua/plugins/plugins/blink-cmp.lua create mode 100644 packages/nvim/lua/plugins/plugins/catppuccin.lua create mode 100644 packages/nvim/lua/plugins/plugins/comment.lua create mode 100644 packages/nvim/lua/plugins/plugins/comment.lua~ create mode 100644 packages/nvim/lua/plugins/plugins/coq.lua create mode 100644 packages/nvim/lua/plugins/plugins/dap.lua create mode 100644 packages/nvim/lua/plugins/plugins/flutter.lua create mode 100644 packages/nvim/lua/plugins/plugins/highlight-colors.lua create mode 100644 packages/nvim/lua/plugins/plugins/lazydev.lua create mode 100644 packages/nvim/lua/plugins/plugins/lazydev.lua~ create mode 100644 packages/nvim/lua/plugins/plugins/lazygit.lua create mode 100644 packages/nvim/lua/plugins/plugins/lsp.lua create mode 100644 packages/nvim/lua/plugins/plugins/lsp.lua~ create mode 100644 packages/nvim/lua/plugins/plugins/lualine.lua create mode 100644 packages/nvim/lua/plugins/plugins/lualine.lua~ create mode 100644 packages/nvim/lua/plugins/plugins/mason.lua create mode 100644 packages/nvim/lua/plugins/plugins/rustaceanvim.lua create mode 100644 packages/nvim/lua/plugins/plugins/tabout.lua create mode 100644 packages/nvim/lua/plugins/plugins/telescope.lua create mode 100644 packages/nvim/lua/plugins/plugins/treesitter.lua create mode 100644 packages/nvim/lua/plugins/plugins/trouble.lua create mode 100644 packages/nvim/lua/plugins/plugins/whichkey.lua create mode 100644 packages/nvim/lua/plugins/plugins/whichkey.lua~ create mode 100644 packages/nvim/lua/plugins/typst.lua create mode 100644 packages/zed-editor/default.nix create mode 100644 packages/zed-editor/settings.json create mode 100644 packages/zen/default.nix create mode 100644 packages/zen/zen-mod.nix diff --git a/configuration.nix b/configuration.nix index e22c36c..dace012 100644 --- a/configuration.nix +++ b/configuration.nix @@ -9,7 +9,7 @@ [ # Include the results of the hardware scan. ./hardware-configuration.nix inputs.home-manager.nixosModules.default - + ./packages/zen/zen-mod.nix ]; @@ -21,13 +21,13 @@ }; }; - nixpkgs.config.permittedInsecurePackages = [ - "electron-33.4.11" - ]; + # nixpkgs.config.permittedInsecurePackages = [ + # "electron-33.4.11" + # ]; # hyprland programs.hyprland = { - enable = true; + enable = false; xwayland.enable = true; }; @@ -64,7 +64,7 @@ }; services.mullvad-vpn.enable = true; - services.teamviewer.enable = true; + # services.teamviewer.enable = true; # Set your time zone. time.timeZone = "Europe/Berlin"; @@ -86,11 +86,20 @@ # Enable the X11 windowing system. - services.xserver.enable = true; + services.xserver = { + enable = true; + desktopManager = { + xterm.enable = false; + xfce.enable = true; + }; + }; + # services.displayManager.defaultSession = "xfce"; # Enable the XFCE Desktop Environment. services.displayManager.sddm.enable = true; - services.desktopManager.plasma6.enable = true; + services.displayManager.ly.enable = false; + services.displayManager.lemurs.enable = false; + services.desktopManager.plasma6.enable = false; environment.plasma6.excludePackages = with pkgs.kdePackages; [ konsole @@ -98,11 +107,10 @@ - virtualisation.virtualbox.host.enable = true; - virtualisation.docker.enable = true; - users.extraGroups.vboxusers.members = [ "n" ]; - virtualisation.virtualbox.host.enableExtensionPack = true; - + #virtualisation.virtualbox.host.enable = true; + #virtualisation.docker.enable = true; + #users.extraGroups.vboxusers.members = [ "n" ]; + #virtualisation.virtualbox.host.enableExtensionPack = true; # Configure keymap in X11 services.xserver = { @@ -131,7 +139,7 @@ #jack.enable = true; # use the example session manager (no others are packaged yet so this is enabled by default, - # no need to redefine it in your config for now) + # nor need to redefine it in your config for now) #media-session.enable = true; }; @@ -149,7 +157,7 @@ users.users.n = { isNormalUser = true; description = "n"; - extraGroups = [ "networkmanager" "wheel" "video" "adbusers" "input" "docker" "dialout" ]; + extraGroups = [ "networkmanager" "wheel" "video" "adbusers" "input" "docker" "dialout"]; packages = with pkgs; [ obsidian ]; @@ -162,7 +170,6 @@ programs.firefox.enable = true; services.flatpak.enable = true; - # Allow unfree packages nixpkgs.config.allowUnfree = true; @@ -174,18 +181,16 @@ environment.systemPackages = with pkgs; [ # pkgs.teamviewer - pkgs.spotify pkgs.devenv pkgs.vim pkgs.wget pkgs.git -# pkgs.kitty pkgs.tree - pkgs.nodejs + # pkgs.nodejs pkgs.anki-bin pkgs.unzip pkgs.mullvad-vpn - pkgs.discord + # pkgs.discord # pkgs.musescore # pkgs.butterfly pkgs.btop @@ -197,35 +202,35 @@ pkgs.gnumake pkgs.python312Packages.pip pkgs.python312 - pkgs.cargo - pkgs.rustup - pkgs.rust-analyzer + # pkgs.cargo + # pkgs.rustup + # pkgs.rust-analyzer pkgs.ripgrep pkgs.gcc pkgs.lua-language-server pkgs.nil # sway - pkgs.pavucontrol - pkgs.networkmanagerapplet - pkgs.wl-clipboard # wl-copy and wl-paste for copy/paste from stdin / stdout - pkgs.go - pkgs.cliphist - pkgs.mako # notification system developed by swaywm maintainer - pkgs.waybar # bar - pkgs.pulseaudio # audiocontrols - pkgs.brightnessctl # brightness controls - pkgs.wpaperd # wallpaper manager - pkgs.onboard + # pkgs.pavucontrol + # pkgs.networkmanagerapplet + # pkgs.wl-clipboard # wl-copy and wl-paste for copy/paste from stdin / stdout + # pkgs.go + # pkgs.cliphist + # pkgs.mako # notification system developed by swaywm maintainer + pkgs.waybar # bar + # pkgs.pulseaudio # audiocontrols + # pkgs.brightnessctl # brightness controls + pkgs.wpaperd # wallpaper manager + # pkgs.onboard ]; services.gnome.gnome-keyring.enable = true; - programs.sway = { - enable = true; - wrapperFeatures.gtk = true; - }; + # programs.sway = { + # enable = true; + # wrapperFeatures.gtk = true; + # }; #fonts diff --git a/flake.lock b/flake.lock index 14710a2..6ffa995 100644 --- a/flake.lock +++ b/flake.lock @@ -3,15 +3,14 @@ "ags": { "inputs": { "astal": "astal", - "gnim": "gnim", "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1754487835, - "narHash": "sha256-GRCkm7a1odlN3hHR1iBIxwmBPWAw1CDOnOdpmZGSKkQ=", + "lastModified": 1764289441, + "narHash": "sha256-ak+lgFiYE5PHByN1/BRkO5JP498hno6Ix24C1Qf/vec=", "owner": "Aylur", "repo": "ags", - "rev": "8e91fcd52b807f576a794ccc9533bdf720ef5af7", + "rev": "e169694390548dfd38ff40f1ef2163d6c3ffe3ea", "type": "github" }, "original": { @@ -28,11 +27,11 @@ ] }, "locked": { - "lastModified": 1752404970, - "narHash": "sha256-XULTToDUkIshNXEO+YP2mAHdQv8bxWDvKjbamBfOC8E=", + "lastModified": 1764173295, + "narHash": "sha256-Jh4VtPcK2Ov+RTcV9FtyQRsxiJmXFQGfqX6jjM7/mgc=", "owner": "aylur", "repo": "astal", - "rev": "2c5eb54f39e1710c6e2c80915a240978beb3269a", + "rev": "7d1fac8a4b2a14954843a978d2ddde86168c75ef", "type": "github" }, "original": { @@ -65,11 +64,11 @@ ] }, "locked": { - "lastModified": 1753121425, - "narHash": "sha256-TVcTNvOeWWk1DXljFxVRp+E0tzG1LhrVjOGGoMHuXio=", + "lastModified": 1760948891, + "narHash": "sha256-TmWcdiUUaWk8J4lpjzu4gCGxWY6/Ok7mOK4fIFfBuU4=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "644e0fc48951a860279da645ba77fe4a6e814c5e", + "rev": "864599284fc7c0ba6357ed89ed5e2cd5040f0c04", "type": "github" }, "original": { @@ -78,22 +77,6 @@ "type": "github" } }, - "gnim": { - "flake": false, - "locked": { - "lastModified": 1753090800, - "narHash": "sha256-6sS6KHong2cMGn+6xJwjiizZzwu2XUmp++DtiKZhFMU=", - "owner": "aylur", - "repo": "gnim", - "rev": "2f58f8444c4cb8fefeab7a9901a33e99cfa92457", - "type": "github" - }, - "original": { - "owner": "aylur", - "repo": "gnim", - "type": "github" - } - }, "home-manager": { "inputs": { "nixpkgs": [ @@ -101,32 +84,11 @@ ] }, "locked": { - "lastModified": 1754503522, - "narHash": "sha256-V0iiDcYvNeMOP2FyfgC4H8Esx+JodXEl80lD4hFD4SI=", + "lastModified": 1767104570, + "narHash": "sha256-GKgwu5//R+cLdKysZjGqvUEEOGXXLdt93sNXeb2M/Lk=", "owner": "nix-community", "repo": "home-manager", - "rev": "13461dec40bf03d9196ff79d1abe48408268cc35", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "home-manager", - "type": "github" - } - }, - "home-manager_2": { - "inputs": { - "nixpkgs": [ - "zen-browser", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1755121891, - "narHash": "sha256-UtYkukiGnPRJ5rpd4W/wFVrLMh8fqtNkqHTPgHEtrqU=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "279ca5addcdcfa31ac852b3ecb39fc372684f426", + "rev": "e4e78a2cbeaddd07ab7238971b16468cc1d14daf", "type": "github" }, "original": { @@ -137,11 +99,11 @@ }, "mnw": { "locked": { - "lastModified": 1748710831, - "narHash": "sha256-eZu2yH3Y2eA9DD3naKWy/sTxYS5rPK2hO7vj8tvUCSU=", + "lastModified": 1758834834, + "narHash": "sha256-Y7IvY4F8vajZyp3WGf+KaiIVwondEkMFkt92Cr9NZmg=", "owner": "Gerg-L", "repo": "mnw", - "rev": "cff958a4e050f8d917a6ff3a5624bc4681c6187d", + "rev": "cfbc7d1cc832e318d0863a5fc91d940a96034001", "type": "github" }, "original": { @@ -150,13 +112,34 @@ "type": "github" } }, + "ndg": { + "inputs": { + "nixpkgs": [ + "nvf", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1765720983, + "narHash": "sha256-tWtukpABmux6EC/FuCJEgA1kmRjcRPtED44N+GGPq+4=", + "owner": "feel-co", + "repo": "ndg", + "rev": "f399ace8bb8e1f705dd8942b24d207aa4d75c936", + "type": "github" + }, + "original": { + "owner": "feel-co", + "repo": "ndg", + "type": "github" + } + }, "nixpkgs": { "locked": { - "lastModified": 1753694789, - "narHash": "sha256-cKgvtz6fKuK1Xr5LQW/zOUiAC0oSQoA9nOISB0pJZqM=", + "lastModified": 1763966396, + "narHash": "sha256-6eeL1YPcY1MV3DDStIDIdy/zZCDKgHdkCmsrLJFiZf0=", "owner": "nixos", "repo": "nixpkgs", - "rev": "dc9637876d0dcc8c9e5e22986b857632effeb727", + "rev": "5ae3b07d8d6527c42f17c876e404993199144b6a", "type": "github" }, "original": { @@ -168,11 +151,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1754214453, - "narHash": "sha256-Q/I2xJn/j1wpkGhWkQnm20nShYnG7TI99foDBpXm1SY=", + "lastModified": 1766902085, + "narHash": "sha256-coBu0ONtFzlwwVBzmjacUQwj3G+lybcZ1oeNSQkgC0M=", "owner": "nixos", "repo": "nixpkgs", - "rev": "5b09dc45f24cf32316283e62aec81ffee3c3e376", + "rev": "c0b0e0fddf73fd517c3471e546c0df87a42d53f4", "type": "github" }, "original": { @@ -184,11 +167,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1753432016, - "narHash": "sha256-cnL5WWn/xkZoyH/03NNUS7QgW5vI7D1i74g48qplCvg=", + "lastModified": 1764081664, + "narHash": "sha256-sUoHmPr/EwXzRMpv1u/kH+dXuvJEyyF2Q7muE+t0EU4=", "owner": "nixos", "repo": "nixpkgs", - "rev": "6027c30c8e9810896b92429f0092f624f7b1aace", + "rev": "dc205f7b4fdb04c8b7877b43edb7b73be7730081", "type": "github" }, "original": { @@ -198,36 +181,21 @@ "type": "github" } }, - "nixpkgs_4": { - "locked": { - "lastModified": 1727348695, - "narHash": "sha256-J+PeFKSDV+pHL7ukkfpVzCOO7mBSrrpJ3svwBFABbhI=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "1925c603f17fc89f4c8f6bf6f631a802ad85d784", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "nvf": { "inputs": { "flake-compat": "flake-compat", "flake-parts": "flake-parts", "mnw": "mnw", + "ndg": "ndg", "nixpkgs": "nixpkgs_3", "systems": "systems" }, "locked": { - "lastModified": 1754388740, - "narHash": "sha256-6++6FDc/hcMpaJPgOrGzwmzCSgix3zIlcuTIy9+aNSs=", + "lastModified": 1767123832, + "narHash": "sha256-WI+DaMQLJ/QVUKCNk1gvo8y0Rw6C4uDx8BW1mRVVOMU=", "owner": "notashelf", "repo": "nvf", - "rev": "22fb0d22cc474e85f94c5aa95b6c550c81ca7278", + "rev": "0390abd6736ff34a016afc66366d1f46372f28de", "type": "github" }, "original": { @@ -262,19 +230,20 @@ }, "zen-browser": { "inputs": { - "home-manager": "home-manager_2", - "nixpkgs": "nixpkgs_4" + "nixpkgs": [ + "nixpkgs" + ] }, "locked": { - "lastModified": 1755184939, - "narHash": "sha256-gxKs+3tfe5lNgu3hpiJmRUCkvri4vq2mUL6GL/+OCxM=", - "owner": "0xc000022070", + "lastModified": 1766377218, + "narHash": "sha256-y3g3OqPB0tmRjbHJNnJKivSQRtAJR+/9S1xbxBWEatg=", + "owner": "youwen5", "repo": "zen-browser-flake", - "rev": "884b88c3ff7f283aec14ecb0a2a35e2da7607eae", + "rev": "2f61341b32dd69c07e147188e67e09ba2bb99c33", "type": "github" }, "original": { - "owner": "0xc000022070", + "owner": "youwen5", "repo": "zen-browser-flake", "type": "github" } diff --git a/flake.nix b/flake.nix index 57686fc..d35736b 100644 --- a/flake.nix +++ b/flake.nix @@ -13,7 +13,10 @@ nvf.url = "github:notashelf/nvf"; - zen-browser.url = "github:0xc000022070/zen-browser-flake"; + zen-browser = { + url = "github:youwen5/zen-browser-flake"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; @@ -30,6 +33,9 @@ # inputs.zen-browser.packages."${system}".default # nvf.homeManagerModules.default inputs.home-manager.nixosModules.default + # { + # home.packages = with inputs; [ zen-browser.packages.${system}.zen-browser ]; + # } ]; }; }; diff --git a/home-nico.nix b/home-nico.nix index fa91bfb..27e65bb 100644 --- a/home-nico.nix +++ b/home-nico.nix @@ -6,7 +6,7 @@ imports = [ ./packages - inputs.zen-browser.homeModules.default + # inputs.zen-browser.homeModules.default ]; nixpkgs = { @@ -17,12 +17,12 @@ }; home.packages = with pkgs; [ - floorp + # floorp # freetube ]; - programs.zen-browser = { - enable = true; - }; + # programs.zen-browser = { + # enable = true; + # }; home.stateVersion = "24.05"; diff --git a/packages/default.nix b/packages/default.nix index 79e73d8..12aaf0a 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -4,20 +4,22 @@ # ./ags ./fuzzel ./other - ./sway - ./swaync + # ./sway + # ./swaync ./waybar ./wpaperd ./nvim - ./emacs + ./zed-editor + # ./emacs ./terminal ./rofi # ./alacritty # ./tmux - # ./mako + # ./mako # ./qutebrowser - ./hyprland + # ./hyprland ./niri # ./vscode + # ./zen ]; } diff --git a/packages/niri/config.kdl b/packages/niri/config.kdl index 62d555b..1210888 100644 --- a/packages/niri/config.kdl +++ b/packages/niri/config.kdl @@ -14,7 +14,7 @@ input { // For example: layout "us,de" - options "grp:win_space_toggle" + options "grp:alt_shift_toggle" } // Enable numlock on startup, omitting this setting disables it. @@ -63,6 +63,7 @@ input { // 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". @@ -97,7 +98,14 @@ output "eDP-1" { // 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=1280 y=0 + position x=0 y=0 +} + +output "HDMI-A-1" { + mode "1920x1080" + scale 1 + transform "normal" + position x=1920 y=0 } // Settings that influence how windows are positioned and sized. diff --git a/packages/nvim/default.nix b/packages/nvim/default.nix index d003c5e..ba6e32f 100644 --- a/packages/nvim/default.nix +++ b/packages/nvim/default.nix @@ -10,7 +10,7 @@ gcc # gopls stylua - # rustfmt + rustfmt ]; programs.neovim = { @@ -32,7 +32,8 @@ programs.neovim.plugins = [ # ".config/nvim/lua/plugins/coq.lua".source = ./lua/plugins/coq.lua; ".config/nvim/lua/plugins/blink-cmp.lua".source = ./lua/plugins/blink-cmp.lua; ".config/nvim/lua/plugins/lsp.lua".source = ./lua/plugins/lsp.lua; -# ".config/nvim/lua/plugins/mason.lua".source = ./lua/plugins/mason.lua; + ".config/nvim/lua/plugins/mason.lua".source = ./lua/plugins/mason.lua; + ".config/nvim/lua/plugins/mason-lspconfig.lua".source = ./lua/plugins/mason-lspconfig.lua; # ".config/nvim/lua/plugins/treesitter.lua".source = ./lua/plugins/treesitter.lua; ".config/nvim/lua/plugins/catppuccin.lua".source = ./lua/plugins/catppuccin.lua; ".config/nvim/lua/plugins/telescope.lua".source = ./lua/plugins/telescope.lua; @@ -44,7 +45,7 @@ programs.neovim.plugins = [ ".config/nvim/lua/plugins/trouble.lua".source = ./lua/plugins/trouble.lua; ".config/nvim/lua/plugins/dap.lua".source = ./lua/plugins/dap.lua; ".config/nvim/lua/plugins/blankline.lua".source = ./lua/plugins/blankline.lua; - ".config/nvim/lua/plugins/rustaceanvim.lua".source = ./lua/plugins/rustaceanvim.lua; + # ".config/nvim/lua/plugins/rustaceanvim.lua".source = ./lua/plugins/rustaceanvim.lua; ".config/nvim/lua/plugins/lazygit.lua".source = ./lua/plugins/lazygit.lua; ".config/nvim/lua/plugins/toggleterm.lua".source = ./lua/plugins/toggleterm.lua; ".config/nvim/lua/plugins/love.lua".source = ./lua/plugins/love.lua; @@ -56,8 +57,11 @@ programs.neovim.plugins = [ ".config/nvim/lua/plugins/vim-suda.lua".source = ./lua/plugins/vim-suda.lua; ".config/nvim/lua/plugins/tiny-inline-diagnostic.lua".source = ./lua/plugins/tiny-inline-diagnostic.lua; ".config/nvim/lua/plugins/conform.lua".source = ./lua/plugins/conform.lua; - ".config/nvim/lua/plugins/go.lua".source = ./lua/plugins/go.lua; - # ".config/nvim/lua/plugins/arduino.lua".source = ./lua/plugins/arduino.lua; + ".config/nvim/lua/plugins/nvim-tree.lua".source = ./lua/plugins/nvim-tree.lua; + ".config/nvim/lua/plugins/notify.lua".source = ./lua/plugins/notify.lua; + + # ".config/nvim/lua/plugins/go.lua".source = ./lua/plugins/go.lua; + # ".config/nvim/lua/plugins/typst.lua".source = ./lua/plugins/typst.lua; } ]; diff --git a/packages/nvim/init.lua b/packages/nvim/init.lua index 05ef028..47d58cb 100644 --- a/packages/nvim/init.lua +++ b/packages/nvim/init.lua @@ -38,7 +38,6 @@ vim.keymap.set("n", "gd", vim.lsp.buf.definition, bufopts) -- jump to definition vim.keymap.set("n", "gd", vim.lsp.buf.definition, bufopts) - -- code actions vim.keymap.set("n", "ca", function() require("tiny-code-action").code_action() @@ -47,7 +46,6 @@ end, { noremap = true, silent = true }) -- Lazy require("config.lazy") --- require("flutter-tools").setup {} -- use defaults require("catppuccin").setup({}) vim.cmd.colorscheme("catppuccin") @@ -62,6 +60,7 @@ require("ibl").setup() require("telescope").load_extension("flutter") require("toggleterm").setup({}) require("mini.animate").setup() +require('nvim-autopairs').enable() vim.o.showtabline = 2 require("tabby").setup({ @@ -77,7 +76,7 @@ require("conform").setup({}) require("flutter-tools").setup({}) -- GO -require("go").setup() +-- require("go").setup() ------------- -- Debugger local dap, dapui = require("dap"), require("dapui") @@ -113,13 +112,8 @@ dap.configurations.rust = dap.configurations.gdb -------------------------------------------- local builtin = require("telescope.builtin") local conform = require("conform") --- Rust binds -vim.keymap.set("n", "rrr", ":RustRun", { desc = "Run rust program" }) -vim.keymap.set("n", "rd", ":RustLsp debug", { desc = "Debug rust program" }) -vim.keymap.set("n", "rh", ":RustLsp hover actions", { desc = "rust hover actions" }) -vim.keymap.set("n", "re", ":RustLsp explainError", { desc = "explain rust error" }) -vim.keymap.set("n", "rs", ":RustLsp openDocs", { desc = "open rust docs for symbol under cursor" }) -vim.keymap.set("n", "rrn", ":RustLsp ssr ", { desc = "rust rename" }) +-- Love binds +vim.keymap.set("n", "lr", ":LoveRun", { desc = "Love run" }) -- Telescope binds vim.keymap.set("n", "ff", builtin.find_files, { desc = "Telescope find files" }) vim.keymap.set("n", "fg", builtin.live_grep, { desc = "Telescope live grep" }) @@ -143,12 +137,15 @@ vim.keymap.set("n", "tf", ":ToggleTerm direction=float ", { desc = " vim.keymap.set("n", "tt", ":ToggleTerm direction=tab size=50 ", { desc = "Open terminal in new tab" }) vim.keymap.set("n", "tv", ":ToggleTerm direction=vertical ", { desc = "Open terminal vertical" }) vim.keymap.set("n", "ts", ":ToggleTerm direction=vertical ", { desc = "select open terminal" }) +-- file explorer binds (nvim-tree) +vim.keymap.set("n", "fe", ":NvimTreeToggle ", { desc = "Toggle nvim tree" }) -- code actions vim.keymap.set("n", "ca", function() require("tiny-code-action").code_action() end, { desc = "Show code actions", noremap = true, silent = true }) - -- disable annoying inline type things vim.lsp.inlay_hint.enable(false) vim.diagnostic.config({virtual_text = false}) + + diff --git a/packages/nvim/lua/plugins/avante.lua b/packages/nvim/lua/plugins/avante.lua new file mode 100644 index 0000000..a80cf58 --- /dev/null +++ b/packages/nvim/lua/plugins/avante.lua @@ -0,0 +1,29 @@ +return { + "yetone/avante.nvim", + event = "VeryLazy", + version = false, -- Never set this value to "*"! Never! + opts = { + -- add any opts here + -- for example + provider = "copilot", + }, + build = "make", + dependencies = { + "nvim-treesitter/nvim-treesitter", + "stevearc/dressing.nvim", + "nvim-lua/plenary.nvim", + "MunifTanjim/nui.nvim", + --- The below dependencies are optional, + "nvim-telescope/telescope.nvim", -- for file_selector provider telescope + "nvim-tree/nvim-web-devicons", -- or echasnovski/mini.icons + "zbirenbaum/copilot.lua", -- for providers='copilot' + { + -- Make sure to set this up properly if you have lazy=true + 'MeanderingProgrammer/render-markdown.nvim', + opts = { + file_types = { "markdown", "Avante" }, + }, + ft = { "markdown", "Avante" }, + }, + }, +} diff --git a/packages/nvim/lua/plugins/copilot.lua b/packages/nvim/lua/plugins/copilot.lua new file mode 100644 index 0000000..efcd514 --- /dev/null +++ b/packages/nvim/lua/plugins/copilot.lua @@ -0,0 +1,6 @@ +return { + "zbirenbaum/copilot.lua", + config = function () + require('copilot').setup({}) + end +} diff --git a/packages/nvim/lua/plugins/lsp.lua b/packages/nvim/lua/plugins/lsp.lua index 24eed22..50ee281 100644 --- a/packages/nvim/lua/plugins/lsp.lua +++ b/packages/nvim/lua/plugins/lsp.lua @@ -1,32 +1,70 @@ return { 'neovim/nvim-lspconfig', dependencies = { 'saghen/blink.cmp' }, + config = function(_,_) - -- example using `opts` for defining servers - opts = { - servers = { - lua_ls = {}, - nil_ls = {}, - -- rust_analyzer = {}, - gopls = {}, - -- arduino_language_server = {}, + local vue_language_server_path = vim.fn.expand '$MASON/packages' .. '/vue-language-server' .. '/node_modules/@vue/language-server' + + local tsserver_filetypes = { 'typescript', 'javascript', 'javascriptreact', 'typescriptreact', 'vue' } + local vue_plugin = { + name = '@vue/typescript-plugin', + location = vue_language_server_path, + languages = { 'vue' }, + configNamespace = 'typescript', } - }, - config = function(_, opts) - local lspconfig = require('lspconfig') - for server, config in pairs(opts.servers) do - -- passing config.capabilities to blink.cmp merges with the capabilities in your - -- `opts[server].capabilities, if you've defined it - config.capabilities = require('blink.cmp').get_lsp_capabilities(config.capabilities) - lspconfig[server].setup(config) - end + local vtsls_config = { + settings = { + vtsls = { + tsserver = { + globalPlugins = { + vue_plugin, + }, + }, + }, + }, + filetypes = tsserver_filetypes, + } + + local ts_ls_config = { + init_options = { + plugins = { + vue_plugin, + }, + }, + filetypes = tsserver_filetypes, + } + + -- If you are on most recent `nvim-lspconfig` + local vue_ls_config = {} + -- nvim 0.11 or above + vim.lsp.config('vtsls', vtsls_config) + vim.lsp.config('vue_ls', vue_ls_config) + vim.lsp.config('lua_ls', {}) + -- vim.lsp.config('rust_analyzer', {}) + vim.lsp.enable({'vtsls', 'vue_ls', 'lua_ls'}) end - -- -- example calling setup directly for each LSP - -- config = function() - -- local capabilities = require('blink.cmp').get_lsp_capabilities() - -- local lspconfig = require('lspconfig') - -- - -- lspconfig['lua_ls'].setup({ capabilities = capabilities }) - -- end + + -- opts = { + -- servers = { + -- lua_ls = {}, + -- nil_ls = {}, + -- vstls = {}, + -- vue_ls = {}, + -- -- rust_analyzer = {}, + -- -- gopls = {}, + -- } + -- }, + -- config = function(_, opts) + -- for server, config in pairs(opts.servers) do + -- config.capabilities = require('blink.cmp').get_lsp_capabilities(config.capabilities) + -- + -- -- Verwende `vim.lsp.config` um die Konfiguration anzupassen + -- vim.lsp.config(server, config) + -- + -- -- Aktiviere die Konfiguration + -- vim.lsp.enable(server) + -- end + -- end } + diff --git a/packages/nvim/lua/plugins/mason-lspconfig.lua b/packages/nvim/lua/plugins/mason-lspconfig.lua new file mode 100644 index 0000000..da4ffd4 --- /dev/null +++ b/packages/nvim/lua/plugins/mason-lspconfig.lua @@ -0,0 +1,8 @@ +return { + "mason-org/mason-lspconfig.nvim", + opts = {}, + dependencies = { + { "mason-org/mason.nvim", opts = {} }, + "neovim/nvim-lspconfig", + }, +} diff --git a/packages/nvim/lua/plugins/mason.lua b/packages/nvim/lua/plugins/mason.lua index 73457d4..bad19f3 100644 --- a/packages/nvim/lua/plugins/mason.lua +++ b/packages/nvim/lua/plugins/mason.lua @@ -1,37 +1,46 @@ return { - - "williamboman/mason.nvim", - cmd = "Mason", - keys = { { "cm", "Mason", desc = "Mason" } }, - build = ":MasonUpdate", - opts_extend = { "ensure_installed" }, - opts = { - ensure_installed = { - "stylua", - "shfmt", - }, - }, - ---@param opts MasonSettings | {ensure_installed: string[]} - config = function(_, opts) - require("mason").setup(opts) - local mr = require("mason-registry") - mr:on("package:install:success", function() - vim.defer_fn(function() - -- trigger FileType event to possibly load this newly installed LSP server - require("lazy.core.handler.event").trigger({ - event = "FileType", - buf = vim.api.nvim_get_current_buf(), - }) - end, 100) - end) - - mr.refresh(function() - for _, tool in ipairs(opts.ensure_installed) do - local p = mr.get_package(tool) - if not p:is_installed() then - p:install() - end - end - end) - end, + "mason-org/mason.nvim", + config = function () + require("mason").setup() + end } + + +-- return { +-- +-- "williamboman/mason.nvim", +-- cmd = "Mason", +-- keys = { { "cm", "Mason", desc = "Mason" } }, +-- build = ":MasonUpdate", +-- opts_extend = { "ensure_installed" }, +-- opts = { +-- ensure_installed = { +-- -- "stylua", +-- -- "shfmt", +-- }, +-- }, +-- ---@param opts MasonSettings | {ensure_installed: string[]} +-- config = function(_, opts) +-- require("mason").setup(opts) +-- local mr = require("mason-registry") +-- mr:on("package:install:success", function() +-- vim.defer_fn(function() +-- -- trigger FileType event to possibly load this newly installed LSP server +-- require("lazy.core.handler.event").trigger({ +-- event = "FileType", +-- buf = vim.api.nvim_get_current_buf(), +-- }) +-- end, 100) +-- end) +-- +-- mr.refresh(function() +-- for _, tool in ipairs(opts.ensure_installed) do +-- local p = mr.get_package(tool) +-- if not p:is_installed() then +-- p:install() +-- end +-- end +-- end) +-- end, +-- } + diff --git a/packages/nvim/lua/plugins/notify.lua b/packages/nvim/lua/plugins/notify.lua new file mode 100644 index 0000000..716c948 --- /dev/null +++ b/packages/nvim/lua/plugins/notify.lua @@ -0,0 +1,6 @@ +return { + "rcarriga/nvim-notify", + config = function () + vim.notify = require("notify") + end +} diff --git a/packages/nvim/lua/plugins/nvim-tree.lua b/packages/nvim/lua/plugins/nvim-tree.lua new file mode 100644 index 0000000..9493a11 --- /dev/null +++ b/packages/nvim/lua/plugins/nvim-tree.lua @@ -0,0 +1,15 @@ +return { + "nvim-tree/nvim-tree.lua", + version = "*", + lazy = false, + dependencies = { + "nvim-tree/nvim-web-devicons", + }, + config = function() + require("nvim-tree").setup({ + view = { + width = 30, + }, + }) + end, +} diff --git a/packages/nvim/lua/plugins/plugins/autopair.lua b/packages/nvim/lua/plugins/plugins/autopair.lua new file mode 100644 index 0000000..2db00d8 --- /dev/null +++ b/packages/nvim/lua/plugins/plugins/autopair.lua @@ -0,0 +1,7 @@ +return { + 'windwp/nvim-autopairs', + event = "InsertEnter", + config = true + -- use opts = {} for passing setup options + -- this is equivalent to setup({}) function +} diff --git a/packages/nvim/lua/plugins/plugins/blankline.lua b/packages/nvim/lua/plugins/plugins/blankline.lua new file mode 100644 index 0000000..a1e1bc9 --- /dev/null +++ b/packages/nvim/lua/plugins/plugins/blankline.lua @@ -0,0 +1,7 @@ +return { + "lukas-reineke/indent-blankline.nvim", + main = "ibl", + ---@module "ibl" + ---@type ibl.config + opts = {}, +} diff --git a/packages/nvim/lua/plugins/plugins/blink-cmp.lua b/packages/nvim/lua/plugins/plugins/blink-cmp.lua new file mode 100644 index 0000000..3399a47 --- /dev/null +++ b/packages/nvim/lua/plugins/plugins/blink-cmp.lua @@ -0,0 +1,48 @@ +return { + 'saghen/blink.cmp', + -- optional: provides snippets for the snippet source + dependencies = { 'rafamadriz/friendly-snippets' }, + + -- use a release tag to download pre-built binaries + version = '1.*', + -- AND/OR build from source, requires nightly: https://rust-lang.github.io/rustup/concepts/channels.html#working-with-nightly-rust + -- build = 'cargo build --release', + -- If you use nix, you can build from source using latest nightly rust with: + -- build = 'nix run .#build-plugin', + + ---@module 'blink.cmp' + ---@type blink.cmp.Config + opts = { + -- See :h blink-cmp-config-keymap for defining your own keymap + keymap = { + preset = 'enter', + -- map tap to cycle through + [''] = { 'select_prev', 'fallback' }, + [''] = { 'select_next', 'fallback' }, + }, + + + appearance = { + -- 'mono' (default) for 'Nerd Font Mono' or 'normal' for 'Nerd Font' + -- Adjusts spacing to ensure icons are aligned + nerd_font_variant = 'mono' + }, + + -- (Default) Only show the documentation popup when manually triggered + completion = { documentation = { auto_show = false } }, + + -- Default list of enabled providers defined so that you can extend it + -- elsewhere in your config, without redefining it, due to `opts_extend` + sources = { + default = { 'lsp', 'path', 'snippets', 'buffer' }, + }, + + -- (Default) Rust fuzzy matcher for typo resistance and significantly better performance + -- You may use a lua implementation instead by using `implementation = "lua"` or fallback to the lua implementation, + -- when the Rust fuzzy matcher is not available, by using `implementation = "prefer_rust"` + -- + -- See the fuzzy documentation for more information + fuzzy = { implementation = "prefer_rust_with_warning" } + }, + opts_extend = { "sources.default" } +} diff --git a/packages/nvim/lua/plugins/plugins/catppuccin.lua b/packages/nvim/lua/plugins/plugins/catppuccin.lua new file mode 100644 index 0000000..19df104 --- /dev/null +++ b/packages/nvim/lua/plugins/plugins/catppuccin.lua @@ -0,0 +1 @@ +return { "catppuccin/nvim", name = "catppuccin", priority = 1000 } diff --git a/packages/nvim/lua/plugins/plugins/comment.lua b/packages/nvim/lua/plugins/plugins/comment.lua new file mode 100644 index 0000000..1871cef --- /dev/null +++ b/packages/nvim/lua/plugins/plugins/comment.lua @@ -0,0 +1,6 @@ +return { + 'numToStr/Comment.nvim', + opts = { + -- add any options here + } +} diff --git a/packages/nvim/lua/plugins/plugins/comment.lua~ b/packages/nvim/lua/plugins/plugins/comment.lua~ new file mode 100644 index 0000000..e69de29 diff --git a/packages/nvim/lua/plugins/plugins/coq.lua b/packages/nvim/lua/plugins/plugins/coq.lua new file mode 100644 index 0000000..0ec3a3e --- /dev/null +++ b/packages/nvim/lua/plugins/plugins/coq.lua @@ -0,0 +1,30 @@ + + return { + "neovim/nvim-lspconfig", -- REQUIRED: for native Neovim LSP integration + lazy = false, -- REQUIRED: tell lazy.nvim to start this plugin at startup + dependencies = { + -- main one + { "ms-jpq/coq_nvim", branch = "coq" }, + + -- 9000+ Snippets + { "ms-jpq/coq.artifacts", branch = "artifacts" }, + + -- lua & third party sources -- See https://github.com/ms-jpq/coq.thirdparty + -- Need to **configure separately** + { 'ms-jpq/coq.thirdparty', branch = "3p" } + -- - shell repl + -- - nvim lua api + -- - scientific calculator + -- - comment banner + -- - etc + }, + init = function() + vim.g.coq_settings = { + auto_start = true, -- if you want to start COQ at startup + -- Your COQ settings here + } + end, + config = function() + -- Your LSP settings here + end, +} diff --git a/packages/nvim/lua/plugins/plugins/dap.lua b/packages/nvim/lua/plugins/plugins/dap.lua new file mode 100644 index 0000000..4be4d3f --- /dev/null +++ b/packages/nvim/lua/plugins/plugins/dap.lua @@ -0,0 +1 @@ +return { "rcarriga/nvim-dap-ui", dependencies = {"mfussenegger/nvim-dap", "nvim-neotest/nvim-nio"} } diff --git a/packages/nvim/lua/plugins/plugins/flutter.lua b/packages/nvim/lua/plugins/plugins/flutter.lua new file mode 100644 index 0000000..97dac7c --- /dev/null +++ b/packages/nvim/lua/plugins/plugins/flutter.lua @@ -0,0 +1,10 @@ +return { + + 'nvim-flutter/flutter-tools.nvim', + lazy = false, + dependencies = { + 'nvim-lua/plenary.nvim', + 'stevearc/dressing.nvim', -- optional for vim.ui.select + }, + config = true, +} diff --git a/packages/nvim/lua/plugins/plugins/highlight-colors.lua b/packages/nvim/lua/plugins/plugins/highlight-colors.lua new file mode 100644 index 0000000..9bf29ee --- /dev/null +++ b/packages/nvim/lua/plugins/plugins/highlight-colors.lua @@ -0,0 +1 @@ +return { "brenoprata10/nvim-highlight-colors", name = "highlight-colotrs" } diff --git a/packages/nvim/lua/plugins/plugins/lazydev.lua b/packages/nvim/lua/plugins/plugins/lazydev.lua new file mode 100644 index 0000000..efa06f2 --- /dev/null +++ b/packages/nvim/lua/plugins/plugins/lazydev.lua @@ -0,0 +1,33 @@ +return { + { + "folke/lazydev.nvim", + ft = "lua", -- only load on lua files + opts = { + library = { + -- See the configuration section for more details + -- Load luvit types when the `vim.uv` word is found + { path = "${3rd}/luv/library", words = { "vim%.uv" } }, + }, + }, + }, + { -- optional blink completion source for require statements and module annotations + "saghen/blink.cmp", + build = 'cargo +nightly build --release', + + opts = { + sources = { + -- add lazydev to your completion providers + default = { "lazydev", "lsp", "path", "snippets", "buffer" }, + providers = { + lazydev = { + name = "LazyDev", + module = "lazydev.integrations.blink", + -- make lazydev completions top priority (see `:h blink.cmp`) + score_offset = 100, + }, + }, + }, + }, + } + -- { "folke/neodev.nvim", enabled = false }, -- make sure to uninstall or disable neodev.nvim +} \ No newline at end of file diff --git a/packages/nvim/lua/plugins/plugins/lazydev.lua~ b/packages/nvim/lua/plugins/plugins/lazydev.lua~ new file mode 100644 index 0000000..e69de29 diff --git a/packages/nvim/lua/plugins/plugins/lazygit.lua b/packages/nvim/lua/plugins/plugins/lazygit.lua new file mode 100644 index 0000000..c7cb122 --- /dev/null +++ b/packages/nvim/lua/plugins/plugins/lazygit.lua @@ -0,0 +1,21 @@ +-- nvim v0.8.0 +return { + "kdheepak/lazygit.nvim", + lazy = true, + cmd = { + "LazyGit", + "LazyGitConfig", + "LazyGitCurrentFile", + "LazyGitFilter", + "LazyGitFilterCurrentFile", + }, + -- optional for floating window border decoration + dependencies = { + "nvim-lua/plenary.nvim", + }, + -- setting the keybinding for LazyGit with 'keys' is recommended in + -- order to load the plugin when the command is run for the first time + keys = { + { "lg", "LazyGit", desc = "LazyGit" } + } +} diff --git a/packages/nvim/lua/plugins/plugins/lsp.lua b/packages/nvim/lua/plugins/plugins/lsp.lua new file mode 100644 index 0000000..2892e5d --- /dev/null +++ b/packages/nvim/lua/plugins/plugins/lsp.lua @@ -0,0 +1,30 @@ +return { + 'neovim/nvim-lspconfig', + dependencies = { 'saghen/blink.cmp' }, + + -- example using `opts` for defining servers + opts = { + servers = { + lua_ls = {}, + nil_ls = {}, +-- rust_analyzer = {} + } + }, + config = function(_, opts) + local lspconfig = require('lspconfig') + for server, config in pairs(opts.servers) do + -- passing config.capabilities to blink.cmp merges with the capabilities in your + -- `opts[server].capabilities, if you've defined it + config.capabilities = require('blink.cmp').get_lsp_capabilities(config.capabilities) + lspconfig[server].setup(config) + end + end + + -- -- example calling setup directly for each LSP + -- config = function() + -- local capabilities = require('blink.cmp').get_lsp_capabilities() + -- local lspconfig = require('lspconfig') + -- + -- lspconfig['lua_ls'].setup({ capabilities = capabilities }) + -- end +} diff --git a/packages/nvim/lua/plugins/plugins/lsp.lua~ b/packages/nvim/lua/plugins/plugins/lsp.lua~ new file mode 100644 index 0000000..287bf50 --- /dev/null +++ b/packages/nvim/lua/plugins/plugins/lsp.lua~ @@ -0,0 +1,13 @@ +return +{ + "neovim/nvim-lspconfig", + opts = function() + local keys = require("lazyvim.plugins.lsp.keymaps").get() + -- change a keymap + keys[#keys + 1] = { "K", "echo 'hello'" } + -- disable a keymap + keys[#keys + 1] = { "K", false } + -- add a keymap + keys[#keys + 1] = { "H", "echo 'hello'" } + end, +} \ No newline at end of file diff --git a/packages/nvim/lua/plugins/plugins/lualine.lua b/packages/nvim/lua/plugins/plugins/lualine.lua new file mode 100644 index 0000000..58ecd08 --- /dev/null +++ b/packages/nvim/lua/plugins/plugins/lualine.lua @@ -0,0 +1,5 @@ +return { + 'nvim-lualine/lualine.nvim', + dependencies = { 'nvim-tree/nvim-web-devicons' } + +} diff --git a/packages/nvim/lua/plugins/plugins/lualine.lua~ b/packages/nvim/lua/plugins/plugins/lualine.lua~ new file mode 100644 index 0000000..e69de29 diff --git a/packages/nvim/lua/plugins/plugins/mason.lua b/packages/nvim/lua/plugins/plugins/mason.lua new file mode 100644 index 0000000..73457d4 --- /dev/null +++ b/packages/nvim/lua/plugins/plugins/mason.lua @@ -0,0 +1,37 @@ +return { + + "williamboman/mason.nvim", + cmd = "Mason", + keys = { { "cm", "Mason", desc = "Mason" } }, + build = ":MasonUpdate", + opts_extend = { "ensure_installed" }, + opts = { + ensure_installed = { + "stylua", + "shfmt", + }, + }, + ---@param opts MasonSettings | {ensure_installed: string[]} + config = function(_, opts) + require("mason").setup(opts) + local mr = require("mason-registry") + mr:on("package:install:success", function() + vim.defer_fn(function() + -- trigger FileType event to possibly load this newly installed LSP server + require("lazy.core.handler.event").trigger({ + event = "FileType", + buf = vim.api.nvim_get_current_buf(), + }) + end, 100) + end) + + mr.refresh(function() + for _, tool in ipairs(opts.ensure_installed) do + local p = mr.get_package(tool) + if not p:is_installed() then + p:install() + end + end + end) + end, +} diff --git a/packages/nvim/lua/plugins/plugins/rustaceanvim.lua b/packages/nvim/lua/plugins/plugins/rustaceanvim.lua new file mode 100644 index 0000000..46c4c82 --- /dev/null +++ b/packages/nvim/lua/plugins/plugins/rustaceanvim.lua @@ -0,0 +1,5 @@ +return { + 'mrcjkb/rustaceanvim', + version = '^5', -- Recommended + lazy = false, -- This plugin is already lazy +} diff --git a/packages/nvim/lua/plugins/plugins/tabout.lua b/packages/nvim/lua/plugins/plugins/tabout.lua new file mode 100644 index 0000000..158b587 --- /dev/null +++ b/packages/nvim/lua/plugins/plugins/tabout.lua @@ -0,0 +1,44 @@ +return { + { + 'abecodes/tabout.nvim', + lazy = false, + config = function() + require('tabout').setup { + tabkey = '', -- key to trigger tabout, set to an empty string to disable + backwards_tabkey = '', -- key to trigger backwards tabout, set to an empty string to disable + act_as_tab = true, -- shift content if tab out is not possible + act_as_shift_tab = false, -- reverse shift content if tab out is not possible (if your keyboard/terminal supports ) + default_tab = '', -- shift default action (only at the beginning of a line, otherwise is used) + default_shift_tab = '', -- reverse shift default action, + enable_backwards = true, -- well ... + completion = false, -- if the tabkey is used in a completion pum + tabouts = { + { open = "'", close = "'" }, + { open = '"', close = '"' }, + { open = '`', close = '`' }, + { open = '(', close = ')' }, + { open = '[', close = ']' }, + { open = '{', close = '}' } + }, + ignore_beginning = true, --[[ if the cursor is at the beginning of a filled element it will rather tab out than shift the content ]] + exclude = {} -- tabout will ignore these filetypes + } + end, + dependencies = { -- These are optional + "nvim-treesitter/nvim-treesitter", + "L3MON4D3/LuaSnip", + "hrsh7th/nvim-cmp" + }, + opt = true, -- Set this to true if the plugin is optional + event = 'InsertCharPre', -- Set the event to 'InsertCharPre' for better compatibility + priority = 1000, + }, + { + "L3MON4D3/LuaSnip", + keys = function() + -- Disable default tab keybinding in LuaSnip + return {} + end, + }, +} + diff --git a/packages/nvim/lua/plugins/plugins/telescope.lua b/packages/nvim/lua/plugins/plugins/telescope.lua new file mode 100644 index 0000000..ed8cc88 --- /dev/null +++ b/packages/nvim/lua/plugins/plugins/telescope.lua @@ -0,0 +1,4 @@ +return { + "nvim-telescope/telescope-file-browser.nvim", + dependencies = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim" } +} diff --git a/packages/nvim/lua/plugins/plugins/treesitter.lua b/packages/nvim/lua/plugins/plugins/treesitter.lua new file mode 100644 index 0000000..ab7482b --- /dev/null +++ b/packages/nvim/lua/plugins/plugins/treesitter.lua @@ -0,0 +1,15 @@ + +return { + "nvim-treesitter/nvim-treesitter", + build = ":TSUpdate", + config = function () + local configs = require("nvim-treesitter.configs") + + configs.setup({ + ensure_installed = { "c", "lua", "html", "dart", "rust" }, + sync_install = false, + highlight = { enable = true }, + indent = { enable = true }, + }) + end + } diff --git a/packages/nvim/lua/plugins/plugins/trouble.lua b/packages/nvim/lua/plugins/plugins/trouble.lua new file mode 100644 index 0000000..3741f30 --- /dev/null +++ b/packages/nvim/lua/plugins/plugins/trouble.lua @@ -0,0 +1,37 @@ +return { + "folke/trouble.nvim", + opts = {}, -- for default options, refer to the configuration section for custom setup. + cmd = "Trouble", + keys = { + { + "xx", + "Trouble diagnostics toggle", + desc = "Diagnostics (Trouble)", + }, + { + "xX", + "Trouble diagnostics toggle filter.buf=0", + desc = "Buffer Diagnostics (Trouble)", + }, + { + "cs", + "Trouble symbols toggle focus=false", + desc = "Symbols (Trouble)", + }, + { + "cl", + "Trouble lsp toggle focus=false win.position=right", + desc = "LSP Definitions / references / ... (Trouble)", + }, + { + "xL", + "Trouble loclist toggle", + desc = "Location List (Trouble)", + }, + { + "xQ", + "Trouble qflist toggle", + desc = "Quickfix List (Trouble)", + }, + }, +} diff --git a/packages/nvim/lua/plugins/plugins/whichkey.lua b/packages/nvim/lua/plugins/plugins/whichkey.lua new file mode 100644 index 0000000..d62b7b7 --- /dev/null +++ b/packages/nvim/lua/plugins/plugins/whichkey.lua @@ -0,0 +1,18 @@ +return { + "folke/which-key.nvim", + event = "VeryLazy", + opts = { + -- your configuration comes here + -- or leave it empty to use the default settings + -- refer to the configuration section below + }, + keys = { + { + "?", + function() + require("which-key").show({ global = false }) + end, + desc = "Buffer Local Keymaps (which-key)", + }, + }, +} \ No newline at end of file diff --git a/packages/nvim/lua/plugins/plugins/whichkey.lua~ b/packages/nvim/lua/plugins/plugins/whichkey.lua~ new file mode 100644 index 0000000..e69de29 diff --git a/packages/nvim/lua/plugins/rustaceanvim.lua b/packages/nvim/lua/plugins/rustaceanvim.lua index eb83332..7f4356d 100644 --- a/packages/nvim/lua/plugins/rustaceanvim.lua +++ b/packages/nvim/lua/plugins/rustaceanvim.lua @@ -1,5 +1,29 @@ return { - 'mrcjkb/rustaceanvim', - version = '^6', -- Recommended - lazy = false, -- This plugin is already lazy + "mrcjkb/rustaceanvim", + version = "^6", -- Recommended + lazy = false, -- This plugin is already lazy + + keys = { + { "rrr", ":RustRun", desc = "Rust run" }, + {"rd", ":RustLsp debug", desc = "Debug rust program" }, + {"rh", ":RustLsp hover actions", desc = "rust hover actions" }, + {"re", ":RustLsp explainError", desc = "explain rust error" }, + {"rs", ":RustLsp openDocs",desc = "open rust docs for symbol under cursor" }, + {"rrn", ":RustLsp ssr ", desc = "rust rename" } + }, + -- opts = { + -- function() + -- vim.keymap.set("n", "rrr", ":RustRun", { desc = "Run rust program" }) + -- vim.keymap.set("n", "rd", ":RustLsp debug", { desc = "Debug rust program" }) + -- vim.keymap.set("n", "rh", ":RustLsp hover actions", { desc = "rust hover actions" }) + -- vim.keymap.set("n", "re", ":RustLsp explainError", { desc = "explain rust error" }) + -- vim.keymap.set( + -- "n", + -- "rs", + -- ":RustLsp openDocs", + -- { desc = "open rust docs for symbol under cursor" } + -- ) + -- vim.keymap.set("n", "rrn", ":RustLsp ssr ", { desc = "rust rename" }) + -- end, + -- }, } diff --git a/packages/nvim/lua/plugins/typst.lua b/packages/nvim/lua/plugins/typst.lua new file mode 100644 index 0000000..6f65f73 --- /dev/null +++ b/packages/nvim/lua/plugins/typst.lua @@ -0,0 +1,6 @@ +return { + 'chomosuke/typst-preview.nvim', + lazy = false, -- or ft = 'typst' + version = '1.*', + opts = {}, -- lazy.nvim will implicitly calls `setup {}` +} diff --git a/packages/other/default.nix b/packages/other/default.nix index dbb7648..e82124e 100644 --- a/packages/other/default.nix +++ b/packages/other/default.nix @@ -15,10 +15,10 @@ set preview_images_method kitty programs.git = { enable = true; - userName = "Nico"; - userEmail = "nicovessen@gmail.com"; - extraConfig = { + settings = { safe.directory = "/etc/nixos"; + user.name = "Nico"; + user.email = "nicovessen@gmail.com"; }; }; diff --git a/packages/waybar/config b/packages/waybar/config index 6c0c889..d0403ba 100644 --- a/packages/waybar/config +++ b/packages/waybar/config @@ -3,9 +3,9 @@ "position": "top", "height": 38, "spacing": 0, - "modules-left": ["clock", "niri/workspaces", "hyprland/submap"], + "modules-left": ["clock", "niri/workspaces"], "modules-center": [ ], - "modules-right": ["network", "battery", "cpu", "memory", "custom/keyboard-layout", "custom/notification", "pulseaudio", "tray"], + "modules-right": ["network", "battery", "cpu", "memory", "custom/notification", "pulseaudio", "tray"], "custom/keyboard-layout": { "interval": 1, @@ -41,7 +41,22 @@ "network": { "format-wifi": " {essid} {signalStrength}%", "format-disconnected": " No Connection" + }, + + "battery": { + "format": "{capacity}% {icon}", +// "format-icons": [, ""] + "format-icons": { + "default": [ "", "", "" ], + "charging": [ "" ], + "warning": "", + "critical": "" + }, + + "states": { + "warning": 20, + "critical": 10 + } } - } diff --git a/packages/zed-editor/default.nix b/packages/zed-editor/default.nix new file mode 100644 index 0000000..fb6c7f7 --- /dev/null +++ b/packages/zed-editor/default.nix @@ -0,0 +1,54 @@ +{pkgs, lib, ... }: + +{ + home.file."/home/nico/.config/zed/settings.json" = { + source = ./settings.json; + }; + programs.zed-editor = { + enable = true; + }; + # ## This populates the userSettings "auto_install_extensions" + # extensions = ["nix" "Catppuccin"]; + # + # ## everything inside of these brackets are Zed options. + # userSettings = { + # assistant = { + # enabled = false; + # }; + # + # hour_format = "hour24"; + # auto_update = false; + # lsp = { + # rust-analyzer = { + # binary = { + # path_lookup = true; + # }; + # }; + # nix = { + # binary = { + # path_lookup = true; + # }; + # }; + # }; + # + # + # languages = { + # }; + # + # vim_mode = true; + # ## tell zed to use direnv and direnv can use a flake.nix enviroment. + # load_direnv = "shell_hook"; + # base_keymap = "VSCode"; + # theme = { + # mode = "dark"; + # light = "Catppuccin frappe"; + # dark = "Catppuccin mocha"; + # }; + # show_whitespaces = "all" ; + # ui_font_size = 16; + # buffer_font_size = 16; + # + # }; + # + # }; +} diff --git a/packages/zed-editor/settings.json b/packages/zed-editor/settings.json new file mode 100644 index 0000000..2e3835d --- /dev/null +++ b/packages/zed-editor/settings.json @@ -0,0 +1,57 @@ +{ + "diagnostics": { + "include_warnings": true, + "inline": { + "enabled": true + } +}, + "git": { + "inline_blame": { + "enabled": false + } +}, + "ssh_connections": [ + { + "host": "localhost", + "projects": [ + { + "paths": [ + "/home/dev/ids/prog" + ] + } + ] + } + ], + "agent": { + "enabled": true + }, + "auto_update": false, + "base_keymap": "VSCode", + "buffer_font_size": 16, + "hour_format": "hour24", + "languages": {}, + "load_direnv": "shell_hook", + "lsp": { + "nix": { + "binary": { + "path_lookup": true + } + }, + "rust-analyzer": { + "binary": { + "path_lookup": true + } + } + }, + "show_whitespaces": "all", + "theme": { + "dark": "Catppuccin Mocha", + "light": "Catppuccin frappe", + "mode": "system" + }, + "features": { + "edit_prediction_provider": "none" + }, + "ui_font_size": 16, + "vim_mode": true +} diff --git a/packages/zen/default.nix b/packages/zen/default.nix new file mode 100644 index 0000000..95eeed9 --- /dev/null +++ b/packages/zen/default.nix @@ -0,0 +1,51 @@ +{ config, pkgs, lib, inputs, ... }: + +let + zenBrowser = inputs.zen-browser.packages.${pkgs.stdenv.hostPlatform.system}.zen-browser; + + extension = shortId: guid: { + name = guid; + value = { + install_url = "https://addons.mozilla.org/en-US/firefox/downloads/latest/${shortId}/latest.xpi"; + installation_mode = "normal_installed"; + }; + }; + + prefs = { + "extensions.autoDisableScopes" = 0; + "extensions.pocket.enabled" = false; + "toolkit.legacyUserProfileCustomizations.stylesheets" = true; + }; + + extensions = [ + (extension "ublock-origin" "uBlock0@raymondhill.net") + (extension "bitwarden-password-manager" "{446900e4-71c2-419f-a6a7-df9c091e268b}") + (extension "styl-us" "{7a7a4a92-a2a0-41d1-9fd7-1e92480d612d}") + (extension "vimium-ff" "{d7742d87-e61d-4b78-b8a1-b469842139fa}") + ]; + +in +{ + home.packages = [ + (pkgs.wrapFirefox + zenBrowser + { + extraPrefs = lib.concatLines ( + lib.mapAttrsToList ( + name: value: ''lockPref(${lib.strings.toJSON name}, ${lib.strings.toJSON value});'' + ) prefs + ); + + extraPolicies = { + DisableTelemetry = true; + ExtensionSettings = builtins.listToAttrs extensions; + + SearchEngines = { + Default = "ddg"; + }; + }; + } + ) + ]; +} + diff --git a/packages/zen/zen-mod.nix b/packages/zen/zen-mod.nix new file mode 100644 index 0000000..40131bc --- /dev/null +++ b/packages/zen/zen-mod.nix @@ -0,0 +1,53 @@ +{ + inputs, + pkgs, + lib, + ... +}: +let + extension = shortId: guid: { + name = guid; + value = { + install_url = "https://addons.mozilla.org/en-US/firefox/downloads/latest/${shortId}/latest.xpi"; + installation_mode = "normal_installed"; + }; + }; + + prefs = { + "extensions.autoDisableScopes" = 0; + "extensions.pocket.enabled" = false; + "toolkit.legacyUserProfileCustomizations.stylesheets" = true; + }; + + extensions = [ + (extension "ublock-origin" "uBlock0@raymondhill.net") + (extension "bitwarden-password-manager" "{446900e4-71c2-419f-a6a7-df9c091e268b}") + (extension "styl-us" "{7a7a4a92-a2a0-41d1-9fd7-1e92480d612d}") + (extension "vimium-ff" "{d7742d87-e61d-4b78-b8a1-b469842139fa}") + ]; + +in +{ + environment.systemPackages = [ + (pkgs.wrapFirefox + inputs.zen-browser.packages.${pkgs.stdenv.hostPlatform.system}.zen-browser-unwrapped + { + extraPrefs = lib.concatLines ( + lib.mapAttrsToList ( + name: value: ''lockPref(${lib.strings.toJSON name}, ${lib.strings.toJSON value});'' + ) prefs + ); + + extraPolicies = { + DisableTelemetry = true; + ExtensionSettings = builtins.listToAttrs extensions; + + SearchEngines = { + Default = "ddg"; + }; + }; + } + ) + ]; +} +