diff --git a/flake.nix b/flake.nix index 77b872b..a3fd908 100644 --- a/flake.nix +++ b/flake.nix @@ -40,7 +40,7 @@ modules = [ ./home.nix catppuccin.homeModules.catppuccin - nixvim.homeManagerModules.nixvim + nixvim.homeModules.nixvim ]; }; diff --git a/modules/nixvim.nix b/modules/nixvim.nix index fbdbd24..d9250bb 100644 --- a/modules/nixvim.nix +++ b/modules/nixvim.nix @@ -160,15 +160,21 @@ lsp = { enable = true; servers = { + # script lua_ls.enable = true; + # web + cssls.enable = true; + html.enable = true; + # dev clangd.enable = true; - nil_ls.enable = true; pyright.enable = true; rust_analyzer = { enable = true; installCargo = true; installRustc = true; }; + # nix + nil_ls.enable = true; }; keymaps = { lspBuf = { @@ -184,6 +190,20 @@ lsp-format.enable = true; luasnip.enable = true; + + treesitter = { + enable = true; + settings = { + highlight.enable = true; + indent.enable = false; + }; + }; + + indent-blankline = { + enable = true; + settings.scope.enabled = true; + }; + cmp = { enable = true; settings = { @@ -207,5 +227,15 @@ }; }; }; + + extraConfigLua = '' + vim.diagnostic.config({ + virtual_text = { + prefix = "●", + spacing = 2, + source = "if_many", + } + }); + ''; }; } diff --git a/modules/packages.nix b/modules/packages.nix index 1443e69..16b475f 100644 --- a/modules/packages.nix +++ b/modules/packages.nix @@ -14,7 +14,6 @@ tealdeer grim slurp - wl-clipboard bc nh ]; diff --git a/modules/satty.nix b/modules/satty.nix index 55fc9aa..9a8e3d7 100644 --- a/modules/satty.nix +++ b/modules/satty.nix @@ -16,9 +16,10 @@ initial-tool = "crop"; output-filename = "/home/${username}/Obrazy/zrzuty/%d-%m-%Y_%H:%M:%S.png"; save-after-copy = true; + copy-command = "wl-copy"; disable-notifications = false; actions-on-escape = [ "exit" ]; - action-on-enter = "save-to-clipboard"; + actions-on-enter = [ "save-to-clipboard" ]; no-window-decoration = true; }; diff --git a/modules/waybar.nix b/modules/waybar.nix index 5dc8e96..61d8e44 100644 --- a/modules/waybar.nix +++ b/modules/waybar.nix @@ -151,7 +151,6 @@ player="$1" ${playerctl} -p "$player" metadata --format "{{status}} {{artist}} - {{title}}" --follow | while read -r line; do - # Nix wymaga ''${ dla zmiennych basha w stringach nixowych current_status=$(${playerctl} --player="$player" status 2>/dev/null) case "$current_status" in @@ -192,126 +191,128 @@ }; }; - style = '' + style = + #css + '' - /* Global styles */ - * { - transition: 0.2s all ease-in-out; - font-size: 14px; - font-family: inherit; - padding: 3px; - margin: 1px 2px; - color: @text; - border-radius: 12px; - } + /* Global styles */ + * { + transition: 0.2s all ease-in-out; + font-size: 14px; + font-family: inherit; + padding: 3px; + margin: 1px 2px; + color: @text; + border-radius: 12px; + } - *:hover { - text-shadow: none; - } + *:hover { + text-shadow: none; + } - /* Window */ - window#waybar { - background-color: @base; - border-radius: 15px; - } + /* Window */ + window#waybar { + background-color: @base; + border-radius: 15px; + } - /* Workspaces */ - #workspaces button { - padding: 2px; - margin: 1px; - background: transparent; - color: @lavender; - box-shadow: inset 0 1.5px; - } + /* Workspaces */ + #workspaces button { + padding: 2px; + margin: 1px; + background: transparent; + color: @lavender; + box-shadow: inset 0 1.5px; + } - #workspaces button:hover { - background-color: @surface1; - box-shadow: inset 2px 5px; - } + #workspaces button:hover { + background-color: @surface1; + box-shadow: inset 2px 5px; + } - #workspaces button.active { - background-color: @surface0; - box-shadow: inset 1px 4px 0 1px; - } + #workspaces button.active { + background-color: @surface0; + box-shadow: inset 1px 4px 0 1px; + } - #workspaces button.urgent { - background-color: @red; - animation-name: blink; - animation-duration: 1s; - animation-timing-function: steps(12); - animation-iteration-count: infinite; - animation-direction: alternate; - } + #workspaces button.urgent { + background-color: @red; + animation-name: blink; + animation-duration: 1s; + animation-timing-function: steps(12); + animation-iteration-count: infinite; + animation-direction: alternate; + } - /* Clock */ - #clock { - font-style: oblique; - opacity: 1; - } + /* Clock */ + #clock { + font-style: oblique; + opacity: 1; + } - /* Modules */ - .modules-left, - .modules-right, - .modules-center { - background-color: @crust; - } + /* Modules */ + .modules-left, + .modules-right, + .modules-center { + background-color: @crust; + } - /* Tray */ - #tray>.needs-attention { - background-color: @red; - } + /* Tray */ + #tray>.needs-attention { + background-color: @red; + } - /* Custom */ - #custom-spotify:hover { - background-color: @green; - } + /* Custom */ + #custom-spotify:hover { + background-color: @green; + } - #network:hover { - background-color: @sky; - } + #network:hover { + background-color: @sky; + } - #custom-notifications:hover { - background-color: @sapphire; - } + #custom-notifications:hover { + background-color: @sapphire; + } - /* Battery */ - #battery { - background-color: @base; - } + /* Battery */ + #battery { + background-color: @base; + } - #battery.warning:not(.charging) { - background: @yellow; - color: @foreground; - animation-name: blink; - animation-duration: 1s; - animation-timing-function: steps(12); - animation-iteration-count: infinite; - animation-direction: alternate; - } + #battery.warning:not(.charging) { + background: @yellow; + color: @foreground; + animation-name: blink; + animation-duration: 1s; + animation-timing-function: steps(12); + animation-iteration-count: infinite; + animation-direction: alternate; + } - #battery.charging, - #battery.plugged { - color: @foreground; - background-color: @green; - } + #battery.charging, + #battery.plugged { + color: @foreground; + background-color: @green; + } - #battery.critical:not(.charging) { - background-color: @red; - color: @foreground; - animation-name: blink; - animation-duration: 1s; - animation-timing-function: steps(12); - animation-iteration-count: infinite; - animation-direction: alternate; - } + #battery.critical:not(.charging) { + background-color: @red; + color: @foreground; + animation-name: blink; + animation-duration: 1s; + animation-timing-function: steps(12); + animation-iteration-count: infinite; + animation-direction: alternate; + } - @keyframes blink { - to { - background-color: #ff0000; - color: #000000; - } - } - ''; + @keyframes blink { + to { + background-color: #ff0000; + color: #000000; + } + } + ''; }; } diff --git a/modules/yazi.nix b/modules/yazi.nix index 82d46e9..5afc0e4 100644 --- a/modules/yazi.nix +++ b/modules/yazi.nix @@ -28,5 +28,15 @@ title_format = "Yazi: {cwd}"; }; }; + + keymap.mgr.prepend_keymap = [ + { + on = [ "y" ]; + run = [ + "shell -- for path in %s; do echo \"file://$path\"; done | wl-copy -t text/uri-list" + "yank" + ]; + } + ]; }; }