cleaned up all neovim things and added rust and go

forgot go keybinds ig
This commit is contained in:
Nico
2025-05-25 00:17:53 +02:00
parent 4ed9152f57
commit 4d252c9880
38 changed files with 260 additions and 1284 deletions

View File

@@ -1,3 +0,0 @@
general.import = [
"~/.config/alacritty/catppuccin-mocha.toml"
]

View File

@@ -1,13 +0,0 @@
{pkgs, config, lib, ...}:
{
home.packages = with pkgs; [
alacritty
alacritty-theme
];
home.file = {
".config/alacritty/alacritty.toml" = {
source = "/etc/nixos/packages/alacritty/alacritty.toml";
};
};
}

View File

@@ -1,18 +0,0 @@
{ ... }:
{
imports = [
# ./ags
./other
./sway
./waybar
./wpaperd
./nvim
./emacs
./kitty
./rofi
./alacritty
# ./qutebrowser
# ./hyprland
# ./vscode
];
}

View File

@@ -1,277 +0,0 @@
{ config, pkgs, ... }:
let
emacsWithPackages = (pkgs.emacsPackagesFor pkgs.emacs).emacsWithPackages;
in {
programs.emacs = {
enable = true;
extraConfig = ''
(load-theme 'catppuccin :no-confirm)
(global-display-line-numbers-mode 1)
(setq-default truncate-lines t)
(telephone-line-mode 1)
(xterm-mouse-mode 1)
(setq evil-want-C-u-scroll t)
(menu-bar--display-line-numbers-mode-relative)
(global-display-line-numbers-mode 1)
(electric-pair-mode)
;;(menu-bar-mode -1)
(require 'yasnippet)
(yas-global-mode 1)
(require 'which-key)
(which-key-mode)
(require 'evil-god-state)
(evil-define-key 'normal global-map "," 'evil-execute-in-god-state)
(which-key-enable-god-mode-support)
(require 'nix-mode)
(add-to-list 'auto-mode-alist '("\\.nix\\'" . nix-mode))
(use-package treemacs
:ensure t
:defer t
:init
(with-eval-after-load 'winum
(define-key winum-keymap (kbd "M-0") #'treemacs-select-window))
:config
(progn
(setq treemacs-collapse-dirs (if treemacs-python-executable 3 0)
treemacs-deferred-git-apply-delay 0.5
treemacs-directory-name-transformer #'identity
treemacs-display-in-side-window t
treemacs-eldoc-display 'simple
treemacs-file-event-delay 2000
treemacs-file-extension-regex treemacs-last-period-regex-value
treemacs-file-follow-delay 0.2
treemacs-file-name-transformer #'identity
treemacs-follow-after-init t
treemacs-expand-after-init t
treemacs-find-workspace-method 'find-for-file-or-pick-first
treemacs-git-command-pipe ""
treemacs-goto-tag-strategy 'refetch-index
treemacs-header-scroll-indicators '(nil . "^^^^^^")
treemacs-hide-dot-git-directory t
treemacs-indentation 2
treemacs-indentation-string " "
treemacs-is-never-other-window nil
treemacs-max-git-entries 5000
treemacs-missing-project-action 'ask
treemacs-move-files-by-mouse-dragging t
treemacs-move-forward-on-expand nil
treemacs-no-png-images nil
treemacs-no-delete-other-windows t
treemacs-project-follow-cleanup nil
treemacs-persist-file (expand-file-name ".cache/treemacs-persist" user-emacs-directory)
treemacs-position 'left
treemacs-read-string-input 'from-child-frame
treemacs-recenter-distance 0.1
treemacs-recenter-after-file-follow nil
treemacs-recenter-after-tag-follow nil
treemacs-recenter-after-project-jump 'always
treemacs-recenter-after-project-expand 'on-distance
treemacs-litter-directories '("/node_modules" "/.venv" "/.cask")
treemacs-project-follow-into-home nil
treemacs-show-cursor nil
treemacs-show-hidden-files t
treemacs-silent-filewatch nil
treemacs-silent-refresh nil
treemacs-sorting 'alphabetic-asc
treemacs-select-when-already-in-treemacs 'move-back
treemacs-space-between-root-nodes t
treemacs-tag-follow-cleanup t
treemacs-tag-follow-delay 1.5
treemacs-text-scale nil
treemacs-user-mode-line-format nil
treemacs-user-header-line-format nil
treemacs-wide-toggle-width 70
treemacs-width 35
treemacs-width-increment 1
treemacs-width-is-initially-locked t
treemacs-workspace-switch-cleanup nil)
;; The default width and height of the icons is 22 pixels. If you are
;; using a Hi-DPI display, uncomment this to double the icon size.
;;(treemacs-resize-icons 44)
(treemacs-follow-mode t)
(treemacs-filewatch-mode t)
(treemacs-fringe-indicator-mode 'always)
(when treemacs-python-executable
(treemacs-git-commit-diff-mode t))
(pcase (cons (not (null (executable-find "git")))
(not (null treemacs-python-executable)))
(`(t . t)
(treemacs-git-mode 'deferred))
(`(t . _)
(treemacs-git-mode 'simple)))
(treemacs-hide-gitignored-files-mode nil))
:bind
(:map global-map
("M-0" . treemacs-select-window)
("C-x t 1" . treemacs-delete-other-windows)
("C-x t t" . treemacs)
("C-x t d" . treemacs-select-directory)
("C-x t B" . treemacs-bookmark)
("C-x t C-t" . treemacs-find-file)
("C-x t M-t" . treemacs-find-tag)))
(use-package treemacs-evil
:after (treemacs evil)
:ensure t)
(use-package treemacs-projectile
:after (treemacs projectile)
:ensure t)
(use-package treemacs-icons-dired
:hook (dired-mode . treemacs-icons-dired-enable-once)
:ensure t)
(use-package treemacs-magit
:after (treemacs magit)
:ensure t)
(use-package treemacs-persp ;;treemacs-perspective if you use perspective.el vs. persp-mode
:after (treemacs persp-mode) ;;or perspective vs. persp-mode
:ensure t
:config (treemacs-set-scope-type 'Perspectives))
(use-package treemacs-tab-bar ;;treemacs-tab-bar if you use tab-bar-mode
:after (treemacs)
:ensure t
:config (treemacs-set-scope-type 'Tabs))
(treemacs-start-on-boot)
(treemacs-project-follow-mode)
(setq evil-want-keybinding nil)
(require 'evil)
(when (require 'evil-collection nil t)
(evil-collection-init))
(require 'evil)
(evil-mode 1)
(defun my-evil-jump-out-or-indent ()
"Springe aus Klammern oder Anführungszeichen heraus oder führe eine Einrückung durch."
(interactive)
(let ((pos (point)))
(cond
;; Wenn der Cursor auf einem Escape-Zeichen ist, gehe zurück
((looking-at-p "[\\]") (backward-char 1))
;; Wenn der Cursor auf einem öffnenden Zeichen ist, gehe vorwärts
((looking-at-p "[\"'()\\[\\{]") (forward-char 1))
;; Wenn der Cursor hinter einem schließenden Zeichen ist, gehe zurück
((looking-back "[\"'()\\[\\{]" (line-beginning-position)) (backward-char 1))
;; Wenn der Cursor nicht in Klammern oder Anführungszeichen ist, führe eine Einrückung durch
(t (indent-for-tab-command)))))
(define-key evil-insert-state-map (kbd "TAB") 'my-evil-jump-out-or-indent)
(with-eval-after-load 'flycheck
(add-hook 'flycheck-mode-hook #'flycheck-inline-mode))
(global-flycheck-mode 1)
(evil-define-key 'god global-map [escape] 'evil-god-state-bail)
(require 'smex)
(smex-initialize)
(global-set-key (kbd "M-x") 'smex)
(global-set-key (kbd "M-X") 'smex-major-mode-commands)
;; This is your old M-x.
(global-set-key (kbd "C-c C-c M-x") 'execute-extended-command)
(add-hook 'prog-mode-hook #'rainbow-delimiters-mode)
(setq gc-cons-threshold (* 100 1024 1024)
read-process-output-max (* 1024 1024))
;;Exit insert mode by pressing j and then k quickly
(setq key-chord-two-keys-delay 0.5)
(key-chord-define evil-insert-state-map "jk" 'evil-normal-state)
(key-chord-mode 1)
(setq company-idle-delay
(lambda () (if (company-in-string-or-comment) nil 0.1)))
(setq company-minimum-prefix-length 1)
(add-hook 'after-init-hook 'global-company-mode)
(custom-set-faces
'(company-tooltip
((t (:background "black" :foreground "thistle1"))))
'(company-tooltip-selection
((t (:background "bdarkslateblue" :foreground "thistle1"))))
)
(with-eval-after-load 'evil
(define-key evil-normal-state-map (kbd "C-h") 'windmove-left)
(define-key evil-normal-state-map (kbd "C-j") 'windmove-down)
(define-key evil-normal-state-map (kbd "C-k") 'windmove-up)
(define-key evil-normal-state-map (kbd "C-l") 'windmove-right)
(define-key evil-motion-state-map (kbd "C-h") 'windmove-left)
(define-key evil-motion-state-map (kbd "C-j") 'windmove-down)
(define-key evil-motion-state-map (kbd "C-k") 'windmove-up)
(define-key evil-motion-state-map (kbd "C-l") 'windmove-right))
(setq lsp-keymap-prefix "C-c l")
(require 'lsp-mode)
(evil-set-undo-system 'undo-redo)
(flycheck-inline-mode nil)
(global-evil-vimish-fold-mode 1)
'';
package = emacsWithPackages (epkgs: (with epkgs.melpaStablePackages; [
])
++ (with epkgs.melpaPackages; [
catppuccin-theme
evil
nix-mode
lsp-treemacs
treemacs-evil
treemacs-tab-bar
flycheck
flycheck-inline
lsp-mode
company
rainbow-delimiters
undo-fu
key-chord
telephone-line
smex
ranger
evil-god-state
which-key
magit
format-all
evil-vimish-fold
])
++ (with epkgs.elpaPackages; [
undo-tree
])
++ [
epkgs.yasnippet
# epkgs.yasnippet-snippets
]);
};
}

View File

@@ -1,60 +0,0 @@
{
description = "Flutter 3.13.x";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
config = {
android_sdk.accept_license = true;
allowUnfree = true;
};
};
buildToolsVersion = "34.0.0";
androidComposition = pkgs.androidenv.composeAndroidPackages {
buildToolsVersions = [ buildToolsVersion "33.0.1" ];
platformVersions = [ "34" "33" "28" ];
abiVersions = [ "armeabi-v7a" "arm64-v8a" ];
};
androidSdk = androidComposition.androidsdk;
in
{
devShell =
with pkgs; mkShell rec {
shellHook = ''
nu
exit
'';
GRADLE_OPTS = "-Dorg.gradle.project.android.aapt2FromMavenOverride=${androidSdk}/libexec/android-sdk/build-tools/33.0.1/aapt2";
ANDROID_SDK_ROOT = "${androidSdk}/libexec/android-sdk";
buildInputs = [
flutter
androidSdk # The customized SDK that we've made above
jdk17
vscode
(vscode-with-extensions.override {
vscode = vscodium;
vscodeExtensions = with vscode-extensions; [
vscodevim.vim
dart-code.dart-code
dart-code.flutter
] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace[
{
name = "awesome-flutter-snippets";
publisher = "nash";
version = "4.0.1";
sha256 = "lXdos/xB18h3Z0YfkgEk55G2JvRMYudUUIltugQjylU=";
}
];
})
];
};
});
}

View File

@@ -1,3 +1,4 @@
exec-once=waybar
exec-once=swaync
exec-once=wl-paste --watch cliphist store
exec-once=wpaperd

View File

@@ -1,161 +0,0 @@
{ pkgs, config, lib,... }:
{
home.packages = with pkgs; [
];
programs.nushell = {
enable = true;
extraConfig = ''
$env.config = {
show_banner: false,
edit_mode: vi
}
'';
shellAliases = {
update = "sudo nixos-rebuild switch --flake /etc/nixos/#my-nixos";
emacs = "emacs -nw";
femacs = "emacs -nw --load /etc/nixos/packages/emacs/flutter/init.el";
pemacs = "emacs -nw --load /home/n/Documents/Shells//python/init.el";
};
};
programs.starship = {
enable = true;
settings = {
};
};
programs.carapace = {
enable = true;
enableNushellIntegration = true;
};
programs.zsh = {
enable = true;
enableCompletion = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
initExtra = ''
eval "$(starship init zsh)"
'';
shellAliases = {
update = "sudo nixos-rebuild switch --flake /etc/nixos/#my-nixos";
emacs = "emacs -nw";
femacs = "emacs -nw --load /etc/nixos/packages/emacs/flutter/init.el";
pemacs = "emacs -nw --load /home/n/Documents/Shells//python/init.el";
};
zplug = {
enable = true;
plugins = [
{ name = "zsh-users/zsh-autosuggestions"; } # Simple plugin installation
];
};
oh-my-zsh = {
enable = true;
plugins = [ "git" ];
theme = "agnoster";
};
};
programs.kitty = {
enable = true;
extraConfig = ''
# vim:ft=kitty
## name: Catppuccin Kitty Mocha
## author: Catppuccin Org
## license: MIT
## upstream: https://github.com/catppuccin/kitty/blob/main/themes/mocha.conf
## blurb: Soothing pastel theme for the high-spirited!
map ctrl+shift+w no_op
# The basic colors
foreground #cdd6f4
background #1e1e2e
selection_foreground #1e1e2e
selection_background #f5e0dc
# Cursor colors
cursor #f5e0dc
cursor_text_color #1e1e2e
# URL underline color when hovering with mouse
url_color #f5e0dc
# Kitty window border colors
active_border_color #b4befe
inactive_border_color #6c7086
bell_border_color #f9e2af
# OS Window titlebar colors
wayland_titlebar_color system
macos_titlebar_color system
# Tab bar colors
active_tab_foreground #11111b
active_tab_background #cba6f7
inactive_tab_foreground #cdd6f4
inactive_tab_background #181825
tab_bar_background #11111b
# Colors for marks (marked text in the terminal)
mark1_foreground #1e1e2e
mark1_background #b4befe
mark2_foreground #1e1e2e
mark2_background #cba6f7
mark3_foreground #1e1e2e
mark3_background #74c7ec
# The 16 terminal colors
# black
color0 #45475a
color8 #585b70
# red
color1 #f38ba8
color9 #f38ba8
# green
color2 #a6e3a1
color10 #a6e3a1
# yellow
color3 #f9e2af
color11 #f9e2af
# blue
color4 #89b4fa
color12 #89b4fa
# magenta
color5 #f5c2e7
color13 #f5c2e7
# cyan
color6 #94e2d5
color14 #94e2d5
# white
color7 #bac2de
color15 #a6adc8
'';
};
}

View File

@@ -1,4 +1,4 @@
{ pkgs, config, lib,... }:
{ pkgs, lib,... }:
{
home.packages = with pkgs; [
@@ -8,6 +8,9 @@
lldb
lazygit
gcc
gopls
stylua
rustfmt
];
programs.neovim = {
@@ -52,6 +55,8 @@ programs.neovim.plugins = [
".config/nvim/lua/plugins/mini-animate.lua".source = ./lua/plugins/mini-animate.lua;
".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;
}
];

View File

@@ -1,31 +0,0 @@
{ pkgs, config, lib,... }:
{
home.packages = with pkgs; [
];
programs.neovim = {
enable = true;
vimAlias = true;
};
programs.neovim.plugins = [
pkgs.vimPlugins.lazy-nvim
];
home.file =
lib.mkMerge [
{
".config/nvim/init.lua".source = ./init.lua;
".config/nvim/lua/config/lazy.lua".source = ./lua/config/lazy.lua;
".config/nvim/lua/plugins/flutter.lua".source = ./lua/plugins/flutter.lua;
".config/nvim/lua/plugins/coq.lua".source = ./lua/plugins/coq.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;
".config/nvim/lua/plugins/highlight-colors.lua".source = ./lua/plugins/highlight-colors.lua;
}
];
}

View File

@@ -1,41 +1,42 @@
-- Tab
vim.opt.tabstop = 2 -- number of visual spaces per TAB
vim.opt.softtabstop = 2 -- number of spacesin tab when editing
vim.opt.shiftwidth = 2 -- insert 4 spaces on a tab
vim.opt.expandtab = true -- tabs are spaces, mainly because of python
vim.opt.tabstop = 2 -- number of visual spaces per TAB
vim.opt.softtabstop = 2 -- number of spacesin tab when editing
vim.opt.shiftwidth = 2 -- insert 4 spaces on a tab
vim.opt.expandtab = true -- tabs are spaces, mainly because of python
-- UI config
vim.opt.number = true -- show absolute number
vim.opt.relativenumber = true -- add numbers to each line on the left side
vim.opt.splitbelow = true -- open new vertical split bottom
vim.opt.splitright = true -- open new horizontal splits right
vim.opt.number = true -- show absolute number
vim.opt.relativenumber = true -- add numbers to each line on the left side
vim.opt.splitbelow = true -- open new vertical split bottom
vim.opt.splitright = true -- open new horizontal splits right
-- vim.opt.termguicolors = true -- enabl 24-bit RGB color in the TUI
vim.opt.showmode = false -- we are experienced, wo don't need the "-- INSERT --" mode hint
vim.opt.showmode = false -- we are experienced, wo don't need the "-- INSERT --" mode hint
-- Searching
vim.opt.incsearch = true -- search as characters are entered
vim.opt.hlsearch = false -- do not highlight matches
vim.opt.ignorecase = true -- ignore case in searches by default
vim.opt.smartcase = true -- but make it case sensitive if an uppercase is entered
vim.opt.incsearch = true -- search as characters are entered
vim.opt.hlsearch = false -- do not highlight matches
vim.opt.ignorecase = true -- ignore case in searches by default
vim.opt.smartcase = true -- but make it case sensitive if an uppercase is entered
vim.cmd("set nowrap")
-- -- Keybinds
vim.keymap.set('n', '<C-h>', '<C-w>h', opts)
vim.keymap.set('n', '<C-j>', '<C-w>j', opts)
vim.keymap.set('n', '<C-k>', '<C-w>k', opts)
vim.keymap.set('n', '<C-l>', '<C-w>l', opts)
vim.keymap.set("n", "<C-h>", "<C-w>h", opts)
vim.keymap.set("n", "<C-j>", "<C-w>j", opts)
vim.keymap.set("n", "<C-k>", "<C-w>k", opts)
vim.keymap.set("n", "<C-l>", "<C-w>l", opts)
-- Resize with arrows
-- delta: 2 lines
vim.keymap.set('n', '<C-Up>', ':resize -2<CR>', opts)
vim.keymap.set('n', '<C-Down>', ':resize +2<CR>', opts)
vim.keymap.set('n', '<C-Left>', ':vertical resize -2<CR>', opts)
vim.keymap.set('n', '<C-Right>', ':vertical resize +2<CR>', opts)
vim.keymap.set("n", "<C-Up>", ":resize -2<CR>", opts)
vim.keymap.set("n", "<C-Down>", ":resize +2<CR>", opts)
vim.keymap.set("n", "<C-Left>", ":vertical resize -2<CR>", opts)
vim.keymap.set("n", "<C-Right>", ":vertical resize +2<CR>", opts)
vim.keymap.set('i', 'jk', '<Esc>', opts)
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts)
vim.keymap.set("i", "jk", "<Esc>", opts)
vim.keymap.set("n", "gd", vim.lsp.buf.definition, bufopts)
-- jump to definition
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts)
vim.keymap.set("n", "gd", vim.lsp.buf.definition, bufopts)
-- code actions
vim.keymap.set("n", "<leader>ca", function()
@@ -46,181 +47,100 @@ end, { noremap = true, silent = true })
require("config.lazy")
-- require("flutter-tools").setup {} -- use defaults
require("catppuccin").setup({
integrations = {
cmp = false,
gitsigns = true,
nvimtree = true,
treesitter = true,
notify = false,
mini = {
enabled = false,
indentscope_color = "",
},
}
})
require("catppuccin").setup({})
vim.cmd.colorscheme("catppuccin")
-- css colors
vim.opt.termguicolors = true
require('nvim-highlight-colors').setup({})
vim.cmd.colorscheme "catppuccin"
require("nvim-highlight-colors").setup({})
-- Plugin setups
require('lualine').setup()
require("lualine").setup()
require("dapui").setup()
require("ibl").setup()
require("telescope").load_extension("flutter")
require("toggleterm").setup{}
require("toggleterm").setup({})
require("mini.animate").setup()
require("tiny-inline-diagnostic").setup()
require("tabby").setup({
preset = 'tab_only'
})
vim.o.showtabline = 2
require("tabby").setup({})
-- alternatively you can override the default configs
require("flutter-tools").setup {
ui = {
-- the border type to use for all floating windows, the same options/formats
-- used for ":h nvim_open_win" e.g. "single" | "shadow" | {<table-of-eight-chars>}
border = "rounded",
-- This determines whether notifications are show with `vim.notify` or with the plugin's custom UI
-- please note that this option is eventually going to be deprecated and users will need to
-- depend on plugins like `nvim-notify` instead.
notification_style = 'plugin'
},
decorations = {
statusline = {
-- set to true to be able use the 'flutter_tools_decorations.app_version' in your statusline
-- this will show the current version of the flutter app from the pubspec.yaml file
app_version = false,
-- set to true to be able use the 'flutter_tools_decorations.device' in your statusline
-- this will show the currently running device if an application was started with a specific
-- device
device = true,
-- set to true to be able use the 'flutter_tools_decorations.project_config' in your statusline
-- this will show the currently selected project configuration
project_config = false,
}
},
debugger = { -- integrate with nvim dap + install dart code debugger
enabled = true,
-- if empty dap will not stop on any exceptions, otherwise it will stop on those specified
-- see |:help dap.set_exception_breakpoints()| for more info
exception_breakpoints = { "uncaught" },
-- Whether to call toString() on objects in debug views like hovers and the
-- variables list.
-- Invoking toString() has a performance cost and may introduce side-effects,
-- although users may expected this functionality. null is treated like false.
evaluate_to_string_in_debug_views = true,
},
flutter_lookup_cmd = nil, -- example "dirname $(which flutter)" or "asdf where flutter"
root_patterns = { ".git", "pubspec.yaml" }, -- patterns to find the root of your flutter project
fvm = false, -- takes priority over path, uses <workspace>/.fvm/flutter_sdk if enabled
widget_guides = {
enabled = true,
},
closing_tags = {
highlight = "ErrorMsg", -- highlight for the closing tag
prefix = ">", -- character to use for close tag e.g. > Widget
priority = 10, -- priority of virtual text in current line
-- consider to configure this when there is a possibility of multiple virtual text items in one line
-- see `priority` option in |:help nvim_buf_set_extmark| for more info
enabled = true -- set to false to disable
},
dev_log = {
enabled = true,
filter = nil, -- optional callback to filter the log
-- takes a log_line as string argument; returns a boolean or nil;
-- the log_line is only added to the output if the function returns true
notify_errors = false, -- if there is an error whilst running then notify the user
open_cmd = "15split", -- command to use to open the log buffer
focus_on_open = true, -- focus on the newly opened log window
},
dev_tools = {
autostart = false, -- autostart devtools server if not detected
auto_open_browser = false, -- Automatically opens devtools in the browser
},
outline = {
open_cmd = "30vnew", -- command to use to open the outline buffer
auto_open = false -- if true this will open the outline automatically when it is first populated
},
lsp = {
color = { -- show the derived colours for dart variables
enabled = true, -- whether or not to highlight color variables at all, only supported on flutter >= 2.10
background = true, -- highlight the background
background_color = nil, -- required, when background is transparent (i.e. background_color = { r = 19, g = 17, b = 24},)
foreground = false, -- highlight the foreground
virtual_text = true, -- show the highlight using virtual text
virtual_text_str = "", -- the virtual text character to highlight
},
-- see the link below for details on each option:
-- https://github.com/dart-lang/sdk/blob/master/pkg/analysis_server/tool/lsp_spec/README.md#client-workspace-configuration
settings = {
showTodos = true,
completeFunctionCalls = true,
renameFilesWithClasses = "prompt", -- "always"
enableSnippets = true,
updateImportsOnRename = true, -- Whether to update imports and other directives when files are renamed. Required for `FlutterRename` command.
}
}
}
require("tiny-inline-diagnostic").setup({})
-- conform (code formatter)
require("conform").setup({})
-- flutter
require("flutter-tools").setup({})
-- GO
require("go").setup()
------------- -- Debugger
local dap, dapui = require("dap"), require("dapui")
dap.listeners.before.attach.dapui_config = function()
dapui.open()
dapui.open()
end
dap.listeners.before.launch.dapui_config = function()
dapui.open()
dapui.open()
end
dap.listeners.before.event_terminated.dapui_config = function()
dapui.close()
dapui.close()
end
dap.listeners.before.event_exited.dapui_config = function()
dapui.close()
dapui.close()
end
-- c und rust
dap.adapters.lldb = {
type = 'executable',
command = 'lldb', -- adjust as needed, must be absolute path
name = 'lldb'
-- dap.adapters.lldb = {
-- type = 'executable',
-- command = 'lldb', -- adjust as needed, must be absolute path
-- name = 'lldb'
-- }
-- dap.configurations.c = dap.configurations.cpp
-- dap.configurations.rust = dap.configurations.cpp
dap.adapters.gdb = {
type = "executable",
command = "gdb",
args = { "--interpreter=dap", "--eval-command", "set print pretty on" },
}
dap.configurations.c = dap.configurations.cpp
dap.configurations.rust = dap.configurations.cpp
dap.configurations.cpp = dap.configurations.gdb
dap.configurations.rust = dap.configurations.gdb
--------------------------------------------
local builtin = require('telescope.builtin')
local builtin = require("telescope.builtin")
local conform = require("conform")
-- Rust binds
vim.keymap.set("n", "<leader>rrr", ":RustRun<CR>", { desc = "Run rust program" })
vim.keymap.set("n", "<leader>rd", ":RustLsp debug<CR>", { desc = "Debug rust program" })
vim.keymap.set("n", "<leader>rh", ":RustLsp hover actions<CR>", { desc = "rust hover actions" })
vim.keymap.set("n", "<leader>re", ":RustLsp explainError<CR>", { desc = "explain rust error" })
vim.keymap.set("n", "<leader>rs", ":RustLsp openDocs<CR>", { desc = "open rust docs for symbol under cursor" })
vim.keymap.set("n", "<leader>rrn", ":RustLsp ssr ", { desc = "rust rename" })
-- Telescope binds
vim.keymap.set('n', '<leader>ff', builtin.find_files, { desc = 'Telescope find files' })
vim.keymap.set('n', '<leader>fg', builtin.live_grep, { desc = 'Telescope live grep' })
vim.keymap.set('n', '<leader>fb', ":Telescope file_browser<CR>", { desc = 'Telescope file_browser' })
vim.keymap.set('n', '<leader>fh', builtin.help_tags, { desc = 'Telescope help tags' })
vim.keymap.set('n', '<leader>fl', ": Telescope flutter commands<CR>", { desc = "Open Telescope flutter" })
vim.keymap.set('n', '<leader>fl', ":Telescope flutter commands<CR>", { desc = "Open Telescope flutter" })
vim.keymap.set("n", "<leader>ff", builtin.find_files, { desc = "Telescope find files" })
vim.keymap.set("n", "<leader>fg", builtin.live_grep, { desc = "Telescope live grep" })
vim.keymap.set("n", "<leader>fb", ":Telescope file_browser<CR>", { desc = "Telescope file_browser" })
vim.keymap.set("n", "<leader>fh", builtin.help_tags, { desc = "Telescope help tags" })
vim.keymap.set("n", "<leader>fl", ": Telescope flutter commands<CR>", { desc = "Open Telescope flutter" })
vim.keymap.set("n", "<leader>fl", ":Telescope flutter commands<CR>", { desc = "Open Telescope flutter" })
-- Dap binds
vim.keymap.set('n', '<leader>do', dapui.open, { desc = "Open debug overlay" })
vim.keymap.set('n', '<leader>dc', dapui.close, { desc = "Close debug overlay" })
vim.keymap.set('n', '<F5>', dap.toggle_breakpoint, { desc = "Toggle breakpoint" })
vim.keymap.set('n', '<F6>', dap.continue, { desc = "dap Continue" })
vim.keymap.set('n', '<F7>', dap.step_over, { desc = "dap step over" })
vim.keymap.set('n', '<F8>', dap.step_into, { desc = "dap step into" })
vim.keymap.set("n", "<leader>do", dapui.open, { desc = "Open debug overlay" })
vim.keymap.set("n", "<leader>dc", dapui.close, { desc = "Close debug overlay" })
vim.keymap.set("n", "<F5>", dap.toggle_breakpoint, { desc = "Toggle breakpoint" })
vim.keymap.set("n", "<F6>", dap.continue, { desc = "dap Continue" })
vim.keymap.set("n", "<F7>", dap.step_over, { desc = "dap step over" })
vim.keymap.set("n", "<F8>", dap.step_into, { desc = "dap step into" })
-- sudawrite
vim.keymap.set("n", "<leader>sw", ":SudaWrite<CR>", { desc = "Write as sudo" })
-- conform
vim.keymap.set("n", "<leader>cf", conform.format, { desc = "format code" })
-- toggleterm binds
vim.keymap.set('n', '<leader>tf', ':ToggleTerm direction=float <CR>', { desc = "Open floating terminal" })
vim.keymap.set('n', '<leader>tt', ':ToggleTerm direction=tab size=50 <CR>', { desc = "Open terminal in new tab" })
vim.keymap.set('n', '<leader>tv', ':ToggleTerm direction=vertical <CR>', { desc = "Open terminal vertical" })
vim.keymap.set('n', '<leader>ts', ':ToggleTerm direction=vertical <CR>', { desc = "select open terminal" })
vim.keymap.set("n", "<leader>tf", ":ToggleTerm direction=float <CR>", { desc = "Open floating terminal" })
vim.keymap.set("n", "<leader>tt", ":ToggleTerm direction=tab size=50 <CR>", { desc = "Open terminal in new tab" })
vim.keymap.set("n", "<leader>tv", ":ToggleTerm direction=vertical <CR>", { desc = "Open terminal vertical" })
vim.keymap.set("n", "<leader>ts", ":ToggleTerm direction=vertical <CR>", { desc = "select open terminal" })
-- code actions
vim.keymap.set("n", "<leader>ca", function()
require("tiny-code-action").code_action()
end, { desc = "Show code actions", noremap = true, silent = true })

View File

@@ -1,113 +0,0 @@
-- Tab
vim.opt.tabstop = 2 -- number of visual spaces per TAB
vim.opt.softtabstop = 2 -- number of spacesin tab when editing
vim.opt.shiftwidth = 2 -- insert 4 spaces on a tab
vim.opt.expandtab = true -- tabs are spaces, mainly because of python
-- UI config
vim.opt.number = true -- show absolute number
vim.opt.relativenumber = true -- add numbers to each line on the left side
vim.opt.splitbelow = true -- open new vertical split bottom
vim.opt.splitright = true -- open new horizontal splits right
-- vim.opt.termguicolors = true -- enabl 24-bit RGB color in the TUI
vim.opt.showmode = false -- we are experienced, wo don't need the "-- INSERT --" mode hint
-- Searching
vim.opt.incsearch = true -- search as characters are entered
vim.opt.hlsearch = false -- do not highlight matches
vim.opt.ignorecase = true -- ignore case in searches by default
vim.opt.smartcase = true -- but make it case sensitive if an uppercase is entered
-- -- Keybinds
vim.keymap.set('n', '<C-h>', '<C-w>h', opts)
vim.keymap.set('n', '<C-j>', '<C-w>j', opts)
vim.keymap.set('n', '<C-k>', '<C-w>k', opts)
vim.keymap.set('n', '<C-l>', '<C-w>l', opts)
-- Resize with arrows
-- delta: 2 lines
vim.keymap.set('n', '<C-Up>', ':resize -2<CR>', opts)
vim.keymap.set('n', '<C-Down>', ':resize +2<CR>', opts)
vim.keymap.set('n', '<C-Left>', ':vertical resize -2<CR>', opts)
vim.keymap.set('n', '<C-Right>', ':vertical resize +2<CR>', opts)
-- Telescope binds
vim.keymap.set("n", "<space>fb", ":Telescope file_browser<CR>")
vim.keymap.set('i', 'jk', '<Esc>', opts)
-- Lazy
require("config.lazy")
-- require("flutter-tools").setup {} -- use defaults
require("catppuccin").setup({
integrations = {
cmp = false,
gitsigns = true,
nvimtree = true,
treesitter = true,
notify = false,
mini = {
enabled = false,
indentscope_color = "",
},
}
})
-- css colors
vim.opt.termguicolors = true
require('nvim-highlight-colors').setup({})
vim.cmd.colorscheme "catppuccin"
-- lsp
local on_attach = function(_, bufnr)
local bufmap = function(keys, func)
vim.keymap.set('n', keys, func, { buffer = bufnr })
end
bufmap('<leader>r', vim.lsp.buf.rename)
bufmap('<leader>a', vim.lsp.buf.code_action)
bufmap('gd', vim.lsp.buf.definition)
bufmap('gD', vim.lsp.buf.declaration)
bufmap('gI', vim.lsp.buf.implementation)
bufmap('<leader>D', vim.lsp.buf.type_definition)
bufmap('gr', require('telescope.builtin').lsp_references)
bufmap('<leader>s', require('telescope.builtin').lsp_document_symbols)
bufmap('<leader>S', require('telescope.builtin').lsp_dynamic_workspace_symbols)
bufmap('K', vim.lsp.buf.hover)
vim.api.nvim_buf_create_user_command(bufnr, 'Format', function(_)
vim.lsp.buf.format()
end, {})
end
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = require('coq').lsp_ensure_capabilities(capabilities)
require('lspconfig').lua_ls.setup {
on_attach = on_attach,
capabilities = capabilities,
root_dir = function()
return vim.loop.cwd()
end,
cmd = { "lua-lsp" },
settings = {
Lua = {
workspace = { checkThirdParty = false },
telemetry = { enable = false },
},
}
}
require('lspconfig').nil_ls.setup {
on_attach = on_attach,
capabilities = capabilities,
}

View File

@@ -1 +1,18 @@
return { "catppuccin/nvim", name = "catppuccin", priority = 1000 }
return {
"catppuccin/nvim",
name = "catppuccin",
priority = 1000,
opts = {
integrations = {
cmp = false,
gitsigns = true,
nvimtree = true,
treesitter = true,
notify = false,
mini = {
enabled = false,
indentscope_color = "",
},
}
}
}

View File

@@ -0,0 +1,11 @@
return {
'stevearc/conform.nvim',
opts = {
formatters_by_ft = {
dart = { "dart_format" },
lua = { "stylua" },
rust = { "rustfmt" },
go = { "gofmt" },
},
},
}

View File

@@ -0,0 +1,9 @@
return {
"mrxiaozhuox/dioxus.nvim",
opts = {
format = {
split_line_attributes = true,
},
},
ft = "rust",
}

View File

@@ -7,4 +7,90 @@ return {
'stevearc/dressing.nvim', -- optional for vim.ui.select
},
config = true,
opts = {
ui = {
-- the border type to use for all floating windows, the same options/formats
-- used for ":h nvim_open_win" e.g. "single" | "shadow" | {<table-of-eight-chars>}
border = "rounded",
-- This determines whether notifications are show with `vim.notify` or with the plugin's custom UI
-- please note that this option is eventually going to be deprecated and users will need to
-- depend on plugins like `nvim-notify` instead.
notification_style = 'plugin'
},
decorations = {
statusline = {
-- set to true to be able use the 'flutter_tools_decorations.app_version' in your statusline
-- this will show the current version of the flutter app from the pubspec.yaml file
app_version = false,
-- set to true to be able use the 'flutter_tools_decorations.device' in your statusline
-- this will show the currently running device if an application was started with a specific
-- device
device = true,
-- set to true to be able use the 'flutter_tools_decorations.project_config' in your statusline
-- this will show the currently selected project configuration
project_config = false,
}
},
debugger = { -- integrate with nvim dap + install dart code debugger
enabled = true,
-- if empty dap will not stop on any exceptions, otherwise it will stop on those specified
-- see |:help dap.set_exception_breakpoints()| for more info
exception_breakpoints = { "uncaught" },
-- Whether to call toString() on objects in debug views like hovers and the
-- variables list.
-- Invoking toString() has a performance cost and may introduce side-effects,
-- although users may expected this functionality. null is treated like false.
evaluate_to_string_in_debug_views = true,
},
flutter_lookup_cmd = nil, -- example "dirname $(which flutter)" or "asdf where flutter"
root_patterns = { ".git", "pubspec.yaml" }, -- patterns to find the root of your flutter project
fvm = false, -- takes priority over path, uses <workspace>/.fvm/flutter_sdk if enabled
widget_guides = {
enabled = true,
},
closing_tags = {
highlight = "ErrorMsg", -- highlight for the closing tag
prefix = ">", -- character to use for close tag e.g. > Widget
priority = 10, -- priority of virtual text in current line
-- consider to configure this when there is a possibility of multiple virtual text items in one line
-- see `priority` option in |:help nvim_buf_set_extmark| for more info
enabled = true -- set to false to disable
},
dev_log = {
enabled = true,
filter = nil, -- optional callback to filter the log
-- takes a log_line as string argument; returns a boolean or nil;
-- the log_line is only added to the output if the function returns true
notify_errors = false, -- if there is an error whilst running then notify the user
open_cmd = "15split", -- command to use to open the log buffer
focus_on_open = true, -- focus on the newly opened log window
},
dev_tools = {
autostart = false, -- autostart devtools server if not detected
auto_open_browser = false, -- Automatically opens devtools in the browser
},
outline = {
open_cmd = "30vnew", -- command to use to open the outline buffer
auto_open = false -- if true this will open the outline automatically when it is first populated
},
lsp = {
color = { -- show the derived colours for dart variables
enabled = true, -- whether or not to highlight color variables at all, only supported on flutter >= 2.10
background = true, -- highlight the background
background_color = nil, -- required, when background is transparent (i.e. background_color = { r = 19, g = 17, b = 24},)
foreground = false, -- highlight the foreground
virtual_text = true, -- show the highlight using virtual text
virtual_text_str = "", -- the virtual text character to highlight
},
-- see the link below for details on each option:
-- https://github.com/dart-lang/sdk/blob/master/pkg/analysis_server/tool/lsp_spec/README.md#client-workspace-configuration
settings = {
showTodos = true,
completeFunctionCalls = true,
renameFilesWithClasses = "prompt", -- "always"
enableSnippets = true,
updateImportsOnRename = true, -- Whether to update imports and other directives when files are renamed. Required for `FlutterRename` command.
}
}
}
}

View File

@@ -0,0 +1,25 @@
return {
"ray-x/go.nvim",
dependencies = { -- optional packages
"neovim/nvim-lspconfig",
"nvim-treesitter/nvim-treesitter",
},
opts = {
-- lsp_keymaps = false,
-- other options
},
config = function(lp, opts)
require("go").setup(opts)
local format_sync_grp = vim.api.nvim_create_augroup("GoFormat", {})
vim.api.nvim_create_autocmd("BufWritePre", {
pattern = "*.go",
callback = function()
require('go.format').goimports()
end,
group = format_sync_grp,
})
end,
event = {"CmdlineEnter"},
ft = {"go", 'gomod'},
build = ':lua require("go.install").update_all_sync()' -- if you need to install/update all binaries
}

View File

@@ -7,7 +7,8 @@ return {
servers = {
lua_ls = {},
nil_ls = {},
rust_analyzer = {}
-- rust_analyzer = {},
gopls = {},
}
},
config = function(_, opts)

View File

@@ -1,13 +0,0 @@
return
{
"neovim/nvim-lspconfig",
opts = function()
local keys = require("lazyvim.plugins.lsp.keymaps").get()
-- change a keymap
keys[#keys + 1] = { "K", "<cmd>echo 'hello'<cr>" }
-- disable a keymap
keys[#keys + 1] = { "K", false }
-- add a keymap
keys[#keys + 1] = { "H", "<cmd>echo 'hello'<cr>" }
end,
}

View File

@@ -1,5 +1,5 @@
return {
'mrcjkb/rustaceanvim',
version = '^5', -- Recommended
version = '^6', -- Recommended
lazy = false, -- This plugin is already lazy
}

View File

@@ -2,7 +2,7 @@ return {
'nanozuki/tabby.nvim',
-- event = 'VimEnter', -- if you want lazy load, see below
dependencies = 'nvim-tree/nvim-web-devicons',
config = function()
-- configs...
end,
opts = {
preset = "tab_only"
}
}

View File

@@ -3,7 +3,17 @@ return {
event = "VeryLazy", -- Or `LspAttach`
priority = 1000, -- needs to be loaded in first
config = function()
require('tiny-inline-diagnostic').setup()
require('tiny-inline-diagnostic').setup({
preset = "ghost";
options = {
use_icons_from_diagnostic = true,
multilines = {
enabled = true,
},
show_all_diags_on_cursorline = false,
enable_on_insert = true,
}
})
vim.diagnostic.config({ virtual_text = false }) -- Only if needed in your configuration, if you already have native LSP diagnostics
end
}

View File

@@ -1,34 +0,0 @@
-- Bootstrap lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
{ out, "WarningMsg" },
{ "\nPress any key to exit..." },
}, true, {})
vim.fn.getchar()
os.exit(1)
end
end
vim.opt.rtp:prepend(lazypath)
-- Make sure to setup `mapleader` and `maplocalleader` before
-- loading lazy.nvim so that mappings are correct.
-- This is also a good place to setup other settings (vim.opt)
vim.g.mapleader = " "
vim.g.maplocalleader = "\\"
-- Setup lazy.nvim
require("lazy").setup({
spec = {
-- add your plugins here
},
-- Configure any other settings here. See the documentation for more details.
-- colorscheme that will be used when installing plugins.
-- install = { colorscheme = { "habamax" } },
-- automatically check for plugin updates
checker = { enabled = true },
})

View File

@@ -1,48 +0,0 @@
local on_attach = function(_, bufnr)
local bufmap = function(keys, func)
vim.keymap.set('n', keys, func, { buffer = bufnr })
end
bufmap('<leader>r', vim.lsp.buf.rename)
bufmap('<leader>a', vim.lsp.buf.code_action)
bufmap('gd', vim.lsp.buf.definition)
bufmap('gD', vim.lsp.buf.declaration)
bufmap('gI', vim.lsp.buf.implementation)
bufmap('<leader>D', vim.lsp.buf.type_definition)
bufmap('gr', require('telescope.builtin').lsp_references)
bufmap('<leader>s', require('telescope.builtin').lsp_document_symbols)
bufmap('<leader>S', require('telescope.builtin').lsp_dynamic_workspace_symbols)
bufmap('K', vim.lsp.buf.hover)
vim.api.nvim_buf_create_user_command(bufnr, 'Format', function(_)
vim.lsp.buf.format()
end, {})
end
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
require('neodev').setup()
require('lspconfig').lua_ls.setup {
on_attach = on_attach,
capabilities = capabilities,
root_dir = function()
return vim.loop.cwd()
end,
cmd = { "lua-language-server" },
settings = {
Lua = {
workspace = { checkThirdParty = false },
telemetry = { enable = false },
},
}
}
require('lspconfig').rnix.setup {
on_attach = on_attach,
capabilities = capabilities,
}

View File

@@ -1,5 +0,0 @@
return {
{
'nvim-lualine/lualine.nvim',
dependencies = { 'nvim-tree/nvim-web-devicons' }
}}

View File

@@ -1,7 +0,0 @@
-- Lualine
require("lualine").setup({
icons_enabled = true,
})
-- Comment
require("Comment").setup()

View File

@@ -1,4 +0,0 @@
return {
"nvim-telescope/telescope-file-browser.nvim",
dependencies = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim" }
}

View File

@@ -1,35 +0,0 @@
{ pkgs, config, lib,... }:
{
home.packages = with pkgs; [
];
programs.ranger = {
enable = true;
extraConfig = ''
set preview_images true
set preview_images_method kitty
'';
};
programs.git = {
enable = true;
userName = "Nico";
userEmail = "nicovessen@gmail.com";
extraConfig = {
safe.directory = "/etc/nixos";
};
};
services.kdeconnect = {
enable = true;
indicator = true;
};
programs.ladybird.enable = true;
}

View File

@@ -1,13 +0,0 @@
{ pkgs, config, lib,... }:
{
programs.qutebrowser = {
enable = true;
}
}

View File

@@ -1,18 +0,0 @@
{ pkgs, config, lib,... }:
{
home.packages = with pkgs; [
rofi-screenshot
rofi-power-menu
rofi-bluetooth
bitwarden-menu
];
programs.rofi = {
enable = true;
theme = "/etc/nixos/packages/rofi/themes/catppuccin-mocha";
plugins = [
pkgs.rofi-power-menu
];
};
}

View File

@@ -1,71 +0,0 @@
{ config, pkgs, inputs, ... }:
{
wayland.windowManager.sway = {
enable = true;
config = rec {
modifier = "Mod4";
# Use kitty as default terminal
terminal = "kitty";
bars = [
{command = "waybar";}
];
startup = [
# Launch Firefox on start
{command = "wpaperd";}
{command = "wl-paste --watch cliphist store";}
];
};
extraConfig = ''
## Input configuration
input "type:keyboard" {
xkb_layout de,us
xkb_variant "nodeadkeys"
xkb_options grp:alt_shift_toggle
}
input "type:touchpad" {
tap enabled # enables click-on-tap
tap_button_map lrm # tap with 1 finger = left click, 2 fingers = right click, 3 fingers = middle click
dwt enabled # disable (touchpad) while typing
dwtp disabled # disable (touchpad) while track pointing
}
#touch {
# set along_the_top "20px x 1.0 @ .5 x 0"
# set bottom_half "1.0 x .5 @ 0 x .5"
# set right_half ".5 x 1.0 @ .5 x 0"
# gesture exec 'rofi -show drun'{
# down 1 $along_the_top
# horiz +100px < move
# }
#}
# Brightness
bindsym XF86MonBrightnessDown exec light -U 10
bindsym XF86MonBrightnessUp exec light -A 10
# Volume
bindsym XF86AudioRaiseVolume exec 'pactl set-sink-volume @DEFAULT_SINK@ +1%'
bindsym XF86AudioLowerVolume exec 'pactl set-sink-volume @DEFAULT_SINK@ -1%'
bindsym XF86AudioMute exec 'pactl set-sink-mute @DEFAULT_SINK@ toggle'
# app launcher
bindsym Mod4+m exec 'rofi -show drun'
bindsym Mod4+Shift+x exec 'rofi -show power-menu -modi power-menu:rofi-power-menu'
bindsym Mod4+Print exec 'rofi-screenshot'
bindsym Mod4+Shift+v exec 'cliphist list | rofi -dmenu | cliphist decode | wl-copy'
bindsym Mod4+BackSpace kill
# disable window border
default_border pixel 2
font pango:monospace 0.001
titlebar_padding 1
titlebar_border_thickness 0
'';
};
}

View File

@@ -1,36 +0,0 @@
{ pkgs, config, lib,... }:
{
home.packages = with pkgs; [
];
programs.tmux = {
enable = true;
extraConfig = ''
set-option -sa terminal-overrides ",xterm*:Tc"
set -g @catppuccin_flavor 'mocha'
set -g @catppuccin_window_status_style "rounded"
set -g base-index 1
set -g pane-base-index 1
set-window-option -g pane-base-index 1
set-option -g renumber-windows on
bind '"' split-window -v -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
unbind C-b
set -g prefix C-Space
bind C-Space send-prefix
set -g mouse on
bind -n M-H previous-window
bind -n M-L next-window
'';
plugins = [
pkgs.tmuxPlugins.catppuccin
pkgs.tmuxPlugins.vim-tmux-navigator
];
};
}

View File

@@ -1,56 +0,0 @@
{
"layer": "bottom",
"position": "top",
"height": 35,
"spacing": 0,
"modules-left": ["clock", "sway/workspaces","sway/mode"],
"modules-center": ["sway/window"],
"modules-right": ["network", "battery", "cpu", "memory", "custom/keyboard-layout", "pulseaudio", "tray"],
"custom/keyboard-layout": {
"interval": 1,
"exec": "swaymsg -t get_inputs | jq -r '.[] | select(.type == \"keyboard\") | .xkb_active_layout_name'"
},
"cpu": {
"interval": 5,
"format": "CPU: {usage}% {avg_frequency} GHz"
},
"memory": {
"interval": 5,
"format": "RAM: {used} GiB"
},
"battery": {
"bat": "BAT0",
"states": {
"good": 90,
"warning": 20,
"critical": 7
},
"format": "{icon} {capacity}%",
"format-charging": " {capacity}%",
"format-plugged": " {capacity}%",
"format-alt": "{time} {icon}",
"format-icons": ["", "", "" , "", ""]
},
"pulseaudio": {
"format": "{icon} {volume}%",
"format-muted": " Muted",
"format-icons": ["", "", ""]
},
"clock": {
"format": "{:%d.%m.%Y | %H:%M}"
},
"network": {
"format-wifi": " {essid} {signalStrength}%",
"format-disconnected": " No Connection"
}
}

View File

@@ -1,15 +0,0 @@
{ pkgs, config, lib,... }:
{
home.packages = with pkgs; [
];
home.file =
lib.mkMerge [
{
".config/waybar/config".source = ./config;
".config/waybar/style.css".source = ./style.css;
".config/waybar/mocha.css".source = ./mocha.css;
}
];
}

View File

@@ -1,78 +0,0 @@
@import "mocha.css";
* {
border: none;
border-radius: 0;
font-family: "Fira Code";
font-weight: bold;
font-size: 13px;
min-height: 0;
}
window#waybar {
/* background: rgba(0,130,130,0); */
background: @base;
}
#clock,
#workspaces,
#window,
#cpu,
#memory,
#network,
#pulseaudio,
#battery{
background: rgba(10,10,10,100);
opacity: 0.8;
/* color: #00ffff; */
color: @mauve;
padding: 0px 10px ;
margin: 3px 0px;
}
#workspaces button{
color: @mauve;
border-radius: 7px;
margin: 3px 0px;
margin-left: 6px;
}
#workspaces button.focused{
background: @mauve;
color: @base;
opacity: 0.8;
transition: 0.3s;
}
#workspaces button:hover{
background: @mauve;
color: @base;
opacity: 0.8;
transition: 0.5s;
}
#window{
border-radius: 10px;
}
#waybar.empty #window {
background: none;
}
#network{
border-radius: 10px 0px 0px 10px;
}
#pulseaudio{
border-radius: 0px 10px 10px 0px;
margin-right: 5px
}
#workspaces{
border-radius: 0px 10px 10px 0px;
}
#clock{
border-radius: 10px 0px 0px 10px;
margin-left: 5px
}