From 4922c9fcb44a9e0e2f42015e6e8e1af15e350663 Mon Sep 17 00:00:00 2001 From: Rouven Seifert Date: Sat, 25 Feb 2023 22:28:04 +0100 Subject: [PATCH] beautifying vim --- flake.lock | 12 +++--- users/rouven/modules/accounts/default.nix | 8 ++-- .../modules/accounts/powerline.neomuttrc | 2 +- users/rouven/modules/hyprland/default.nix | 2 +- users/rouven/modules/hyprland/hyprland.conf | 3 +- users/rouven/modules/hyprland/waybar.nix | 6 +-- users/rouven/modules/neovim/default.nix | 38 ++++++++++++++++--- users/rouven/modules/packages.nix | 24 ++++++------ 8 files changed, 62 insertions(+), 33 deletions(-) diff --git a/flake.lock b/flake.lock index 69fb941..a5382ca 100644 --- a/flake.lock +++ b/flake.lock @@ -85,11 +85,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1677259491, - "narHash": "sha256-nTIqi2mNJfV5tuQ+52nR3OGymv6tSC8HEQdR5EDHzT8=", + "lastModified": 1677346766, + "narHash": "sha256-0+smV3LldkVIRkD4cSfcVsJxxSB9NaRO56ze5Q8+hdo=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "1089e858b49975a4b9f6e49d377726ee4f164f96", + "rev": "cf566b59ce980790bc60dac8adf4df9ec8bcf9f9", "type": "github" }, "original": { @@ -229,11 +229,11 @@ ] }, "locked": { - "lastModified": 1677230078, - "narHash": "sha256-4WYJ+J76TiULFFdv1WCseklbwtunvZ9xzR4pi1MCezM=", + "lastModified": 1677348479, + "narHash": "sha256-9k2qZo+1KPRRfHzIUs9gfrTxx7ZR+KGPLkpWpDRlp5U=", "owner": "pta2002", "repo": "nixvim", - "rev": "29764b28af2f27d1e4bd576754e3e1622ca24003", + "rev": "705356d4787ecddfc88629ca7ec5e03a8edb4944", "type": "github" }, "original": { diff --git a/users/rouven/modules/accounts/default.nix b/users/rouven/modules/accounts/default.nix index e875fda..111c2df 100644 --- a/users/rouven/modules/accounts/default.nix +++ b/users/rouven/modules/accounts/default.nix @@ -87,7 +87,7 @@ in }; neomutt = { enable = true; - mailboxName = "--rouven@rfive.de--"; + mailboxName = " 󰒋 rfive.de"; extraMailboxes = [ "Sent" "Trash" "Junk" "Drafts" ]; }; }; @@ -151,7 +151,7 @@ in msmtp.enable = true; neomutt = { enable = true; - mailboxName = "--TU Dresden-------"; + mailboxName = "  TU Dresden"; extraMailboxes = [ "Opal" "Sent" "Trash" "Junk" "Drafts" ]; }; }; @@ -212,7 +212,7 @@ in msmtp.enable = true; neomutt = { enable = true; - mailboxName = "--iFSR-------------"; + mailboxName = "  iFSR"; extraMailboxes = [ "Sent" "Trash" "Drafts" ]; }; }; @@ -269,7 +269,7 @@ in msmtp.enable = true; neomutt = { enable = true; - mailboxName = "--gmail------------"; + mailboxName = " 󰊫 gmail"; extraMailboxes = [ "Sent" "Trash" "Junk" "Drafts" ]; }; }; diff --git a/users/rouven/modules/accounts/powerline.neomuttrc b/users/rouven/modules/accounts/powerline.neomuttrc index a20fb20..0fd5fb2 100644 --- a/users/rouven/modules/accounts/powerline.neomuttrc +++ b/users/rouven/modules/accounts/powerline.neomuttrc @@ -11,7 +11,7 @@ set vfolder_format = " %N %?n?%3n& ? %8m  · %f" set attach_format = "%u%D  %T%-75.75d %?T?%& ? %5s · %m/%M" # no addressed to me, to me, group, cc, sent by me, mailing list -set to_chars="󱡪➜" +set to_chars="➜" # unchanged mailbox, changed, read only, attach mode set status_chars = " " ifdef crypt_chars set crypt_chars = " " diff --git a/users/rouven/modules/hyprland/default.nix b/users/rouven/modules/hyprland/default.nix index ac9895b..0b7d3cc 100644 --- a/users/rouven/modules/hyprland/default.nix +++ b/users/rouven/modules/hyprland/default.nix @@ -17,8 +17,8 @@ grim slurp swappy -# font-awesome swaylock-effects + wlogout ]; xdg.configFile = { diff --git a/users/rouven/modules/hyprland/hyprland.conf b/users/rouven/modules/hyprland/hyprland.conf index faf0154..3ff51da 100644 --- a/users/rouven/modules/hyprland/hyprland.conf +++ b/users/rouven/modules/hyprland/hyprland.conf @@ -165,9 +165,10 @@ binde = SHIFT, XF86AudioLowerVolume, exec, pactl set-source-volume @DEFAULT_SOUR bind = ,XF86Messenger, exec, makoctl dismiss bind = SHIFT ,XF86Messenger, exec, makoctl restore bind = ,XF86Go, exec, makoctl invoke -bind = ,Cancel, exec, sh ~/.config/mako/do-not-disturb.sh +bind = SHIFT, XF86Go, exec, sh ~/.config/mako/do-not-disturb.sh bind = ,XF86Display, exec, hyprpaper bind = ,XF86Favorites, exec, swaylock +bind = ,Cancel, exec, wlogout # lock on lid bindl = ,switch:Lid Switch, exec, swaylock diff --git a/users/rouven/modules/hyprland/waybar.nix b/users/rouven/modules/hyprland/waybar.nix index 66888f0..2cc6a3e 100644 --- a/users/rouven/modules/hyprland/waybar.nix +++ b/users/rouven/modules/hyprland/waybar.nix @@ -15,9 +15,9 @@ modules-right = [ "network" "cpu" "temperature" "pulseaudio" "battery" "tray" "clock" ]; network = { format-wifi = " {essid} ({signalStrength}%)"; - format-ethernet = " {ipaddr}/{cidr}"; - tooltip-format = " {ifname} via {gwaddr}"; - format-linked = " {ifname} (No IP)"; + format-ethernet = "󰈀 {ipaddr}/{cidr}"; + tooltip-format = "󰈀 {ifname} via {gwaddr}"; + format-linked = "󰈀 {ifname} (No IP)"; format-disconnected = "Disconnected ⚠"; format-alt = "{ifname}: {ipaddr}/{cidr}"; }; diff --git a/users/rouven/modules/neovim/default.nix b/users/rouven/modules/neovim/default.nix index 636dc1f..3f43c41 100644 --- a/users/rouven/modules/neovim/default.nix +++ b/users/rouven/modules/neovim/default.nix @@ -76,7 +76,6 @@ lsp = { enable = true; onAttach = '' - require("lsp-format").on_attach(client) -- Enable completion triggered by vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc') @@ -92,6 +91,8 @@ vim.keymap.set('n', 'rn', vim.lsp.buf.rename, bufopts) vim.keymap.set('n', 'ca', vim.lsp.buf.code_action, bufopts) vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts) + vim.keymap.set('n', 'b', function() vim.lsp.buf.format { async = true } end, bufopts) + ''; servers = { pyright = { @@ -104,6 +105,7 @@ }; nvim-cmp = { enable = true; + mappingPresets = [ "insert" ]; sources = [ { name = "nvim_lsp"; @@ -112,17 +114,43 @@ { name = "buffer"; } ]; }; + treesitter = { + enable = true; + indent = true; + #folding = true; # somewhat broken at the moment + grammarPackages = with pkgs.tree-sitter-grammars; [ + tree-sitter-bash + tree-sitter-c + tree-sitter-cpp + tree-sitter-css + tree-sitter-go + tree-sitter-haskell + tree-sitter-html + tree-sitter-java + tree-sitter-javascript + tree-sitter-json + tree-sitter-latex + tree-sitter-lua + tree-sitter-markdown + tree-sitter-nix + tree-sitter-perl + tree-sitter-python + tree-sitter-regex + tree-sitter-rst + tree-sitter-rust + tree-sitter-sql + tree-sitter-toml + tree-sitter-typescript + tree-sitter-yaml + ]; + }; }; extraPlugins = with pkgs.vimPlugins; [ vim-nix dracula-vim nerdcommenter - lsp-format-nvim ]; highlight.ColorColumn.ctermbg = "darkgray"; - extraConfigLuaPre = '' - local lsp_format = require("lsp-format") - ''; }; } diff --git a/users/rouven/modules/packages.nix b/users/rouven/modules/packages.nix index 506a4d0..873922b 100644 --- a/users/rouven/modules/packages.nix +++ b/users/rouven/modules/packages.nix @@ -5,16 +5,16 @@ thunderbird # essentials - wpa_supplicant_gui - pcmanfm - xdg-utils + wpa_supplicant_gui # manage wifi + pcmanfm # rock solid file manager + xdg-utils # used for xdg-open snapper-gui # graphics - evince + evince # pdf viewer gimp - mpv - yt-dlp + mpv # best video player out there + yt-dlp # youtube downloader ffmpeg # sound @@ -45,18 +45,18 @@ bitwarden-cli # misc - neofetch - trash-cli + neofetch # obligatory #spotify # make probles atm virt-manager ventoy-bin - ripgrep - baobab - # font and icon stuff + trash-cli # better rm + ripgrep # better grep exa # ls but with icons - powerline-fonts + bat # better less + duf # better df + powerline-fonts # libs libyubikey