Compare commits

..

No commits in common. "50ba2969d1136b6cad0b829edb98a97d63c546a3" and "35b2144c68af502374be91dfd4fa1f38b3c46403" have entirely different histories.

10 changed files with 51 additions and 194 deletions

View File

@ -521,22 +521,6 @@
"type": "github"
}
},
"leap-spooky-nvim": {
"flake": false,
"locked": {
"lastModified": 1687792124,
"narHash": "sha256-EPqbsG7KFHdnbW430+BSrPeOoVy99KtIC8OpFbV1ycw=",
"owner": "ggandor",
"repo": "leap-spooky.nvim",
"rev": "e003f2aa376190148f2e7731a60c89239335013c",
"type": "github"
},
"original": {
"owner": "ggandor",
"repo": "leap-spooky.nvim",
"type": "github"
}
},
"lowdown-src": {
"flake": false,
"locked": {
@ -972,7 +956,6 @@
"hypr-contrib": "hypr-contrib",
"hyprland": "hyprland",
"hyprpaper": "hyprpaper",
"leap-spooky-nvim": "leap-spooky-nvim",
"lspsaga-nvim": "lspsaga-nvim",
"master": "master",
"neovim-nightly-overlay": "neovim-nightly-overlay",
@ -983,8 +966,7 @@
"pre-commit-hooks": "pre-commit-hooks",
"rofi-wayland": "rofi-wayland",
"smartcolumn-nvim": "smartcolumn-nvim",
"stable": "stable",
"telekasten-nvim": "telekasten-nvim"
"stable": "stable"
}
},
"rust-overlay": {
@ -1059,22 +1041,6 @@
"type": "github"
}
},
"telekasten-nvim": {
"flake": false,
"locked": {
"lastModified": 1689074017,
"narHash": "sha256-yBw0Ja9xBhHcEdzvKvg6LCDzmIgW9kg0XaXS7hcr958=",
"owner": "renerocksai",
"repo": "telekasten.nvim",
"rev": "4a5e57eee9c5154ed77423bb7fa6619fdb0784cd",
"type": "github"
},
"original": {
"owner": "renerocksai",
"repo": "telekasten.nvim",
"type": "github"
}
},
"wlroots": {
"flake": false,
"locked": {

View File

@ -50,12 +50,6 @@
smartcolumn-nvim.flake = false;
smartcolumn-nvim.url = "github:m4xshen/smartcolumn.nvim";
leap-spooky-nvim.flake = false;
leap-spooky-nvim.url = "github:ggandor/leap-spooky.nvim";
telekasten-nvim.flake = false;
telekasten-nvim.url = "github:renerocksai/telekasten.nvim";
# Hyprland
hypr-contrib.url = "github:hyprwm/contrib";
hyprland.url = "github:hyprwm/Hyprland";

View File

@ -14,18 +14,6 @@ let
'';
};
nom-system-command = command: "${nom-system}/bin/nom-system && ${command}";
f = pkgs.writeFishApplication {
name = "f";
runtimeInputs = with pkgs; [ fzf bat ];
text = ''
#!/usr/bin/env fish
fzf --query "$argv" --multi --bind "enter:become($EDITOR {+})" --preview "bat --color=always --style=header,grid --line-range :500 {+}"
'';
completions = ''
complete -c f
'';
};
in
{
users.users.moritz = {
@ -57,6 +45,8 @@ in
mv = "mv -i";
cd = "z";
f = ''fzf --multi --bind "enter:become($EDITOR {+})" --preview "bat --color=always --style=header,grid --line-range :500 {+}"'';
nixos-switch = nom-system-command "sudo nixos-rebuild switch --flake ~/.dotfiles";
nixos-boot = nom-system-command "sudo nixos-rebuild boot --flake ~/.dotfiles";
nixos-update = "pushd ~/.dotfiles && nix flake update && popd";
@ -128,7 +118,6 @@ in
viu
wget
vim
f
];
fonts.fonts = with pkgs; [

View File

@ -48,9 +48,9 @@ let
listToStringMultiLine id
([
"dir = ${quote plugin}"
"name = ${quote (getName plugin)}"
"name = ${quote plugin.name}"
"lazy = ${boolToString lazy}"
]
++ (optional (!lazy) "lazy = ${boolToString lazy}")
++ (optional (!enabled) "enabled = ${boolToString enabled}")
++ (optional (dependencies != [ ]) "dependencies = ${listToStringMultiLine id (map lazySpecFromPlugin dependencies)}")
++ (optional (init != null) "init = function(plugin)\n${toString init}\nend")
@ -231,6 +231,7 @@ in
nil
nixpkgs-fmt
nodePackages.bash-language-server
nodePackages.cspell
rustfmt
shellcheck
shfmt

View File

@ -200,7 +200,8 @@ with builtins;
conf = readFile ./smartcolumn-nvim.lua;
}
{
plugin = telescope-nvim;
plugin = telescope-fzf-native-nvim;
conf = readFile ./telescope-fzf-native-nvim.lua;
cmd = [ "Telescope" ];
keys = [
{ key = "<leader>ff"; cmd = "<cmd>Telescope find_files<cr>"; desc = "Find files"; }
@ -219,15 +220,13 @@ with builtins;
{ key = "<leader>gs"; cmd = "<cmd>Telescope git_status<cr>"; desc = "Status"; }
];
dependencies = [
{ plugin = plenary-nvim; }
{ plugin = which-key-nvim; }
];
}
{
plugin = telescope-fzf-native-nvim;
conf = readFile ./telescope-fzf-native-nvim.lua;
dependencies = [
{ plugin = telescope-nvim; }
{
plugin = telescope-nvim;
dependencies = [
{ plugin = plenary-nvim; }
{ plugin = which-key-nvim; }
];
}
];
}
{
@ -242,65 +241,7 @@ with builtins;
{
plugin = comment-nvim;
event = [ "BufReadPost" "BufNewFile" ];
conf = ''
require("Comment").setup()
'';
}
{
plugin = leap-nvim;
lazy = false;
conf = ''
require("leap").add_default_mappings()
'';
}
{
plugin = leap-spooky-nvim;
lazy = false;
conf = ''
require("leap-spooky").setup()
'';
dependencies = [
{
plugin = leap-nvim;
}
];
}
{
plugin = telekasten-nvim;
dependencies = [
{ plugin = telescope-nvim; }
];
cmd = [ "Telekasten" ];
keys = [
{ key = "<leader>z"; cmd = "<cmd>Telekasten<cr>"; desc = "zettelkasten"; }
];
conf = ''
require("telekasten").setup({
home = vim.fn.expand("~/Nextcloud/Notes/zettelkasten"),
auto_set_filetype = false,
auto_set_syntax = false,
image_subdir = "assets",
})
vim.api.nvim_create_autocmd({ "BufReadPost", "BufNewFile" }, {
pattern = "*/zettelkasten/*",
callback = function(event)
vim.api.nvim_buf_set_keymap(0, "n", "<CR>", "", {
callback = function()
local current_word = vim.fn.expand("<cWORD>")
if vim.fn.match(current_word, "[[") == 0 then
require("telekasten").follow_link()
else
require("telekasten").toggle_todo()
end
end,
})
end,
})
'';
}
{
plugin = markdown-preview-nvim;
lazy = false;
conf = "require('Comment').setup()";
}
];
}

View File

@ -1,48 +1,9 @@
require("mini.align").setup()
require("mini.surround").setup()
require("mini.move").setup()
require("mini.pairs").setup()
require("mini.starter").setup()
require("mini.surround").setup({
-- Add custom surroundings to be used on top of builtin ones. For more
-- information with examples, see `:h MiniSurround.config`.
custom_surroundings = nil,
-- Duration (in ms) of highlight when calling `MiniSurround.highlight()`
highlight_duration = 500,
-- Module mappings. Use `''` (empty string) to disable one.
mappings = {
add = "gSa", -- Add surrounding in Normal and Visual modes
delete = "gSd", -- Delete surrounding
find = "gSf", -- Find surrounding (to the right)
find_left = "gSF", -- Find surrounding (to the left)
highlight = "gSh", -- Highlight surrounding
replace = "gSr", -- Replace surrounding
update_n_lines = "gSn", -- Update `n_lines`
suffix_last = "l", -- Suffix to search with "prev" method
suffix_next = "n", -- Suffix to search with "next" method
},
-- Number of lines within which surrounding is searched
n_lines = 20,
-- Whether to respect selection type:
-- - Place surroundings on separate lines in linewise mode.
-- - Place surroundings on each line in blockwise mode.
respect_selection_type = false,
-- How to search for surrounding (first inside current line, then inside
-- neighborhood). One of 'cover', 'cover_or_next', 'cover_or_prev',
-- 'cover_or_nearest', 'next', 'prev', 'nearest'. For more details,
-- see `:h MiniSurround.config`.
search_method = "cover",
-- Whether to disable showing non-error feedback
silent = false,
})
require("mini.tabline").setup()
local tabline_current = vim.api.nvim_get_hl(0, { name = "MiniTablineCurrent" })
vim.api.nvim_set_hl(0, "MiniTablineCurrent", {

View File

@ -3,12 +3,14 @@ local null_ls = require("null-ls")
null_ls.setup({
sources = {
-- Code actions
null_ls.builtins.code_actions.cspell,
null_ls.builtins.code_actions.gitsigns,
null_ls.builtins.code_actions.shellcheck,
null_ls.builtins.code_actions.statix,
-- Completion
null_ls.builtins.completion.spell,
-- Diagnostics
null_ls.builtins.diagnostics.cspell,
null_ls.builtins.diagnostics.deadnix,
null_ls.builtins.diagnostics.shellcheck,
null_ls.builtins.diagnostics.statix,
@ -16,6 +18,7 @@ null_ls.setup({
})
-- disable (c)spell initially
null_ls.disable("cspell")
null_ls.disable("spell")
-- make sources toggle able
@ -28,5 +31,11 @@ require("which-key").register({
end,
"spell",
},
S = {
function()
null_ls.toggle("cspell")
end,
"cspell",
},
},
}, { prefix = "<leader>t" })

View File

@ -4,6 +4,30 @@ with lib;
let
cfg = config.my.programs.tmux;
fzf1 = pkgs.writeShellApplication {
name = "fzf1";
runtimeInputs = with pkgs; [ coreutils fzf ];
text = ''
#!/usr/bin/env bash
options=$(fzf --filter "''$*" < /dev/stdin)
if [[ -z $options ]]; then
exit 1
elif [[ $(wc -l <<< "$options") -eq 1 ]]; then
selected="$options"
else
selected=$(echo "$options" | fzf --query="$*")
fi
if [[ -z $selected ]]; then
exit 0
fi
echo "$selected"
'';
};
tmux-switch = pkgs.writeShellApplication {
name = "tmux-switch";
runtimeInputs = with pkgs; [ tmux ];

View File

@ -1,6 +1,6 @@
{ inputs, lib, ... }:
final: prev:
_: prev:
{
agenix = inputs.agenix.packages.${prev.system}.default;
hyprpaper = inputs.hyprpaper.packages.${prev.system}.default;
@ -10,20 +10,4 @@ final: prev:
src = inputs.rofi-wayland;
version = lib.my.mkVersionInput inputs.rofi-wayland;
});
fzf1 = final.writeShellApplication {
name = "fzf1";
runtimeInputs = with final; [ coreutils fzf fd ];
text = ''
#!/usr/bin/env bash
selected=$(fzf --query="$*" -1 < /dev/stdin)
if [[ -z $selected ]]; then
exit 0
fi
echo "$selected"
'';
};
}

View File

@ -31,17 +31,5 @@ with lib.my;
version = mkVersionInput inputs.cmp-async-path;
src = inputs.cmp-async-path;
});
leap-spooky-nvim = prev.vimUtils.buildVimPluginFrom2Nix {
pname = "leap-spooky-nvim";
version = mkVersionInput inputs.leap-spooky-nvim;
src = inputs.leap-spooky-nvim;
};
telekasten-nvim = prev.vimUtils.buildVimPluginFrom2Nix {
pname = "telekasten-nvim";
version = mkVersionInput inputs.telekasten-nvim;
src = inputs.telekasten-nvim;
};
};
}