Nix #3

Merged
DashieTM merged 10 commits from nix into main 2024-05-12 23:29:50 +02:00
20 changed files with 798 additions and 813 deletions
Showing only changes of commit cf63b635ac - Show all commits

View file

@ -32,16 +32,18 @@
cantarell-fonts cantarell-fonts
]; ];
environment.variables = {
NIX_LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath (config.systemd.packages ++ config.environment.systemPackages);
PKG_CONFIG_PATH = pkgs.lib.makeLibraryPath (config.systemd.packages ++ config.environment.systemPackages);
};
nix.settings.experimental-features = "nix-command flakes"; nix.settings.experimental-features = "nix-command flakes";
programs.fish.enable = true; programs.fish.enable = true;
programs.fish.promptInit = '' programs.fish.promptInit = ''
${pkgs.any-nix-shell}/bin/any-nix-shell fish --info-right | source ${pkgs.any-nix-shell}/bin/any-nix-shell fish --info-right | source
''; '';
programs.nix-ld.enable = true;
programs.nix-ld.libraries = with pkgs; [
jdk
zlib
];
programs.dconf.enable = true; programs.dconf.enable = true;
services.upower.enable = true; services.upower.enable = true;
services.printing.enable = true; services.printing.enable = true;
@ -72,4 +74,8 @@
}; };
}; };
programs.ssh.startAgent = true; programs.ssh.startAgent = true;
virtualisation.virtualbox.host.enable = true;
users.extraGroups.vboxusers.members = [ "dashie" ];
virtualisation.virtualbox.guest.enable = true;
} }

68
nix/flake.lock generated
View file

@ -107,6 +107,24 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_2": {
"inputs": {
"systems": "systems_3"
},
"locked": {
"lastModified": 1705309234,
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -345,6 +363,22 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_3": {
"locked": {
"lastModified": 1706487304,
"narHash": "sha256-LE8lVX28MV2jWJsidW13D2qrHU/RUUONendL2Q/WlJg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "90f456026d284c22b3e3497be980b2e47d0b28ac",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"Hyprspace": "Hyprspace", "Hyprspace": "Hyprspace",
@ -353,7 +387,8 @@
"hyprland": "hyprland", "hyprland": "hyprland",
"ironbar": "ironbar", "ironbar": "ironbar",
"nix-flatpak": "nix-flatpak", "nix-flatpak": "nix-flatpak",
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_2",
"rust-overlay": "rust-overlay_2"
} }
}, },
"rust-overlay": { "rust-overlay": {
@ -378,6 +413,22 @@
"type": "github" "type": "github"
} }
}, },
"rust-overlay_2": {
"inputs": {
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1713579131,
"narHash": "sha256-j/lrqFNzm7SdlBlKX43kA2Wp0OaGVOUjQGnER9//4Ao=",
"type": "tarball",
"url": "https://github.com/oxalica/rust-overlay/archive/master.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://github.com/oxalica/rust-overlay/archive/master.tar.gz"
}
},
"systems": { "systems": {
"locked": { "locked": {
"lastModified": 1689347949, "lastModified": 1689347949,
@ -408,6 +459,21 @@
"type": "github" "type": "github"
} }
}, },
"systems_3": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"wlroots": { "wlroots": {
"flake": false, "flake": false,
"locked": { "locked": {

View file

@ -21,6 +21,9 @@
url = "github:JakeStanger/ironbar"; url = "github:JakeStanger/ironbar";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
rust-overlay = {
url = "https://github.com/oxalica/rust-overlay/archive/master.tar.gz";
};
anyrun.url = "github:Kirottu/anyrun"; anyrun.url = "github:Kirottu/anyrun";
anyrun.inputs.nixpkgs.follows = "nixpkgs"; anyrun.inputs.nixpkgs.follows = "nixpkgs";
@ -35,10 +38,9 @@
}; };
overlays = [ overlays = [
# because allowing rust nightly is too hard by default.... # because allowing rust nightly is too hard by default....
(import (fetchTarball { (import
url = "https://github.com/oxalica/rust-overlay/archive/master.tar.gz"; inputs.rust-overlay
sha256 = "sha256:1aaza47rqi74ypi77ksz396q9l7rrxfrdnhi2pfjb0yqmz7l69wl"; )
}))
]; ];
}; };
base_imports = [ base_imports = [

View file

@ -5,4 +5,8 @@
"amdgpu.ppfeaturemask=0xffffffff" "amdgpu.ppfeaturemask=0xffffffff"
]; ];
networking.hostName = "spaceship"; networking.hostName = "spaceship";
environment.systemPackages = with pkgs; [
linuxKernel.packages.linux_zen.virtualbox
];
} }

View file

@ -0,0 +1,92 @@
{ stdenv
, lib
, pkgs
, fetchFromGitLab
, nix-update-script
}:
pkgs.python3.pkgs.buildPythonApplication rec {
pname = "cambalache";
version = "0.90.1";
format = "other";
# Did not fetch submodule since it is only for tests we don't run.
src = fetchFromGitLab {
domain = "gitlab.gnome.org";
owner = "jpu";
repo = pname;
rev = version;
sha256 = "sha256-YuRxqrGJvhMMZApD/tQSWkUg/nZnp/xryBJSjXCXO4w=";
};
nativeBuildInputs = with pkgs; [
meson
ninja
pkg-config
gobject-introspection # for setup hook
desktop-file-utils # for update-desktop-database
shared-mime-info # for update-mime-database
wrapGAppsHook
];
pythonPath = with pkgs.python3.pkgs; [
pygobject3
lxml
];
buildInputs = with pkgs; [
glib
gtk3
gtk4
gtksourceview4
gtksourceview5
webkitgtk_4_1
webkitgtk_6_0
# For extra widgets support.
libadwaita
libhandy
];
# Prevent double wrapping.
dontWrapGApps = true;
postPatch = ''
patchShebangs postinstall.py
# those programs are used at runtime not build time
# https://gitlab.gnome.org/jpu/cambalache/-/blob/0.12.1/meson.build#L79-80
substituteInPlace ./meson.build \
--replace "find_program('broadwayd', required: true)" "" \
--replace "find_program('gtk4-broadwayd', required: true)" ""
'';
preFixup = ''
# Let python wrapper use GNOME flags.
makeWrapperArgs+=(
# For broadway daemons
--prefix PATH : "${lib.makeBinPath [ pkgs.gtk3 pkgs.gtk4 ]}"
"''${gappsWrapperArgs[@]}"
)
'';
postFixup = ''
# Wrap a helper script in an unusual location.
wrapPythonProgramsIn "$out/${pkgs.python3.sitePackages}/cambalache/priv/merengue" "$out $pythonPath"
'';
passthru = {
updateScript = nix-update-script { };
};
meta = with lib; {
homepage = "https://gitlab.gnome.org/jpu/cambalache";
description = "RAD tool for GTK 4 and 3 with data model first philosophy";
mainProgram = "cambalache";
maintainers = teams.gnome.members;
license = with licenses; [
lgpl21Only # Cambalache
gpl2Only # tools
];
platforms = platforms.unix;
};
}

View file

@ -32,7 +32,6 @@ rustPlatform.buildRustPackage rec {
libadwaita libadwaita
]; ];
postInstall = '' postInstall = ''
install -D --mode=444 $src/${pname}.desktop $out/share/applications/${pname}.desktop install -D --mode=444 $src/${pname}.desktop $out/share/applications/${pname}.desktop
install -D --mode=444 $src/${pname}.svg $out/share/pixmaps/${pname}.svg install -D --mode=444 $src/${pname}.svg $out/share/pixmaps/${pname}.svg

53
nix/override/reset.nix Normal file
View file

@ -0,0 +1,53 @@
{ pkgs
, lib
, fetchFromGitHub
}:
let
toolchain = pkgs.rust-bin.selectLatestNightlyWith (toolchain: toolchain.minimal);
rustPlatform = pkgs.makeRustPlatform {
cargo = toolchain;
rustc = toolchain;
};
in
rustPlatform.buildRustPackage rec {
pname = "reset";
version = "1.1.1";
src = fetchFromGitHub {
owner = "Xetibo";
repo = "ReSet";
rev = "${version}";
hash = "sha256-nyEGhD4IlsJ1AqRZC7aP2vOuq4etvZ7BwTMxb4u7cxY=";
};
cargoHash = "sha256-lcNu8yEQiSTshXCwblBLYpSJWmErS53z+SviqaqlSnI=";
nativeBuildInputs = with pkgs;[
pkg-config
glib
wrapGAppsHook4
];
buildInputs = with pkgs;[
gtk4
libadwaita
pulseaudio
dbus
gdk-pixbuf
gnome.adwaita-icon-theme
];
postInstall = ''
install -D --mode=444 $src/${pname}.desktop $out/share/applications/${pname}.desktop
install -D --mode=444 $src/src/resources/icons/ReSet.svg $out/share/pixmaps/ReSet.svg
'';
meta = with lib; {
description = "";
homepage = "https://github.com/Xetibo/ReSet";
changelog = "https://github.com/Xetibo/ReSet/releases/tag/${version}";
license = licenses.gpl3;
maintainers = with maintainers; [ DashieTM ];
mainProgram = "reset";
};
}

View file

@ -17,13 +17,21 @@
deno deno
python3 python3
typst typst
typst-lsp
typstfmt
neovide neovide
tree-sitter tree-sitter
dotnet-runtime_8 dotnet-sdk
unzip unzip
pkg-config pkg-config
sqlite sqlite
plantuml plantuml
vscodium vscodium
gradle
maven
jdt-language-server
adoptopenjdk-jre-bin
#vscode-extensions.vscjava.vscode-java-test
#vscode-extensions.vscjava.vscode-java-debug
]; ];
} }

View file

@ -47,6 +47,7 @@ in
playerctl playerctl
ncspot ncspot
poppler_utils poppler_utils
neofetch
(callPackage (callPackage
../override/oxinoti.nix ../override/oxinoti.nix
{ }) { })
@ -65,6 +66,12 @@ in
(callPackage (callPackage
../override/streamdeck.nix ../override/streamdeck.nix
{ }) { })
(callPackage
../override/reset.nix
{ })
(callPackage
../override/cambalache.nix
{ })
]; ];
home.username = "dashie"; home.username = "dashie";

View file

@ -13,6 +13,7 @@
wine wine
]; ];
hardware.xone.enable = true;
programs.steam.enable = true; programs.steam.enable = true;
programs.gamemode.enable = true; programs.gamemode.enable = true;
programs.gamemode = { programs.gamemode = {

View file

@ -60,12 +60,16 @@
nvim-lspconfig nvim-lspconfig
nvim-notify nvim-notify
nvim-spectre nvim-spectre
nvim-treesitter nvim-treesitter.withAllGrammars
nvim-treesitter-context nvim-treesitter-context
nvim-treesitter-textobjects nvim-treesitter-textobjects
nvim-ts-autotag nvim-ts-autotag
nvim-ts-context-commentstring nvim-ts-context-commentstring
nvim-web-devicons nvim-web-devicons
nvim-jdtls
neotest
neotest-java
neotest-rust
persistence-nvim persistence-nvim
plenary-nvim plenary-nvim
telescope-fzf-native-nvim telescope-fzf-native-nvim
@ -97,6 +101,18 @@
defaults = { defaults = {
lazy = true, lazy = true,
}, },
performance = {
rtp = {
disabled_plugins = {
"gzip",
"netrw",
"tarPlugin",
"tohtml",
"tutor",
"zipPlugin",
},
},
},
dev = { dev = {
-- reuse files from pkgs.vimPlugins.* -- reuse files from pkgs.vimPlugins.*
path = "${lazyPath}", path = "${lazyPath}",
@ -107,8 +123,6 @@
spec = { spec = {
{ "LazyVim/LazyVim", import = "lazyvim.plugins" }, { "LazyVim/LazyVim", import = "lazyvim.plugins" },
{ import = "lazyvim.plugins.extras.ui.alpha" }, { import = "lazyvim.plugins.extras.ui.alpha" },
{ import = "plugins" },
{ import = "plugins.plugins" },
{ import = "lazyvim.plugins.extras.lang.rust" }, { import = "lazyvim.plugins.extras.lang.rust" },
{ import = "lazyvim.plugins.extras.lang.tailwind" }, { import = "lazyvim.plugins.extras.lang.tailwind" },
{ import = "lazyvim.plugins.extras.lang.java" }, { import = "lazyvim.plugins.extras.lang.java" },
@ -127,27 +141,15 @@
{ "nvim-telescope/telescope-fzf-native.nvim", enabled = true }, { "nvim-telescope/telescope-fzf-native.nvim", enabled = true },
-- disable mason.nvim, use programs.neovim.extraPackages -- disable mason.nvim, use programs.neovim.extraPackages
{ "williamboman/mason-lspconfig.nvim", enabled = false }, { "williamboman/mason-lspconfig.nvim", enabled = false },
{ "williamboman/mason.nvim", enabled = false }, --{ "williamboman/mason.nvim", enabled = false },
-- import/override with your plugins
{ import = "plugins" },
-- treesitter handled by xdg.configFile."nvim/parser", put this line at the end of spec to clear ensure_installed -- treesitter handled by xdg.configFile."nvim/parser", put this line at the end of spec to clear ensure_installed
{ "nvim-treesitter/nvim-treesitter", opts = { ensure_installed = {} } }, { "nvim-treesitter/nvim-treesitter", opts = { ensure_installed = {} } },
{ import = "plugins" },
{ import = "plugins.plugins" },
}, },
install = { colorscheme = { "tokyonight" } }, install = { colorscheme = { "tokyonight" } },
checker = { enabled = true, notify = false }, checker = { enabled = true, notify = false },
change_detection = { enabled = true, notify = false }, change_detection = { enabled = true, notify = false },
performance = {
rtp = {
disabled_plugins = {
"gzip",
"netrw",
"tarPlugin",
"tohtml",
"tutor",
"zipPlugin",
},
},
},
}) })
''; '';
}; };
@ -157,14 +159,12 @@
let let
parsers = pkgs.symlinkJoin { parsers = pkgs.symlinkJoin {
name = "treesitter-parsers"; name = "treesitter-parsers";
paths = (pkgs.vimPlugins.nvim-treesitter.withPlugins (plugins: with plugins; [ paths = (pkgs.vimPlugins.nvim-treesitter.withAllGrammars).dependencies;
c
lua
])).dependencies;
}; };
in in
"${parsers}/parser"; "${parsers}/parser";
# Normal LazyVim config here, see https://github.com/LazyVim/starter/tree/main/lua # Normal LazyVim config here, see https://github.com/LazyVim/starter/tree/main/lua
xdg.configFile."nvim/lua".source = ./lua; xdg.configFile."nvim/lua".source = ./lua;
xdg.configFile."nvim/ftplugin".source = ./ftplugin;
} }

View file

@ -0,0 +1,5 @@
local config = {
cmd = { "jdtls" },
root_dir = vim.fs.dirname(vim.fs.find({ "gradlew", ".git", "mvnw" }, { upward = true })[1]),
}
require("jdtls").start_or_attach(config)

View file

@ -0,0 +1,16 @@
-- nvimtree
local function open_nvim_tree(data)
local directory = vim.fn.isdirectory(data.file) == 1
if not directory then
return
end
print("FUCK")
-- change to the directory
vim.cmd.cd(data.file)
-- open the tree
require("nvim-tree.api").tree.open()
end
vim.api.nvim_create_autocmd({ "VimEnter" }, { callback = open_nvim_tree })

View file

@ -1,14 +1,14 @@
local Util = require("lazyvim.util") local Util = require("lazyvim.util")
local function map(mode, lhs, rhs, opts) local function map(mode, lhs, rhs, opts)
local keys = require("lazy.core.handler").handlers.keys local keys = require("lazy.core.handler").handlers.keys
---@cast keys LazyKeysHandler ---@cast keys LazyKeysHandler
-- do not create the map if a lazy keys handler exists -- do not create the map if a lazy keys handler exists
if not keys.active[keys.parse({ lhs, mode = mode }).id] then if not keys.active[keys.parse({ lhs, mode = mode }).id] then
opts = opts or {} opts = opts or {}
opts.silent = opts.silent ~= false opts.silent = opts.silent ~= false
vim.keymap.set(mode, lhs, rhs, opts) vim.keymap.set(mode, lhs, rhs, opts)
end end
end end
local opts = { noremap = true, silent = true } local opts = { noremap = true, silent = true }
local term_opts = { silent = true } local term_opts = { silent = true }
@ -32,10 +32,10 @@ map("n", "<leader>do", ':lua require("dap").step_over()<CR>', { desc = "Step ove
map("n", "<leader>di", ':lua require("dap").step_into()<CR>', { desc = "Step into" }) map("n", "<leader>di", ':lua require("dap").step_into()<CR>', { desc = "Step into" })
map("n", "<leader>dc", ':lua require("dap").continue()<CR>', { desc = "Continue" }) map("n", "<leader>dc", ':lua require("dap").continue()<CR>', { desc = "Continue" })
map("n", "<leader>du", function() map("n", "<leader>du", function()
require("dapui").toggle() require("dapui").toggle()
end, { desc = "Toggle DAP UI" }) end, { desc = "Toggle DAP UI" })
map("n", "<leader>de", function() map("n", "<leader>de", function()
require("dapui").eval() require("dapui").eval()
end, { desc = "DAP Eval" }) end, { desc = "DAP Eval" })
-- window movement -- window movement
@ -48,7 +48,7 @@ map("i", "<A-k>", [[<Cmd>wincmd j<CR>]], opts)
-- toggle terminal -- toggle terminal
local lazyterm = function() local lazyterm = function()
Util.terminal(nil, { cwd = Util.root(), esc_esc = false, ctrl_hjkl = false }) Util.terminal(nil, { cwd = Util.root(), esc_esc = false, ctrl_hjkl = false })
end end
map("n", "<c-t>", lazyterm, { desc = "Terminal (root dir)" }) map("n", "<c-t>", lazyterm, { desc = "Terminal (root dir)" })
map("t", "<c-t>", "<cmd>close<cr>", { desc = "Hide Terminal" }) map("t", "<c-t>", "<cmd>close<cr>", { desc = "Hide Terminal" })
@ -65,70 +65,70 @@ map("n", "<F2>", ":BufferLineCycleNext<CR>", opts)
-- git -- git
map("n", "<leader>gq", function() map("n", "<leader>gq", function()
require("telescope.builtin").git_commits() require("telescope.builtin").git_commits()
end, { desc = "Commits" }) end, { desc = "Commits" })
map("n", "<leader>gw", function() map("n", "<leader>gw", function()
require("telescope.builtin").git_bcommits() require("telescope.builtin").git_bcommits()
end, { desc = "Commits in branch" }) end, { desc = "Commits in branch" })
map("n", "<leader>gb", function() map("n", "<leader>gb", function()
require("telescope.builtin").git_branches() require("telescope.builtin").git_branches()
end, { desc = "Branches" }) end, { desc = "Branches" })
map("n", "<leader>gr", function() map("n", "<leader>gr", function()
require("telescope.builtin").git_status() require("telescope.builtin").git_status()
end, { desc = "Git status" }) end, { desc = "Git status" })
map("n", "<leader>ga", function() map("n", "<leader>ga", function()
require("telescope.builtin").git_stash() require("telescope.builtin").git_stash()
end, { desc = "Git stash" }) end, { desc = "Git stash" })
map("n", "<leader>gg", function() map("n", "<leader>gg", function()
Util.terminal({ "gitui" }, { cwd = Util.root() }) Util.terminal({ "gitui" }, { cwd = Util.root() })
end, { desc = "gitui (root dir)" }) end, { desc = "gitui (root dir)" })
map("n", "<leader>gG", function() map("n", "<leader>gG", function()
Util.terminal({ "gitui" }) Util.terminal({ "gitui" })
end, { desc = "gitui (cwd)" }) end, { desc = "gitui (cwd)" })
map("n", "<leader>gB", function() map("n", "<leader>gB", function()
require("gitblame") require("gitblame")
vim.cmd(":GitBlameToggle") vim.cmd(":GitBlameToggle")
end, { desc = "git blame" }) end, { desc = "git blame" })
-- harpoon man -- harpoon man
map("n", "<leader>h1", function() map("n", "<leader>h1", function()
require("harpoon.ui").nav_file(1) require("harpoon.ui").nav_file(1)
end, { desc = "First Harpoon File" }) end, { desc = "First Harpoon File" })
map("n", "<leader>h2", function() map("n", "<leader>h2", function()
require("harpoon.ui").nav_file(2) require("harpoon.ui").nav_file(2)
end, { desc = "Second Harpoon File" }) end, { desc = "Second Harpoon File" })
map("n", "<leader>h3", function() map("n", "<leader>h3", function()
require("harpoon.ui").nav_file(3) require("harpoon.ui").nav_file(3)
end, { desc = "First Harpoon File" }) end, { desc = "First Harpoon File" })
map("n", "<leader>ha", function() map("n", "<leader>ha", function()
require("harpoon.mark").add_file() require("harpoon.mark").add_file()
end, { desc = "First Harpoon File" }) end, { desc = "First Harpoon File" })
map("n", "<leader>hd", function() map("n", "<leader>hd", function()
require("harpoon.mark").remove_file() require("harpoon.mark").remove_file()
end, { desc = "First Harpoon File" }) end, { desc = "First Harpoon File" })
map("n", "<leader>hm", ":Telescope harpoon marks<CR>", { noremap = true, silent = true, desc = "Show harpoon marks" }) map("n", "<leader>hm", ":Telescope harpoon marks<CR>", { noremap = true, silent = true, desc = "Show harpoon marks" })
-- telescope -- telescope
map("n", "<leader>fb", function() map("n", "<leader>fb", function()
require("telescope").extensions.file_browser.file_browser({}) require("telescope").extensions.file_browser.file_browser({})
end, { desc = "File Browser" }) end, { desc = "File Browser" })
map("n", "<leader>ff", function() map("n", "<leader>ff", function()
require("telescope.builtin").find_files() require("telescope.builtin").find_files()
end, { desc = "Find Files" }) end, { desc = "Find Files" })
map("n", "<leader>fg", function() map("n", "<leader>fg", function()
Live_grep_from_project_git_root() Live_grep_from_project_git_root()
end, { desc = "Live Grep (root)" }) end, { desc = "Live Grep (root)" })
map("n", "<leader>fG", function() map("n", "<leader>fG", function()
require("telescope.builtin").live_grep() require("telescope.builtin").live_grep()
end, { desc = "Live Grep (cwd)" }) end, { desc = "Live Grep (cwd)" })
map("n", "<leader>fh", function() map("n", "<leader>fh", function()
require("telescope.builtin").help_tags() require("telescope.builtin").help_tags()
end, { desc = "Help" }) end, { desc = "Help" })
map("n", "<leader>fp", function() map("n", "<leader>fp", function()
require("telescope").extensions.project.project({}) require("telescope").extensions.project.project({})
end, { noremap = true, silent = true, desc = "Projects" }) end, { noremap = true, silent = true, desc = "Projects" })
map("n", "<leader>z", function() map("n", "<leader>z", function()
require("telescope").extensions.zoxide.list({}) require("telescope").extensions.zoxide.list({})
end, { desc = "Zoxide" }) end, { desc = "Zoxide" })
-- neoscroll -- neoscroll
@ -142,13 +142,13 @@ map("n", "<leader>t", "<cmd>TroubleToggle<CR>", term_opts)
-- format -- format
map({ "n", "v" }, "<F4>", function() map({ "n", "v" }, "<F4>", function()
Util.format({ force = true }) Util.format({ force = true })
end, { desc = "Format" }) end, { desc = "Format" })
-- better yank -- better yank
function Better_yank(opts) function Better_yank(opts)
local current_line = unpack(vim.api.nvim_win_get_cursor(0)) local current_line = unpack(vim.api.nvim_win_get_cursor(0))
vim.api.nvim_command(current_line .. "," .. (opts.count - (current_line - 1)) .. "y") vim.api.nvim_command(current_line .. "," .. (opts.count - (current_line - 1)) .. "y")
end end
vim.api.nvim_create_user_command("BetterYank", Better_yank, { count = 1 }) vim.api.nvim_create_user_command("BetterYank", Better_yank, { count = 1 })
@ -156,8 +156,8 @@ map("n", "by", ":BetterYank<CR>", term_opts)
-- better delete -- better delete
function Better_delete(opts) function Better_delete(opts)
local current_line = unpack(vim.api.nvim_win_get_cursor(0)) local current_line = unpack(vim.api.nvim_win_get_cursor(0))
vim.api.nvim_command(current_line .. "," .. (opts.count - (current_line - 1)) .. "d") vim.api.nvim_command(current_line .. "," .. (opts.count - (current_line - 1)) .. "d")
end end
vim.api.nvim_create_user_command("BetterDelete", Better_delete, { count = 1 }) vim.api.nvim_create_user_command("BetterDelete", Better_delete, { count = 1 })
@ -165,13 +165,13 @@ map("n", "bd", ":BetterDelete<CR>", term_opts)
-- neovide zoom -- neovide zoom
local change_scale_factor = function(delta) local change_scale_factor = function(delta)
vim.g.neovide_scale_factor = vim.g.neovide_scale_factor * delta vim.g.neovide_scale_factor = vim.g.neovide_scale_factor * delta
end end
vim.keymap.set("n", "<C-=>", function() vim.keymap.set("n", "<C-=>", function()
change_scale_factor(1.25) change_scale_factor(1.25)
end) end)
vim.keymap.set("n", "<C-->", function() vim.keymap.set("n", "<C-->", function()
change_scale_factor(1 / 1.25) change_scale_factor(1 / 1.25)
end) end)
-- neovide paste -- neovide paste
@ -179,23 +179,24 @@ vim.g.neovide_input_use_logo = 1
vim.api.nvim_set_keymap("i", "<C-S-V>", "<ESC>p<CR>I", { noremap = true, silent = true }) vim.api.nvim_set_keymap("i", "<C-S-V>", "<ESC>p<CR>I", { noremap = true, silent = true })
function Get_git_root() function Get_git_root()
local opts = {} local opts = {}
local function is_git_repo() local function is_git_repo()
vim.fn.system("git rev-parse --is-inside-work-tree") vim.fn.system("git rev-parse --is-inside-work-tree")
return vim.v.shell_error == 0 return vim.v.shell_error == 0
end end
if is_git_repo() then if is_git_repo() then
local dot_git_path = vim.fn.finddir(".git", ".;") local dot_git_path = vim.fn.finddir(".git", ".;")
local root = vim.fn.fnamemodify(dot_git_path, ":h") local root = vim.fn.fnamemodify(dot_git_path, ":h")
opts = { opts = {
cwd = root, cwd = root,
} }
end end
return opts return opts
end end
function Live_grep_from_project_git_root() function Live_grep_from_project_git_root()
local opts = Get_git_root() local opts = Get_git_root()
require("telescope.builtin").live_grep(opts) require("telescope.builtin").live_grep(opts)
end end

View file

@ -2,24 +2,32 @@
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua -- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
-- Add any additional options here -- Add any additional options here
local options = { local options = {
fileencoding = "utf-8", fileencoding = "utf-8",
number = true, number = true,
showmode = true, showmode = true,
termguicolors = true, termguicolors = true,
spelllang = "en_us", spelllang = "en_us",
shell = "fish", shell = "fish",
relativenumber = false, relativenumber = false,
scrolloff = 5, scrolloff = 5,
scrolljump = 5, scrolljump = 5,
wrap = false, wrap = false,
} }
vim.filetype.add({
extension = {
typst = "typst",
typ = "typst",
},
})
vim.o.guifont = "JetBrainsMono Nerd Font:h14" vim.o.guifont = "JetBrainsMono Nerd Font:h14"
vim.g.neovide_refresh_rate_idle = 180 vim.g.neovide_refresh_rate_idle = 180
vim.g.neovide_refresh_rate_idle = 5 vim.g.neovide_refresh_rate_idle = 5
vim.g.neovide_hide_mouse_when_typing = true vim.g.neovide_hide_mouse_when_typing = true
vim.g.mkdp_browser = "/usr/bin/firefox" vim.g.mkdp_browser = "/usr/bin/firefox"
vim.g.mkdp_auto_start = 1 vim.g.mkdp_auto_start = 1
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
vim.g.autoformat = false vim.g.autoformat = false
for k, v in pairs(options) do for k, v in pairs(options) do
vim.opt[k] = v vim.opt[k] = v
end end

View file

@ -1,302 +0,0 @@
local Util = require("lazyvim.util")
return {
{
"LazyVim/LazyVim",
opts = {
colorscheme = "tokyonight-night",
-- colorscheme = "catppuccin-mocha",
},
},
{
"nvim-telescope/telescope.nvim",
cmd = "Telescope",
keys = function()
return {}
end,
opts = {
defaults = {
layout_strategy = 'flex';
layout_config = {
flex = {
height = 0.95,
width = 0.95,
flip_columns = 100,
vertical = { preview_height = 0.5, preview_cutoff = 5 },
horizontal = { preview_width = 0.7, preview_cutoff = 99 },
},
},
},
},
},
{
"ThePrimeagen/harpoon",
lazy = true,
config = function()
require("telescope").load_extension("harpoon")
end,
},
{
"iamcco/markdown-preview.nvim",
lazy = true,
event = "FileType markdown",
build = "cd app && yarn install",
},
{
"nvim-telescope/telescope-project.nvim",
lazy = true,
},
{
"nvim-telescope/telescope-file-browser.nvim",
lazy = true,
config = function()
require("telescope").load_extension("file_browser")
end,
},
{
"jvgrootveld/telescope-zoxide",
lazy = true,
config = function()
local z_utils = require("telescope._extensions.zoxide.utils")
local t = require("telescope")
-- Configure the extension
t.setup({
extensions = {
zoxide = {
prompt_title = "[ Queries ]",
mappings = {
default = {
after_action = function(selection)
print("Update to (" .. selection.z_score .. ") " .. selection.path)
end,
},
["<C-s>"] = {
before_action = function(selection)
print("before C-s")
end,
action = function(selection)
vim.cmd("edit " .. selection.path)
end,
},
["<C-q>"] = { action = z_utils.create_basic_command("split") },
},
},
},
})
-- Load the extension
t.load_extension("zoxide")
end,
},
{
"lervag/vimtex",
config = function()
vim.cmd("let g:vimtex_quickfix_mode=0")
vim.cmd("let g:vimtex_view_general_viewer = 'evince'")
vim.cmd("let g:vimtex_compiler_method = 'latexmk'")
vim.cmd(
"let g:vimtex_compiler_latexmk = {'options': ['-pdf', '-shell-escape', '-file-line-error', '--extra-mem-bot=10000000', '-synctex=1', '-interaction=nonstopmode',],}"
)
end,
},
{
"rcarriga/nvim-notify",
opts = {
top_down = false,
},
},
{
"jbyuki/instant.nvim",
config = function()
vim.cmd("let g:instant_username = 'dashie'")
end,
},
{
"nvim-treesitter/nvim-treesitter",
opts = {
textobjects = {
select = {
enable = true,
lookahead = true,
keymaps = {
-- You can use the capture groups defined in textobjects.scm
["af"] = "@function.outer",
["if"] = "@function.inner",
["ac"] = "@class.outer",
["ic"] = "@class.inner",
},
},
},
},
},
{
"karb94/neoscroll.nvim",
config = function()
require("neoscroll").setup()
end,
},
{
"kaarmu/typst.vim",
lazy = true,
event = "FileType typst",
},
{
"folke/which-key.nvim",
event = "VeryLazy",
opts = {
plugins = { spelling = true },
defaults = {
mode = { "n", "v" },
["g"] = { name = "+goto" },
["gz"] = { name = "+surround" },
["]"] = { name = "+next" },
["["] = { name = "+prev" },
["<leader><tab>"] = { name = "+tabs" },
["<leader>b"] = { name = "+buffer" },
["<leader>c"] = { name = "+code" },
["<leader>f"] = { name = "+file/find" },
["<leader>g"] = { name = "+git" },
["<leader>gh"] = { name = "+hunks" },
["<leader>q"] = { name = "+quit/session" },
["<leader>s"] = { name = "+search" },
["<leader>u"] = { name = "+ui" },
["<leader>w"] = { name = "+windows" },
["<leader>x"] = { name = "+diagnostics/quickfix" },
["<leader>h"] = { name = "+harpoon" },
["<leader>d"] = { name = "+DAP" },
},
},
config = function(_, opts)
local wk = require("which-key")
wk.setup(opts)
wk.register(opts.defaults)
end,
},
{
"f-person/git-blame.nvim",
lazy = true,
},
{
"mg979/vim-visual-multi",
},
{
"barreiroleo/ltex_extra.nvim",
ft = { "markdown", "tex", "typst", "typ" },
lazy = true,
},
{
"smjonas/inc-rename.nvim",
lazy = true,
event = "BufEnter",
config = function()
require("inc_rename").setup({
cmd_name = "IncRename", -- the name of the command
hl_group = "Substitute", -- the highlight group used for highlighting the identifier's new name
preview_empty_name = true, -- whether an empty new name should be previewed; if false the command preview will be cancelled instead
show_message = true, -- whether to display a `Renamed m instances in n files` message after a rename operation
input_buffer_type = nil, -- the type of the external input buffer to use (the only supported value is currently "dressing")
post_hook = nil, -- callback to run after renaming, receives the result table (from LSP handler) as an argument
})
end,
},
{
"nvim-neo-tree/neo-tree.nvim",
opts = {
window = {
position = "right",
mappings = {
["l"] = "none",
},
},
},
keys = {
{
"<leader>fe",
function()
require("neo-tree.command").execute({ position = "right", toggle = true, dir = Util.root() })
end,
desc = "Explorer NeoTree (root dir)",
},
{
"<leader>fE",
function()
require("neo-tree.command").execute({ position = "right", toggle = true, dir = vim.loop.cwd() })
end,
desc = "Explorer NeoTree (cwd)",
},
{ "<A-f>", "<leader>fe", desc = "Explorer NeoTree (root dir)", remap = true },
{ "<A-F>", "<leader>fE", desc = "Explorer NeoTree (cwd)", remap = true },
},
},
{
"folke/edgy.nvim",
opts = {
animate = {
enabled = false,
},
left = {},
right = {
-- Neo-tree filesystem always takes half the screen height
{
title = "Neo-Tree",
ft = "neo-tree",
filter = function(buf)
return vim.b[buf].neo_tree_source == "filesystem"
end,
size = { height = 0.5 },
},
{
title = "Neo-Tree Git",
ft = "neo-tree",
filter = function(buf)
return vim.b[buf].neo_tree_source == "git_status"
end,
pinned = true,
open = "Neotree position=right git_status",
},
{
title = "Neo-Tree Buffers",
ft = "neo-tree",
filter = function(buf)
return vim.b[buf].neo_tree_source == "buffers"
end,
pinned = true,
open = "Neotree position=top buffers",
},
{
ft = "Outline",
pinned = true,
open = "SymbolsOutlineOpen",
},
-- any other neo-tree windows
"neo-tree",
},
},
},
{
"rcarriga/nvim-dap-ui",
keys = {
{
"<leader>dk",
function()
require("dap").down()
end,
desc = "Down",
},
{
"<leader>dl",
function()
require("dap").up()
end,
desc = "Up",
},
{
"<leader>d;",
function()
require("dap").run_last()
end,
desc = "Run Last",
},
},
},
}

View file

@ -5,4 +5,5 @@ return {
{ { "folke/noice.nvim", enabled = false } }, { { "folke/noice.nvim", enabled = false } },
{ { "nvimtools/none-ls.nvim", enabled = false } }, { { "nvimtools/none-ls.nvim", enabled = false } },
{ { "nvimdev/dashboard-nvim", enabled = false } }, { { "nvimdev/dashboard-nvim", enabled = false } },
{ { "nvim-neo-tree/neo-tree.nvim", enabled = false } },
} }

View file

@ -1,162 +1,164 @@
return { return {
{ {
"williamboman/mason.nvim", "williamboman/mason.nvim",
opts = { --opts = function()
ensure_installed = {}, -- return {
}, -- ensure_installed = {},
}, -- }
{ --end,
"neovim/nvim-lspconfig", },
---@class PluginLspOpts {
opts = { "neovim/nvim-lspconfig",
-- inlay_hints = { ---@class PluginLspOpts
-- enabled = true, opts = {
-- }, -- inlay_hints = {
format_notify = false, -- enabled = true,
-- LSP Server Settings -- },
---@type lspconfig.options format_notify = false,
servers = { -- LSP Server Settings
rust_analyzer = { ---@type lspconfig.options
mason = false, servers = {
}, rust_analyzer = {
marksman = { mason = false,
mason = false, },
}, marksman = {
clangd = { mason = false,
mason = false, },
}, clangd = {
jdtls = { mason = false,
mason = false, },
}, jdtls = {
gopls = { mason = false,
mason = false, },
}, gopls = {
pyright = { mason = false,
mason = false, },
}, pyright = {
ruff_lsp = { mason = false,
mason = false, },
}, ruff_lsp = {
texlab = { mason = false,
mason = false, },
}, texlab = {
taplo = { mason = false,
keys = { },
{ taplo = {
"K", keys = {
function() {
if vim.fn.expand("%:t") == "Cargo.toml" and require("crates").popup_available() then "K",
require("crates").show_popup() function()
else if vim.fn.expand("%:t") == "Cargo.toml" and require("crates").popup_available() then
vim.lsp.buf.hover() require("crates").show_popup()
end else
end, vim.lsp.buf.hover()
desc = "Show Crate Documentation", end
}, end,
}, desc = "Show Crate Documentation",
mason = false, },
}, },
bashls = { mason = false,
mason = false, },
}, bashls = {
ansiblels = { mason = false,
mason = false, },
}, ansiblels = {
typst_lsp = { mason = false,
settings = { },
experimentalFormatterMode = "on", typst_lsp = {
exportPdf = "onSave", settings = {
}, experimentalFormatterMode = "on",
mason = false, exportPdf = "onSave",
}, },
nil_ls = { mason = false,
settings = { },
["nil"] = { nil_ls = {
formatting = { settings = {
command = { "nixpkgs-fmt" }, ["nil"] = {
}, formatting = {
}, command = { "nixpkgs-fmt" },
}, },
mason = false, },
}, },
ltex = { mason = false,
settings = { },
ltex = { ltex = {
checkFrequency = "save", settings = {
}, ltex = {
}, checkFrequency = "save",
filetypes = { },
"bib", },
"gitcommit", filetypes = {
"markdown", "bib",
"org", "gitcommit",
"plaintex", "markdown",
"rst", "org",
"rnoweb", "plaintex",
"tex", "rst",
"pandoc", "rnoweb",
"typst", "tex",
"typ", "pandoc",
}, "typst",
mason = false, "typ",
}, },
sqlls = { mason = false,
mason = false, },
}, sqlls = {
lemminx = { mason = false,
mason = false, },
}, lemminx = {
opencl_ls = { mason = false,
mason = false, },
}, opencl_ls = {
yamlls = { mason = false,
mason = false, },
}, yamlls = {
lua_ls = { mason = false,
mason = false, },
{ lua_ls = {
Lua = { mason = false,
workspace = { {
checkThirdParty = false, Lua = {
}, workspace = {
completion = { checkThirdParty = false,
callSnippet = "Replace", },
}, completion = {
}, callSnippet = "Replace",
}, },
}, },
}, },
}, },
init = function() },
local keys = require("lazyvim.plugins.lsp.keymaps").get() },
local my_keys = require("config.lsp-keymap").get() init = function()
local count = 0 local keys = require("lazyvim.plugins.lsp.keymaps").get()
for _ in pairs(my_keys) do local my_keys = require("config.lsp-keymap").get()
keys[#keys + 1] = my_keys[count] local count = 0
count = count + 1 for _ in pairs(my_keys) do
end keys[#keys + 1] = my_keys[count]
end, count = count + 1
}, end
{ end,
"stevearc/conform.nvim", },
opts = { {
keys = { "stevearc/conform.nvim",
{ opts = {
-- Customize or remove this keymap to your liking keys = {
"<leader>cF", {
function() -- Customize or remove this keymap to your liking
require("conform").format({ async = true, lsp_fallback = true }) "<leader>cF",
end, function()
mode = "", require("conform").format({ async = true, lsp_fallback = true })
desc = "Format buffer", end,
}, mode = "",
}, desc = "Format buffer",
formatters_by_ft = { },
typst = { "typstfmt" }, },
nix = { "nixpkgs-fmt" }, formatters_by_ft = {
lua = { "stylua" }, typst = { "typstfmt" },
sh = { "shfmt" }, nix = { "nixpkgs-fmt" },
}, lua = { "stylua" },
}, sh = { "shfmt" },
}, },
},
},
} }

View file

@ -1,255 +1,273 @@
local Util = require("lazyvim.util") local Util = require("lazyvim.util")
return { return {
{ {
"LazyVim/LazyVim", "LazyVim/LazyVim",
opts = { opts = {
colorscheme = "tokyonight-night", colorscheme = "tokyonight-night",
-- colorscheme = "catppuccin-mocha", -- colorscheme = "catppuccin-mocha",
}, },
}, },
{ {
"nvim-telescope/telescope.nvim", "nvim-telescope/telescope.nvim",
cmd = "Telescope", cmd = "Telescope",
keys = function() keys = function()
return {} return {}
end, end,
opts = { opts = {
defaults = { defaults = {
layout_strategy = "flex", layout_strategy = "flex",
layout_config = { layout_config = {
flex = { flex = {
height = 0.95, height = 0.95,
width = 0.95, width = 0.95,
flip_columns = 100, flip_columns = 100,
}, },
vertical = { preview_height = 0.5, preview_cutoff = 5 }, vertical = { preview_height = 0.5, preview_cutoff = 5 },
horizontal = { preview_width = 0.7, preview_cutoff = 99 }, horizontal = { preview_width = 0.7, preview_cutoff = 99 },
}, },
}, },
}, },
}, },
{ {
"nvim-telescope/telescope-project.nvim", "nvim-telescope/telescope-project.nvim",
lazy = true, lazy = true,
}, },
{ {
"nvim-telescope/telescope-file-browser.nvim", "nvim-telescope/telescope-file-browser.nvim",
lazy = true, lazy = true,
config = function() config = function()
require("telescope").load_extension("file_browser") require("telescope").load_extension("file_browser")
end, end,
}, },
{ {
"jvgrootveld/telescope-zoxide", "jvgrootveld/telescope-zoxide",
lazy = true, lazy = true,
config = function() config = function()
local z_utils = require("telescope._extensions.zoxide.utils") local z_utils = require("telescope._extensions.zoxide.utils")
local t = require("telescope") local t = require("telescope")
-- Configure the extension -- Configure the extension
t.setup({ t.setup({
extensions = { extensions = {
zoxide = { zoxide = {
prompt_title = "[ Queries ]", prompt_title = "[ Queries ]",
mappings = { mappings = {
default = { default = {
after_action = function(selection) after_action = function(selection)
print("Update to (" .. selection.z_score .. ") " .. selection.path) print("Update to (" .. selection.z_score .. ") " .. selection.path)
end, end,
}, },
["<C-s>"] = { ["<C-s>"] = {
before_action = function(selection) before_action = function(selection)
print("before C-s") print("before C-s")
end, end,
action = function(selection) action = function(selection)
vim.cmd("edit " .. selection.path) vim.cmd("edit " .. selection.path)
end, end,
}, },
["<C-q>"] = { action = z_utils.create_basic_command("split") }, ["<C-q>"] = { action = z_utils.create_basic_command("split") },
}, },
}, },
}, },
}) })
-- Load the extension -- Load the extension
t.load_extension("zoxide") t.load_extension("zoxide")
end, end,
}, },
{ {
"lervag/vimtex", "lervag/vimtex",
config = function() config = function()
vim.cmd("let g:vimtex_quickfix_mode=0") vim.cmd("let g:vimtex_quickfix_mode=0")
vim.cmd("let g:vimtex_view_general_viewer = 'evince'") vim.cmd("let g:vimtex_view_general_viewer = 'evince'")
vim.cmd("let g:vimtex_compiler_method = 'latexmk'") vim.cmd("let g:vimtex_compiler_method = 'latexmk'")
vim.cmd( vim.cmd(
"let g:vimtex_compiler_latexmk = {'options': ['-pdf', '-shell-escape', '-file-line-error', '--extra-mem-bot=10000000', '-synctex=1', '-interaction=nonstopmode',],}" "let g:vimtex_compiler_latexmk = {'options': ['-pdf', '-shell-escape', '-file-line-error', '--extra-mem-bot=10000000', '-synctex=1', '-interaction=nonstopmode',],}"
) )
end, end,
}, },
{ {
"jbyuki/instant.nvim", "jbyuki/instant.nvim",
config = function() config = function()
vim.cmd("let g:instant_username = 'dashie'") vim.cmd("let g:instant_username = 'dashie'")
end, end,
}, },
{ {
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
opts = { opts = {
textobjects = { textobjects = {
select = { select = {
enable = true, enable = true,
lookahead = true, lookahead = true,
keymaps = { keymaps = {
-- You can use the capture groups defined in textobjects.scm -- You can use the capture groups defined in textobjects.scm
["af"] = "@function.outer", ["af"] = "@function.outer",
["if"] = "@function.inner", ["if"] = "@function.inner",
["ac"] = "@class.outer", ["ac"] = "@class.outer",
["ic"] = "@class.inner", ["ic"] = "@class.inner",
}, },
}, },
}, },
}, },
}, },
{ {
"karb94/neoscroll.nvim", "karb94/neoscroll.nvim",
config = function() config = function()
require("neoscroll").setup() require("neoscroll").setup()
end, end,
}, },
{ {
"kaarmu/typst.vim", "kaarmu/typst.vim",
lazy = true, lazy = true,
event = "FileType typst", event = "FileType typst",
}, },
{ {
"folke/which-key.nvim", "folke/which-key.nvim",
event = "VeryLazy", event = "VeryLazy",
opts = { opts = {
plugins = { spelling = true }, plugins = { spelling = true },
defaults = { defaults = {
mode = { "n", "v" }, mode = { "n", "v" },
["g"] = { name = "+goto" }, ["g"] = { name = "+goto" },
["gz"] = { name = "+surround" }, ["gz"] = { name = "+surround" },
["]"] = { name = "+next" }, ["]"] = { name = "+next" },
["["] = { name = "+prev" }, ["["] = { name = "+prev" },
["<leader><tab>"] = { name = "+tabs" }, ["<leader><tab>"] = { name = "+tabs" },
["<leader>b"] = { name = "+buffer" }, ["<leader>b"] = { name = "+buffer" },
["<leader>c"] = { name = "+code" }, ["<leader>c"] = { name = "+code" },
["<leader>f"] = { name = "+file/find" }, ["<leader>f"] = { name = "+file/find" },
["<leader>g"] = { name = "+git" }, ["<leader>g"] = { name = "+git" },
["<leader>gh"] = { name = "+hunks" }, ["<leader>gh"] = { name = "+hunks" },
["<leader>q"] = { name = "+quit/session" }, ["<leader>q"] = { name = "+quit/session" },
["<leader>s"] = { name = "+search" }, ["<leader>s"] = { name = "+search" },
["<leader>u"] = { name = "+ui" }, ["<leader>u"] = { name = "+ui" },
["<leader>w"] = { name = "+windows" }, ["<leader>w"] = { name = "+windows" },
["<leader>x"] = { name = "+diagnostics/quickfix" }, ["<leader>x"] = { name = "+diagnostics/quickfix" },
["<leader>h"] = { name = "+harpoon" }, ["<leader>h"] = { name = "+harpoon" },
["<leader>d"] = { name = "+DAP" }, ["<leader>d"] = { name = "+DAP" },
}, },
}, },
config = function(_, opts) config = function(_, opts)
local wk = require("which-key") local wk = require("which-key")
wk.setup(opts) wk.setup(opts)
wk.register(opts.defaults) wk.register(opts.defaults)
end, end,
}, },
{ {
"f-person/git-blame.nvim", "f-person/git-blame.nvim",
lazy = true, lazy = true,
}, },
{ {
"mg979/vim-visual-multi", "mg979/vim-visual-multi",
}, },
{ {
"barreiroleo/ltex_extra.nvim", "barreiroleo/ltex_extra.nvim",
ft = { "markdown", "tex", "typst", "typ" }, ft = { "markdown", "tex", "typst", "typ" },
lazy = true, lazy = true,
}, },
{ {
"smjonas/inc-rename.nvim", "smjonas/inc-rename.nvim",
lazy = true, lazy = true,
event = "BufEnter", event = "BufEnter",
config = function() config = function()
require("inc_rename").setup({ require("inc_rename").setup({
cmd_name = "IncRename", -- the name of the command cmd_name = "IncRename", -- the name of the command
hl_group = "Substitute", -- the highlight group used for highlighting the identifier's new name hl_group = "Substitute", -- the highlight group used for highlighting the identifier's new name
preview_empty_name = true, -- whether an empty new name should be previewed; if false the command preview will be cancelled instead preview_empty_name = true, -- whether an empty new name should be previewed; if false the command preview will be cancelled instead
show_message = true, -- whether to display a `Renamed m instances in n files` message after a rename operation show_message = true, -- whether to display a `Renamed m instances in n files` message after a rename operation
input_buffer_type = nil, -- the type of the external input buffer to use (the only supported value is currently "dressing") input_buffer_type = nil, -- the type of the external input buffer to use (the only supported value is currently "dressing")
post_hook = nil, -- callback to run after renaming, receives the result table (from LSP handler) as an argument post_hook = nil, -- callback to run after renaming, receives the result table (from LSP handler) as an argument
}) })
end, end,
}, },
{ {
"nvim-neo-tree/neo-tree.nvim", "nvim-tree/nvim-tree.lua",
opts = { dependencies = { "nvim-tree/nvim-web-devicons" },
window = { config = function()
position = "right", require("nvim-tree").setup({
mappings = { renderer = {
["l"] = "none", group_empty = true,
}, },
}, view = {
}, side = "right",
keys = { },
{ })
"<leader>fe", end,
function() keys = {
require("neo-tree.command").execute({ position = "right", toggle = true, dir = Util.root() }) {
end, "<leader>fe",
desc = "Explorer NeoTree (root dir)", function()
}, require("nvim-tree.api").tree.toggle()
{ end,
"<leader>fE", desc = "Explorer NvimTree (root dir)",
function() },
require("neo-tree.command").execute({ position = "right", toggle = true, dir = vim.loop.cwd() }) {
end, "<leader>fE",
desc = "Explorer NeoTree (cwd)", function()
}, require("nvim-tree.api").tree.toggle()
{ "<A-f>", "<leader>fe", desc = "Explorer NeoTree (root dir)", remap = true }, end,
{ "<A-F>", "<leader>fE", desc = "Explorer NeoTree (cwd)", remap = true }, desc = "Explorer NvimTree (cwd)",
}, },
}, { "<A-f>", "<leader>fe", desc = "Explorer NvimTree (root dir)", remap = true },
{ { "<A-F>", "<leader>fE", desc = "Explorer NvimTree (cwd)", remap = true },
"rcarriga/nvim-dap-ui", },
keys = { },
{ {
"<leader>dk", "rcarriga/nvim-dap-ui",
function() keys = {
require("dap").down() {
end, "<leader>dk",
desc = "Down", function()
}, require("dap").down()
{ end,
"<leader>dl", desc = "Down",
function() },
require("dap").up() {
end, "<leader>dl",
desc = "Up", function()
}, require("dap").up()
{ end,
"<leader>d;", desc = "Up",
function() },
require("dap").run_last() {
end, "<leader>d;",
desc = "Run Last", function()
}, require("dap").run_last()
}, end,
}, desc = "Run Last",
{ },
"DashieTM/test_plugin", },
lazy = false, },
opts = { {
what = 0, "nvim-neotest/neotest",
}, dependencies = {
}, "rcasia/neotest-java",
{ },
"DreamMaoMao/yazi.nvim", opts = {
dependencies = { adapters = {
"nvim-telescope/telescope.nvim", ["neotest-java"] = {
"nvim-lua/plenary.nvim", ignore_wrapper = false, -- whether to ignore maven/gradle wrapper
}, junit_jar = "/home/dashie/.local/share/nvim/mason/bin/junit-standalone.jar",
keys = { -- default: .local/share/nvim/neotest-java/junit-platform-console-standalone-[version].jar
{ "<leader>fy", "<cmd>Yazi<CR>", desc = "Toggle Yazi" }, },
}, },
}, },
},
{
"DashieTM/test_plugin",
lazy = false,
opts = {
what = 0,
},
},
{
"DreamMaoMao/yazi.nvim",
dependencies = {
"nvim-telescope/telescope.nvim",
"nvim-lua/plenary.nvim",
},
keys = {
{ "<leader>fy", "<cmd>Yazi<CR>", desc = "Toggle Yazi" },
},
},
} }

View file

@ -1,7 +1,5 @@
ncspot() { ncspot() {
notify-send "$1"
notify-send "$2"
NUM=$(pactl list clients short | rg "ncspot" | awk -F 'PipeWire' ' { print $1 } ' | tr -d ' \t\n') NUM=$(pactl list clients short | rg "ncspot" | awk -F 'PipeWire' ' { print $1 } ' | tr -d ' \t\n')
CHANGE=$(pactl list sink-inputs short | rg "$NUM" | awk -F ' ' ' { print $1 }' | tr -d ' \t\n') CHANGE=$(pactl list sink-inputs short | rg "$NUM" | awk -F ' ' ' { print $1 }' | tr -d ' \t\n')
pactl set-sink-input-volume "$CHANGE" "$1" pactl set-sink-input-volume "$CHANGE" "$1"