cleanup, neovim optimizations and updates ig

This commit is contained in:
Nico
2025-05-29 14:50:58 +02:00
parent 6c601333a0
commit f85d945337
43 changed files with 1186 additions and 275 deletions

View File

@@ -1,44 +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;
};
};
androidComposition = pkgs.androidenv.composeAndroidPackages {
buildToolsVersions = [ "28.0.3" "33.0.1" ];
platformVersions = [ "33" "34" "28" ];
abiVersions = [ "armeabi-v7a" "arm64-v8a" ];
};
androidSdk = androidComposition.androidsdk;
in
{
devShell =
with pkgs; mkShell rec {
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 = [
flutter324
androidSdk
jdk17
];
shellHook = ''
zsh
exit
'';
};
});
}

View File

@@ -30,10 +30,10 @@ boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
# fileSystems."mnt/win" = { fileSystems."mnt/win" = {
# device = "/dev/sdb1"; device = "/dev/sdb1";
# fsType = "ntfs"; fsType = "ntfs";
# }; };
# Flakes # Flakes
nix.settings.experimental-features = [ "nix-command" "flakes" ]; nix.settings.experimental-features = [ "nix-command" "flakes" ];
@@ -50,11 +50,11 @@ boot.loader.efi.canTouchEfiVariables = true;
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
# VM # VM
# virtualisation.virtualbox.host.enable = true; virtualisation.virtualbox.host.enable = true;
# virtualisation.virtualbox.host.enableExtensionPack = true; virtualisation.virtualbox.host.enableExtensionPack = true;
# virtualisation.virtualbox.host.enableKvm = true; virtualisation.virtualbox.host.enableKvm = true;
# virtualisation.virtualbox.host.addNetworkInterface = false; virtualisation.virtualbox.host.addNetworkInterface = false;
# users.extraGroups.vboxusers.members = [ "nico" ]; users.extraGroups.vboxusers.members = [ "nico" ];
# virtualisation.virtualbox.guest.enable = true; # virtualisation.virtualbox.guest.enable = true;
# virtualisation.virtualbox.guest.dragAndDrop = true; # virtualisation.virtualbox.guest.dragAndDrop = true;
# virtualisation.docker.enable = true; # virtualisation.docker.enable = true;
@@ -105,6 +105,7 @@ boot.loader.efi.canTouchEfiVariables = true;
# Enable touchpad support (enabled default in most desktopManager). services.xserver.libinput.enable # Enable touchpad support (enabled default in most desktopManager). services.xserver.libinput.enable
# = true; # = true;
services.mullvad-vpn.enable = true; services.mullvad-vpn.enable = true;
services.mullvad-vpn.package = pkgs.mullvad-vpn;
# Define a user account. Don't forget to set a password with passwd. # Define a user account. Don't forget to set a password with passwd.
users.users.nico = { isNormalUser = true; description = "nico"; extraGroups = [ "networkmanager" users.users.nico = { isNormalUser = true; description = "nico"; extraGroups = [ "networkmanager"
"wheel" "adbusers" "docker"]; packages = with pkgs; [ "wheel" "adbusers" "docker"]; packages = with pkgs; [
@@ -118,9 +119,15 @@ services.mullvad-vpn.enable = true;
# Allow unfree packages # Allow unfree packages
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
# services.flatpak.enable = true;
# List packages installed in system profile. To search, run: $ nix search wget # List packages installed in system profile. To search, run: $ nix search wget
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed grayjay
discord
lutris
qbittorrent
vim
wget wget
git git
kitty kitty
@@ -132,6 +139,7 @@ services.mullvad-vpn.enable = true;
spotify spotify
#spicetify-cli #spicetify-cli
sshfs sshfs
anydesk
# sway # sway
networkmanager networkmanager

48
flake.lock generated
View File

@@ -6,11 +6,11 @@
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1738087375, "lastModified": 1744557573,
"narHash": "sha256-GLyNtU9A2VN22jNRHZ2OXuFfTJLh8uEVVt+ftsKUX0c=", "narHash": "sha256-XAyj0iDuI51BytJ1PwN53uLpzTDdznPDQFG4RwihlTQ=",
"owner": "Aylur", "owner": "Aylur",
"repo": "ags", "repo": "ags",
"rev": "a6a7a0adb17740f4c34a59902701870d46fbb6a4", "rev": "3ed9737bdbc8fc7a7c7ceef2165c9109f336bff6",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -27,11 +27,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1737670815, "lastModified": 1742571008,
"narHash": "sha256-ZCxxshGN7XooabArcoGkYSNx5yVunqjKJi2aTv6cznI=", "narHash": "sha256-5WgfJAeBpxiKbTR/gJvxrGYfqQRge5aUDcGKmU1YZ1Q=",
"owner": "aylur", "owner": "aylur",
"repo": "astal", "repo": "astal",
"rev": "127e9cdcbf173846a3c40ddc0abfbb038df48042", "rev": "dc0e5d37abe9424c53dcbd2506a4886ffee6296e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -48,11 +48,11 @@
}, },
"locked": { "locked": {
"dir": "pkgs/firefox-addons", "dir": "pkgs/firefox-addons",
"lastModified": 1745752599, "lastModified": 1748491405,
"narHash": "sha256-vX5uq4wv7FeNeeFtsTPXQ9n2hd92NFXI+u9sg1K8OhA=", "narHash": "sha256-kjHOCsU66vlEv0NIyrMYmg9DvUiLsEGkhxtPiYIdx5g=",
"owner": "rycee", "owner": "rycee",
"repo": "nur-expressions", "repo": "nur-expressions",
"rev": "0388c30f59e860307b2ef0ba93f38d2e525a153e", "rev": "42b96163341bdb7934cf880307f166f0238038ab",
"type": "gitlab" "type": "gitlab"
}, },
"original": { "original": {
@@ -69,11 +69,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1744038920, "lastModified": 1748489961,
"narHash": "sha256-9a4V1wQXS8hXZtc7mRtz0qINkGW+C99aDrmXY6oYBFg=", "narHash": "sha256-uGnudxMoQi2c8rpPoHXuQSm80NBqlOiNF4xdT3hhzLM=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "a4d8020820a85b47f842eae76ad083b0ec2a886a", "rev": "95c988cf08e9a5a8fe7cc275d5e3f24e9e87bd51",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -84,11 +84,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1737469691, "lastModified": 1743583204,
"narHash": "sha256-nmKOgAU48S41dTPIXAq0AHZSehWUn6ZPrUKijHAMmIk=", "narHash": "sha256-F7n4+KOIfWrwoQjXrL2wD9RhFYLs2/GGe/MQY1sSdlE=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "9e4d5190a9482a1fb9d18adf0bdb83c6e506eaab", "rev": "2c8d3f48d33929642c1c12cd243df4cc7d2ce434",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -100,11 +100,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1743827369, "lastModified": 1748370509,
"narHash": "sha256-rpqepOZ8Eo1zg+KJeWoq1HAOgoMCDloqv5r2EAa9TSA=", "narHash": "sha256-QlL8slIgc16W5UaI3w7xHQEP+Qmv/6vSNTpoZrrSlbk=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "42a1c966be226125b48c384171c44c651c236c22", "rev": "4faa5f5321320e49a78ae7848582f684d64783e9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -116,11 +116,11 @@
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1743827369, "lastModified": 1748026106,
"narHash": "sha256-rpqepOZ8Eo1zg+KJeWoq1HAOgoMCDloqv5r2EAa9TSA=", "narHash": "sha256-6m1Y3/4pVw1RWTsrkAK2VMYSzG4MMIj7sqUy7o8th1o=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "42a1c966be226125b48c384171c44c651c236c22", "rev": "063f43f2dbdef86376cc29ad646c45c46e93234c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -145,11 +145,11 @@
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1743946771, "lastModified": 1748147548,
"narHash": "sha256-n/LxWCGJtDi/rWMKEXWQn39v46iFZpW+V9mY4/4LJQs=", "narHash": "sha256-9IaAQkgyF4PFtVyui8vF6oJah0iVcO9DaOefjdTMthE=",
"owner": "Gerg-L", "owner": "Gerg-L",
"repo": "spicetify-nix", "repo": "spicetify-nix",
"rev": "af24d96983faa41e79fa00312106c37a7cc2ca0a", "rev": "f0595e3b59260457042450749eaec00a5a47db35",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -37,6 +37,9 @@
hidePodcasts hidePodcasts
fullScreen fullScreen
]; ];
enabledCustomApps = with spicePkgs.apps; [
lyricsPlus
];
}; };
home.stateVersion = "24.05"; home.stateVersion = "24.05";

View File

@@ -10,9 +10,10 @@
./wpaperd ./wpaperd
./nvim ./nvim
./emacs ./emacs
./kitty ./terminal
./rofi ./rofi
./hyprland ./hyprland
./tmux
# ./vscode # ./vscode
]; ];
} }

View File

@@ -1,7 +1,7 @@
$mainMod = SUPER $mainMod = SUPER
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = $mainMod, RETURN, exec, kitty bind = $mainMod, RETURN, exec, ghostty
bind = $mainMod, B, exec, floorp bind = $mainMod, B, exec, floorp
bind = SUPER, BackSpace, killactive, bind = SUPER, BackSpace, killactive,
bind = SUPER_SHIFT, P, exec, rofi -show power-menu -modi power-menu:rofi-power-menu bind = SUPER_SHIFT, P, exec, rofi -show power-menu -modi power-menu:rofi-power-menu

View File

@@ -8,6 +8,9 @@
lldb lldb
lazygit lazygit
gcc gcc
gopls
stylua
rustfmt
]; ];
programs.neovim = { programs.neovim = {
@@ -30,7 +33,7 @@ programs.neovim.plugins = [
".config/nvim/lua/plugins/blink-cmp.lua".source = ./lua/plugins/blink-cmp.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/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/treesitter.lua".source = ./lua/plugins/treesitter.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/catppuccin.lua".source = ./lua/plugins/catppuccin.lua;
".config/nvim/lua/plugins/telescope.lua".source = ./lua/plugins/telescope.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; ".config/nvim/lua/plugins/highlight-colors.lua".source = ./lua/plugins/highlight-colors.lua;
@@ -53,6 +56,7 @@ programs.neovim.plugins = [
".config/nvim/lua/plugins/vim-suda.lua".source = ./lua/plugins/vim-suda.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/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/conform.lua".source = ./lua/plugins/conform.lua;
".config/nvim/lua/plugins/go.lua".source = ./lua/plugins/go.lua;
} }
]; ];

View File

@@ -1,42 +1,43 @@
-- Tab -- Tab
vim.opt.tabstop = 2 -- number of visual spaces per TAB vim.opt.tabstop = 2 -- number of visual spaces per TAB
vim.opt.softtabstop = 2 -- number of spacesin tab when editing vim.opt.softtabstop = 2 -- number of spacesin tab when editing
vim.opt.shiftwidth = 2 -- insert 4 spaces on a tab vim.opt.shiftwidth = 2 -- insert 4 spaces on a tab
vim.opt.expandtab = true -- tabs are spaces, mainly because of python vim.opt.expandtab = true -- tabs are spaces, mainly because of python
-- UI config -- UI config
vim.opt.number = true -- show absolute number vim.opt.number = true -- show absolute number
vim.opt.relativenumber = true -- add numbers to each line on the left side vim.opt.relativenumber = true -- add numbers to each line on the left side
vim.opt.splitbelow = true -- open new vertical split bottom vim.opt.splitbelow = true -- open new vertical split bottom
vim.opt.splitright = true -- open new horizontal splits right vim.opt.splitright = true -- open new horizontal splits right
-- vim.opt.termguicolors = true -- enabl 24-bit RGB color in the TUI -- 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 -- Searching
vim.opt.incsearch = true -- search as characters are entered vim.opt.incsearch = true -- search as characters are entered
vim.opt.hlsearch = false -- do not highlight matches vim.opt.hlsearch = false -- do not highlight matches
vim.opt.ignorecase = true -- ignore case in searches by default 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.smartcase = true -- but make it case sensitive if an uppercase is entered
vim.cmd("set nowrap") vim.cmd("set nowrap")
-- -- Keybinds -- -- Keybinds
vim.keymap.set('n', '<C-h>', '<C-w>h', 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-j>", "<C-w>j", opts)
vim.keymap.set('n', '<C-k>', '<C-w>k', 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-l>", "<C-w>l", opts)
-- Resize with arrows -- Resize with arrows
-- delta: 2 lines -- delta: 2 lines
vim.keymap.set('n', '<C-Up>', ':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-Down>", ":resize +2<CR>", opts)
vim.keymap.set('n', '<C-Left>', ':vertical 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-Right>", ":vertical resize +2<CR>", opts)
vim.keymap.set('i', 'jk', '<Esc>', opts) vim.keymap.set("i", "jk", "<Esc>", opts)
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts) vim.keymap.set("n", "gd", vim.lsp.buf.definition, bufopts)
-- jump to definition -- 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 -- code actions
vim.keymap.set("n", "<leader>ca", function() vim.keymap.set("n", "<leader>ca", function()
@@ -47,199 +48,107 @@ end, { noremap = true, silent = true })
require("config.lazy") require("config.lazy")
-- require("flutter-tools").setup {} -- use defaults -- require("flutter-tools").setup {} -- use defaults
require("catppuccin").setup({ require("catppuccin").setup({})
integrations = { vim.cmd.colorscheme("catppuccin")
cmp = false,
gitsigns = true,
nvimtree = true,
treesitter = true,
notify = false,
mini = {
enabled = false,
indentscope_color = "",
},
}
})
-- css colors -- css colors
vim.opt.termguicolors = true vim.opt.termguicolors = true
require('nvim-highlight-colors').setup({}) require("nvim-highlight-colors").setup({})
vim.cmd.colorscheme "catppuccin"
-- Plugin setups -- Plugin setups
require('lualine').setup() require("lualine").setup()
require("dapui").setup() require("dapui").setup()
require("ibl").setup() require("ibl").setup()
require("telescope").load_extension("flutter") require("telescope").load_extension("flutter")
require("toggleterm").setup{} require("toggleterm").setup({})
require("tabby").setup{}
require("mini.animate").setup() require("mini.animate").setup()
vim.o.showtabline = 2
require("tiny-inline-diagnostic").setup({ require("tabby").setup({
preset = "ghost"; preset = "tab_only"
options = {
use_icons_from_diagnostic = true,
multilines = {
enabled = true,
},
show_all_diags_on_cursorline = false,
enable_on_insert = true,
}
}) })
require("tiny-inline-diagnostic").setup({})
-- conform (code formatter) -- conform (code formatter)
require("conform").setup({ require("conform").setup({})
formatters_by_ft = {
dart = { "dart_format" },
},
})
-- flutter -- flutter
require("flutter-tools").setup { 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.
}
}
}
-- GO
require("go").setup()
------------- -- Debugger ------------- -- Debugger
local dap, dapui = require("dap"), require("dapui") local dap, dapui = require("dap"), require("dapui")
dap.listeners.before.attach.dapui_config = function() dap.listeners.before.attach.dapui_config = function()
dapui.open() dapui.open()
end end
dap.listeners.before.launch.dapui_config = function() dap.listeners.before.launch.dapui_config = function()
dapui.open() dapui.open()
end end
dap.listeners.before.event_terminated.dapui_config = function() dap.listeners.before.event_terminated.dapui_config = function()
dapui.close() dapui.close()
end end
dap.listeners.before.event_exited.dapui_config = function() dap.listeners.before.event_exited.dapui_config = function()
dapui.close() dapui.close()
end end
-- c und rust -- c und rust
dap.adapters.lldb = { -- dap.adapters.lldb = {
type = 'executable', -- type = 'executable',
command = 'lldb', -- adjust as needed, must be absolute path -- command = 'lldb', -- adjust as needed, must be absolute path
name = 'lldb' -- 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.cpp = dap.configurations.gdb
dap.configurations.rust = dap.configurations.cpp dap.configurations.rust = dap.configurations.gdb
-------------------------------------------- --------------------------------------------
local builtin = require('telescope.builtin') local builtin = require("telescope.builtin")
local conform = require('conform') 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 -- Telescope binds
vim.keymap.set('n', '<leader>ff', builtin.find_files, { desc = 'Telescope find files' }) 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>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>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>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>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 -- Dap binds
vim.keymap.set('n', '<leader>do', dapui.open, { desc = "Open debug overlay" }) 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", "<leader>dc", dapui.close, { desc = "Close debug overlay" })
vim.keymap.set('n', '<F5>', dap.toggle_breakpoint, { desc = "Toggle breakpoint" }) 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", "<F6>", dap.continue, { desc = "dap Continue" })
vim.keymap.set('n', '<F7>', dap.step_over, { desc = "dap step over" }) 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", "<F8>", dap.step_into, { desc = "dap step into" })
-- sudawrite -- sudawrite
vim.keymap.set('n', '<leader>sw', ":SudaWrite<CR>", { desc = "Write as sudo" }) vim.keymap.set("n", "<leader>sw", ":SudaWrite<CR>", { desc = "Write as sudo" })
-- conform -- conform
vim.keymap.set('n', '<leader>cf', conform.format, { desc = "format code" }) vim.keymap.set("n", "<leader>cf", conform.format, { desc = "format code" })
-- toggleterm binds -- toggleterm binds
vim.keymap.set('n', '<leader>tf', ':ToggleTerm direction=float <CR>', { desc = "Open floating 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>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>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>ts", ":ToggleTerm direction=vertical <CR>", { desc = "select open terminal" })
-- code actions -- code actions
vim.keymap.set("n", "<leader>ca", function() vim.keymap.set("n", "<leader>ca", function()
require("tiny-code-action").code_action() require("tiny-code-action").code_action()
end, { desc = "Show code actions", noremap = true, silent = true }) 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})

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

@@ -1,4 +1,11 @@
return { return {
'stevearc/conform.nvim', 'stevearc/conform.nvim',
opts = {}, 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

@@ -1,5 +1,4 @@
return { return {
'nvim-flutter/flutter-tools.nvim', 'nvim-flutter/flutter-tools.nvim',
lazy = false, lazy = false,
dependencies = { dependencies = {
@@ -7,4 +6,90 @@ return {
'stevearc/dressing.nvim', -- optional for vim.ui.select 'stevearc/dressing.nvim', -- optional for vim.ui.select
}, },
config = true, 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 = true, -- 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 = { servers = {
lua_ls = {}, lua_ls = {},
nil_ls = {}, nil_ls = {},
rust_analyzer = {} -- rust_analyzer = {},
gopls = {},
} }
}, },
config = function(_, opts) config = function(_, opts)

View File

@@ -0,0 +1,48 @@
---@module "neominimap.config.meta"
return {
"Isrothy/neominimap.nvim",
version = "v3.x.x",
lazy = false, -- NOTE: NO NEED to Lazy load
-- Optional. You can alse set your own keybindings
keys = {
-- Global Minimap Controls
{ "<leader>nm", "<cmd>Neominimap Toggle<cr>", desc = "Toggle global minimap" },
{ "<leader>no", "<cmd>Neominimap Enable<cr>", desc = "Enable global minimap" },
{ "<leader>nc", "<cmd>Neominimap Disable<cr>", desc = "Disable global minimap" },
{ "<leader>nr", "<cmd>Neominimap Refresh<cr>", desc = "Refresh global minimap" },
-- Window-Specific Minimap Controls
{ "<leader>nwt", "<cmd>Neominimap WinToggle<cr>", desc = "Toggle minimap for current window" },
{ "<leader>nwr", "<cmd>Neominimap WinRefresh<cr>", desc = "Refresh minimap for current window" },
{ "<leader>nwo", "<cmd>Neominimap WinEnable<cr>", desc = "Enable minimap for current window" },
{ "<leader>nwc", "<cmd>Neominimap WinDisable<cr>", desc = "Disable minimap for current window" },
-- Tab-Specific Minimap Controls
{ "<leader>ntt", "<cmd>Neominimap TabToggle<cr>", desc = "Toggle minimap for current tab" },
{ "<leader>ntr", "<cmd>Neominimap TabRefresh<cr>", desc = "Refresh minimap for current tab" },
{ "<leader>nto", "<cmd>Neominimap TabEnable<cr>", desc = "Enable minimap for current tab" },
{ "<leader>ntc", "<cmd>Neominimap TabDisable<cr>", desc = "Disable minimap for current tab" },
-- Buffer-Specific Minimap Controls
{ "<leader>nbt", "<cmd>Neominimap BufToggle<cr>", desc = "Toggle minimap for current buffer" },
{ "<leader>nbr", "<cmd>Neominimap BufRefresh<cr>", desc = "Refresh minimap for current buffer" },
{ "<leader>nbo", "<cmd>Neominimap BufEnable<cr>", desc = "Enable minimap for current buffer" },
{ "<leader>nbc", "<cmd>Neominimap BufDisable<cr>", desc = "Disable minimap for current buffer" },
---Focus Controls
{ "<leader>nf", "<cmd>Neominimap Focus<cr>", desc = "Focus on minimap" },
{ "<leader>nu", "<cmd>Neominimap Unfocus<cr>", desc = "Unfocus minimap" },
{ "<leader>ns", "<cmd>Neominimap ToggleFocus<cr>", desc = "Switch focus on minimap" },
},
init = function()
-- The following options are recommended when layout == "float"
vim.opt.wrap = false
vim.opt.sidescrolloff = 36 -- Set a large value
--- Put your configuration here
---@type Neominimap.UserConfig
vim.g.neominimap = {
auto_enable = true,
}
end,
}

View File

@@ -0,0 +1 @@
return { "nvim-neotest/nvim-nio" }

View File

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

View File

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

View File

@@ -3,7 +3,17 @@ return {
event = "VeryLazy", -- Or `LspAttach` event = "VeryLazy", -- Or `LspAttach`
priority = 1000, -- needs to be loaded in first priority = 1000, -- needs to be loaded in first
config = function() 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 vim.diagnostic.config({ virtual_text = false }) -- Only if needed in your configuration, if you already have native LSP diagnostics
end end
} }

View File

@@ -0,0 +1,7 @@
return {
'windwp/nvim-autopairs',
event = "InsertEnter",
config = true
-- use opts = {} for passing setup options
-- this is equivalent to setup({}) function
}

View File

@@ -0,0 +1,7 @@
return {
"lukas-reineke/indent-blankline.nvim",
main = "ibl",
---@module "ibl"
---@type ibl.config
opts = {},
}

View File

@@ -0,0 +1,46 @@
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.*',
opts = {
-- 'default' (recommended) for mappings similar to built-in completions (C-y to accept)
-- 'super-tab' for mappings similar to vscode (tab to accept)
-- 'enter' for enter to accept
-- 'none' for no mappings
--
-- All presets have the following mappings:
-- C-space: Open menu or open docs if already open
-- C-n/C-p or Up/Down: Select next/previous item
-- C-e: Hide menu
-- C-k: Toggle signature help (if signature.enabled = true)
--
-- See :h blink-cmp-config-keymap for defining your own keymap
keymap = { preset = 'enter' },
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" }
}

View File

@@ -0,0 +1,11 @@
return {
"rachartier/tiny-code-action.nvim",
dependencies = {
{"nvim-lua/plenary.nvim"},
{"nvim-telescope/telescope.nvim"},
},
event = "LspAttach",
config = function()
require('tiny-code-action').setup()
end
}

View File

@@ -0,0 +1,8 @@
-- add this to your lua/plugins.lua, lua/plugins/init.lua, or the file you keep your other plugins:
return {
'numToStr/Comment.nvim',
opts = {
-- add any options here
}
}

View File

@@ -0,0 +1 @@
return { "rcarriga/nvim-dap-ui", dependencies = {"mfussenegger/nvim-dap", "nvim-neotest/nvim-nio"} }

View File

@@ -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 = {
{ "<leader>lg", "<cmd>LazyGit<cr>", desc = "LazyGit" }
}
}

View File

@@ -0,0 +1,11 @@
-- using lazy.nvim
return {
"S1M0N38/love2d.nvim",
cmd = "LoveRun",
opts = { },
keys = {
{ "<leader>v", ft = "lua", desc = "LÖVE" },
{ "<leader>vv", "<cmd>LoveRun<cr>", ft = "lua", desc = "Run LÖVE" },
{ "<leader>vs", "<cmd>LoveStop<cr>", ft = "lua", desc = "Stop LÖVE" },
},
}

View File

@@ -0,0 +1 @@
return { 'echasnovski/mini.animate', version = '*' }

View File

@@ -0,0 +1 @@
return { "nvim-neotest/nvim-nio" }

View File

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

View File

@@ -0,0 +1,8 @@
return {
'nanozuki/tabby.nvim',
-- event = 'VimEnter', -- if you want lazy load, see below
dependencies = 'nvim-tree/nvim-web-devicons',
config = function()
-- configs...
end,
}

View File

@@ -0,0 +1,45 @@
-- Lua
return {
{
'abecodes/tabout.nvim',
lazy = false,
config = function()
require('tabout').setup {
tabkey = '<Tab>', -- key to trigger tabout, set to an empty string to disable
backwards_tabkey = '<S-Tab>', -- 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 <S-Tab>)
default_tab = '<C-t>', -- shift default action (only at the beginning of a line, otherwise <TAB> is used)
default_shift_tab = '<C-d>', -- 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,
},
}

View File

@@ -0,0 +1,6 @@
return {
-- amongst your other plugins
{'akinsho/toggleterm.nvim', version = "*", config = true}
-- or
{'akinsho/toggleterm.nvim', version = "*", opts = {--[[ things you want to change go here]]}}
}

View File

@@ -0,0 +1,37 @@
return {
"folke/trouble.nvim",
opts = {}, -- for default options, refer to the configuration section for custom setup.
cmd = "Trouble",
keys = {
{
"<leader>xx",
"<cmd>Trouble diagnostics toggle<cr>",
desc = "Diagnostics (Trouble)",
},
{
"<leader>xX",
"<cmd>Trouble diagnostics toggle filter.buf=0<cr>",
desc = "Buffer Diagnostics (Trouble)",
},
{
"<leader>cs",
"<cmd>Trouble symbols toggle focus=false<cr>",
desc = "Symbols (Trouble)",
},
{
"<leader>cl",
"<cmd>Trouble lsp toggle focus=false win.position=right<cr>",
desc = "LSP Definitions / references / ... (Trouble)",
},
{
"<leader>xL",
"<cmd>Trouble loclist toggle<cr>",
desc = "Location List (Trouble)",
},
{
"<leader>xQ",
"<cmd>Trouble qflist toggle<cr>",
desc = "Quickfix List (Trouble)",
},
},
}

View File

@@ -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 = {
{
"<leader>?",
function()
require("which-key").show({ global = false })
end,
desc = "Buffer Local Keymaps (which-key)",
},
},
}

View File

@@ -0,0 +1,78 @@
colors:
primary:
background: "#1E1E2E" # base
foreground: "#CDD6F4" # text
# Bright and dim foreground colors
dim_foreground: "#CDD6F4" # text
bright_foreground: "#CDD6F4" # text
# Cursor colors
cursor:
text: "#1E1E2E" # base
cursor: "#F5E0DC" # rosewater
vi_mode_cursor:
text: "#1E1E2E" # base
cursor: "#B4BEFE" # lavender
# Search colors
search:
matches:
foreground: "#1E1E2E" # base
background: "#A6ADC8" # subtext0
focused_match:
foreground: "#1E1E2E" # base
background: "#A6E3A1" # green
footer_bar:
foreground: "#1E1E2E" # base
background: "#A6ADC8" # subtext0
# Keyboard regex hints
hints:
start:
foreground: "#1E1E2E" # base
background: "#F9E2AF" # yellow
end:
foreground: "#1E1E2E" # base
background: "#A6ADC8" # subtext0
# Selection colors
selection:
text: "#1E1E2E" # base
background: "#F5E0DC" # rosewater
# Normal colors
normal:
black: "#45475A" # surface1
red: "#F38BA8" # red
green: "#A6E3A1" # green
yellow: "#F9E2AF" # yellow
blue: "#89B4FA" # blue
magenta: "#F5C2E7" # pink
cyan: "#94E2D5" # teal
white: "#BAC2DE" # subtext1
# Bright colors
bright:
black: "#585B70" # surface2
red: "#F38BA8" # red
green: "#A6E3A1" # green
yellow: "#F9E2AF" # yellow
blue: "#89B4FA" # blue
magenta: "#F5C2E7" # pink
cyan: "#94E2D5" # teal
white: "#A6ADC8" # subtext0
# Dim colors
dim:
black: "#45475A" # surface1
red: "#F38BA8" # red
green: "#A6E3A1" # green
yellow: "#F9E2AF" # yellow
blue: "#89B4FA" # blue
magenta: "#F5C2E7" # pink
cyan: "#94E2D5" # teal
white: "#BAC2DE" # subtext1
indexed_colors:
- { index: 16, color: "#FAB387" }
- { index: 17, color: "#F5E0DC" }

View File

@@ -0,0 +1,166 @@
{ pkgs, config, lib,... }:
{
home.packages = with pkgs; [
];
programs.nushell = {
enable = false;
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.carapace = {
enable = false;
enableNushellIntegration = true;
};
programs.thefuck.enable = true;
programs.starship.enable = true;
programs.zsh = {
enable = true;
enableCompletion = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
shellAliases = {
update = "sudo nixos-rebuild switch";
emacs = "emacs -nw";
femacs = "emacs -nw --load /home/n/Documents/Shells/flutter/init.el";
pemacs = "emacs -nw --load /home/n/Documents/Shells//python/init.el";
};
initContent = ''
eval "$(starship init zsh)"
'';
zplug = {
enable = false;
plugins = [
{ name = "zsh-users/zsh-autosuggestions"; } # Simple plugin installation
];
};
oh-my-zsh = {
enable = true;
plugins = [ "thefuck" ];
# theme = "";
};
};
programs.ghostty = {
enable = true;
};
home.file."/home/nico/.config/ghostty/config" = {
source = ./ghostty-config;
};
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

@@ -0,0 +1,22 @@
palette = 0=#45475a
palette = 1=#f38ba8
palette = 2=#a6e3a1
palette = 3=#f9e2af
palette = 4=#89b4fa
palette = 5=#f5c2e7
palette = 6=#94e2d5
palette = 7=#bac2de
palette = 8=#585b70
palette = 9=#f38ba8
palette = 10=#a6e3a1
palette = 11=#f9e2af
palette = 12=#89b4fa
palette = 13=#f5c2e7
palette = 14=#94e2d5
palette = 15=#a6adc8
background = 1e1e2e
foreground = cdd6f4
cursor-color = f5e0dc
cursor-text = 1e1e2e
selection-background = 353749
selection-foreground = cdd6f4

View File

@@ -0,0 +1,80 @@
# 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!
# 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

@@ -5,10 +5,18 @@
programs.tmux = { programs.tmux = {
enable = true; enable = true;
terminal = "tmux-256color";
disableConfirmationPrompt = true;
extraConfig = '' extraConfig = ''
set-option -sa terminal-overrides ",xterm*:Tc" # set-option -sa terminal-overrides ",xterm*:Tc"
set -g @catppuccin_flavor 'mocha' # set -g @catppuccin_flavor 'mocha'
set -g @catppuccin_window_status_style "rounded" # set -g @catppuccin_window_status_style "rounded"
# set -g default-terminal "xterm-256color"
# set -ga terminal-overrides ",*256col*:Tc"
# set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q'
# set-environment -g COLORTERM "truecolor"
#
# run-shell ${pkgs.tmuxPlugins.catppuccin}/share/tmux-plugins/catppuccin/catppuccin.tmux
set -g base-index 1 set -g base-index 1
set -g pane-base-index 1 set -g pane-base-index 1
@@ -18,17 +26,51 @@ set-option -g renumber-windows on
bind '"' split-window -v -c "#{pane_current_path}" bind '"' split-window -v -c "#{pane_current_path}"
bind % split-window -h -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 set -g mouse on
bind -n M-H previous-window bind -n M-H previous-window
bind -n M-L next-window bind -n M-L next-window
# Smart pane switching with awareness of Vim splits.
# See: https://github.com/christoomey/vim-tmux-navigator
# decide whether we're in a Vim process
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
bind-key -n 'C-h' if-shell "$is_vim" 'send-keys C-h' 'select-pane -L'
bind-key -n 'C-j' if-shell "$is_vim" 'send-keys C-j' 'select-pane -D'
bind-key -n 'C-k' if-shell "$is_vim" 'send-keys C-k' 'select-pane -U'
bind-key -n 'C-l' if-shell "$is_vim" 'send-keys C-l' 'select-pane -R'
tmux_version='$(tmux -V | sed -En "s/^tmux ([0-9]+(.[0-9]+)?).*/\1/p")'
if-shell -b '[ "$(echo "$tmux_version < 3.0" | bc)" = 1 ]' \
"bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\' 'select-pane -l'"
if-shell -b '[ "$(echo "$tmux_version >= 3.0" | bc)" = 1 ]' \
"bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\\\' 'select-pane -l'"
bind-key -n 'C-Space' if-shell "$is_vim" 'send-keys C-Space' 'select-pane -t:.+'
bind-key -T copy-mode-vi 'C-h' select-pane -L
bind-key -T copy-mode-vi 'C-j' select-pane -D
bind-key -T copy-mode-vi 'C-k' select-pane -U
bind-key -T copy-mode-vi 'C-l' select-pane -R
bind-key -T copy-mode-vi 'C-\' select-pane -l
bind-key -T copy-mode-vi 'C-Space' select-pane -t:.+
''; '';
plugins = [ plugins = with pkgs.tmuxPlugins; [
pkgs.tmuxPlugins.catppuccin catppuccin {
plugin = catppuccin;
extraConfig = ''
set -g @plugin 'catppuccin/tmux#2.1.3'
set -g @catppuccin_window_status_style "rounded"
set -g @catppuccin_flavor 'mocha'
'';
}
# pkgs.tmuxPlugins.vim-tmux-navigator # pkgs.tmuxPlugins.vim-tmux-navigator
]; ];
}; };

101
shells/flutter/flake.nix Normal file
View File

@@ -0,0 +1,101 @@
{
inputs = {
nixpkgs.url = "nixpkgs/nixpkgs-unstable";
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
android-nixpkgs.url = "github:tadfisher/android-nixpkgs";
};
outputs = {
self,
nixpkgs,
flake-parts,
...
} @ inputs:
flake-parts.lib.mkFlake {inherit inputs;} {
systems = ["x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"];
perSystem = {
pkgs,
system,
lib,
...
}: {
devShells.default = let
pkgs = import nixpkgs {
inherit system;
config = {
allowUnfree = true;
android_sdk.accept_license = true;
};
overlays = [];
};
android-nixpkgs = pkgs.callPackage inputs.android-nixpkgs {};
androidSdk = android-nixpkgs.sdk (sdkPkgs:
with sdkPkgs; [
cmdline-tools-latest
build-tools-34-0-0
build-tools-30-0-3
platform-tools
platforms-android-35
platforms-android-34
platforms-android-33
platforms-android-31
platforms-android-30
ndk-26-3-11579264
cmake-3-22-1
]);
PWD = builtins.getEnv "PWD";
patchedFlutter = pkgs.flutter.override (prev: rec {
flutter = prev.flutter.overrideAttrs (prevAttrs: {
patches = prevAttrs.patches ++ [
# This patch is needed to avoid the Kotlin Gradle plugin writing to the store.
(pkgs.writeText "kotlin-fix.patch" ''
--- a/packages/flutter_tools/gradle/build.gradle.kts
+++ b/packages/flutter_tools/gradle/build.gradle.kts
@@ -4,6 +4,8 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
+gradle.startParameter.projectCacheDir = layout.buildDirectory.dir("cache").get().asFile
+
plugins {
`java-gradle-plugin`
groovy
'')
];
passthru = prevAttrs.passthru // {
sdk = flutter;
};
# postInstall = (prevAttrs.postInstall or "") + ''
# mkdir -p $out/bin/cache
# touch $out/bin/cache/engine.realm
# '';
});
});
in
pkgs.mkShell {
ANDROID_SDK_ROOT = "${androidSdk}/libexec/android-sdk";
ANDROID_NDK_ROOT = "${androidSdk}/libexec/android-sdk/ndk-bundle";
ANDROID_AVD_HOME = "${PWD}/.android/avd";
ANDROID_HOME = "${androidSdk}/libexec/android-sdk";
FLUTTER_SDK = "${patchedFlutter}";
GRADLE_OPTS = "-Dorg.gradle.project.android.aapt2FromMavenOverride=${androidSdk}/share/android-sdk/build-tools/34.0.0/aapt2";
buildInputs = with pkgs; [
patchedFlutter
jdk17
androidSdk
clang
dart
cmake
android-tools
];
};
# formatter = pkgs.alejandra;
};
};
}

32
shells/go/flake.nix Normal file
View File

@@ -0,0 +1,32 @@
{
description = "GO";
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;
};
in
{
devShell =
with pkgs; mkShell rec {
# ANDROID_SDK_ROOT = "${androidSdk}/libexec/android-sdk";
GOPATH="${go}";
buildInputs = [
go
];
shellHook = ''
zsh
exit
'';
};
});
}

73
shells/rust/flake.nix Normal file
View File

@@ -0,0 +1,73 @@
{
description = "Rust development environment";
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 = nixpkgs.legacyPackages.${system};
# Read the file relative to the flake's root
# overrides = (builtins.fromTOML (builtins.readFile (self + "/rust-toolchain.toml")));
libPath = with pkgs; lib.makeLibraryPath [
# load external libraries that you need in your rust project here
];
in
{
devShells.default = pkgs.mkShell rec {
nativeBuildInputs = [ pkgs.pkg-config ];
buildInputs = with pkgs; [
clang
llvmPackages.bintools
rustup
dioxus-cli
webkitgtk_4_1
wasm-pack
wasm-bindgen-cli
curl
wget
file
openssl
gtk3
librsvg
xdotool
];
# RUSTC_VERSION = overrides.toolchain.channel;
# https://github.com/rust-lang/rust-bindgen#environment-variables
LIBCLANG_PATH = pkgs.lib.makeLibraryPath [ pkgs.llvmPackages_latest.libclang.lib ];
shellHook = ''
export PATH=$PATH:''${CARGO_HOME:-~/.cargo}/bin
export PATH=$PATH:''${RUSTUP_HOME:-~/.rustup}/toolchains/$RUSTC_VERSION-x86_64-unknown-linux-gnu/bin/
'';
# Add precompiled library to rustc search path
RUSTFLAGS = (builtins.map (a: ''-L ${a}/lib'') [
# add libraries here (e.g. pkgs.libvmi)
]);
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath (buildInputs ++ nativeBuildInputs);
# Add glibc, clang, glib, and other headers to bindgen search path
BINDGEN_EXTRA_CLANG_ARGS =
# Includes normal include path
(builtins.map (a: ''-I"${a}/include"'') [
# add dev libraries here (e.g. pkgs.libvmi.dev)
pkgs.glibc.dev
])
# Includes with special directory paths
++ [
''-I"${pkgs.llvmPackages_latest.libclang.lib}/lib/clang/${pkgs.llvmPackages_latest.libclang.version}/include"''
''-I"${pkgs.glib.dev}/include/glib-2.0"''
''-I${pkgs.glib.out}/lib/glib-2.0/include/''
];
};
}
);
}