Compare commits

...

18 commits

Author SHA1 Message Date
prunebutt
8f24b31e31 push flake.lock 2024-11-26 23:24:01 +01:00
89c5ae70d0 fix an error 2024-11-14 23:25:31 +01:00
Michi Floßmann
9b4035fea7 modify smart splits behavior 2024-11-14 21:40:57 +01:00
7b3b6e3ed6 override flake lock for eslint alias 2024-09-09 12:01:29 +02:00
4640407d14 update settings 2024-09-09 12:01:29 +02:00
1725495890 add treesitter highlights 2024-09-09 12:01:06 +02:00
4403ce1dc8 push flake.lock 2024-09-09 12:01:06 +02:00
5e9c8d7820 add oil toggle keybinding 2024-09-09 12:01:06 +02:00
22d43ea656 push flake.lock 2024-09-09 12:01:06 +02:00
Michael Flossmann
a62dcaf072 add lemminx (xml) lsp 2024-09-09 11:48:28 +02:00
Michael Flossmann
26dba13017 edit aerial settings 2024-09-09 11:48:10 +02:00
Michael Flossmann
b5f8993eeb add spider and surround 2024-08-30 11:52:49 +02:00
Michael Flossmann
137ca4d7c5 add aerial keymaps 2024-08-30 11:48:39 +02:00
Michael Flossmann
c8c5184e36 add zoxide.vim 2024-08-30 11:48:20 +02:00
Michael Flossmann
58fd3c46c4 add committia and none-ls 2024-08-22 09:55:47 +02:00
Michael Flossmann
eb07e46c21 add cosmetic changes to comments and keybindings 2024-08-22 09:55:44 +02:00
Michael Flossmann
aaf656431a add aerial 2024-08-22 09:54:35 +02:00
Michael Flossmann
4bdb8fdc60 edit the config structure to use modules rather than sets 2024-08-22 09:53:36 +02:00
23 changed files with 344 additions and 67 deletions

View file

@ -1,5 +1,24 @@
{
{lib, ...}:{
# TODO: Make colorscheme configurable
colorscheme = lib.mkOverride 500 "everforest";
colorschemes = {
kanagawa.enable = true;
nord.enable = true;
tokyonight = {
enable = true;
settings = {
style = "storm";
light_style = "day";
transparent = false;
};
};
everforest = {
enable = true;
settings = {
enable_italic = 1;
};
};
catppuccin = {
enable = true;
@ -8,6 +27,13 @@
# Needed to keep terminal transparency, if any
transparent_background = false;
styles = {
keywords = [ "italic" ];
conditionals = [ "italic" ];
functions = [ "italic" ];
loops = [ "italic" ];
};
};
};
};

View file

@ -9,5 +9,6 @@ let
)
(builtins.readDir ./.)
);
in
lib.mkMerge (map (file: import ./${file}) definitions)
in {
imports = map (file: import ./${file}) definitions;
}

View file

@ -1,4 +1,4 @@
{
_: {
keymaps =
(import ./buffers.nix)
++ (import ./diagnostics.nix)

View file

@ -1,7 +1,7 @@
# Neovim options
# Use :options to get the list of all options
# Use :h <option> to load help for given <option>
{
_:{
opts = {
# Don't stop backspace at insert
backspace.__raw = ''

113
flake.lock generated
View file

@ -2,18 +2,17 @@
"nodes": {
"devshell": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1717408969,
"narHash": "sha256-Q0OEFqe35fZbbRPPRdrjTUUChKVhhWXz3T9ZSKmaoVY=",
"lastModified": 1728330715,
"narHash": "sha256-xRJ2nPOXb//u1jaBnDP56M7v5ldavjbtR6lfGqSvcKg=",
"owner": "numtide",
"repo": "devshell",
"rev": "1ebbe68d57457c8cae98145410b164b5477761f4",
"rev": "dd6b80932022cea34a019e2bb32f6fa9e494dfef",
"type": "github"
},
"original": {
@ -44,11 +43,11 @@
]
},
"locked": {
"lastModified": 1719877454,
"narHash": "sha256-g5N1yyOSsPNiOlFfkuI/wcUjmtah+nxdImJqrSATjOU=",
"lastModified": 1730504689,
"narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "4e3583423212f9303aa1a6337f8dffb415920e4f",
"rev": "506278e768c2a08bec68eb62932193e341f55c90",
"type": "github"
},
"original": {
@ -62,11 +61,11 @@
"systems": "systems"
},
"locked": {
"lastModified": 1701680307,
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
@ -92,11 +91,11 @@
]
},
"locked": {
"lastModified": 1719259945,
"narHash": "sha256-F1h+XIsGKT9TkGO3omxDLEb/9jOOsI6NnzsXFsZhry4=",
"lastModified": 1732021966,
"narHash": "sha256-mnTbjpdqF0luOkou8ZFi2asa1N3AA2CchR/RqCNmsGE=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "0ff4381bbb8f7a52ca4a851660fc7a437a4c6e07",
"rev": "3308484d1a443fc5bc92012435d79e80458fe43c",
"type": "github"
},
"original": {
@ -135,11 +134,11 @@
]
},
"locked": {
"lastModified": 1719827439,
"narHash": "sha256-tneHOIv1lEavZ0vQ+rgz67LPNCgOZVByYki3OkSshFU=",
"lastModified": 1732303962,
"narHash": "sha256-5Umjb5AdtxV5jSJd5jxoCckh5mlg+FBQDsyAilu637g=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "59ce796b2563e19821361abbe2067c3bb4143a7d",
"rev": "8cf9cb2ee78aa129e5b8220135a511a2be254c0c",
"type": "github"
},
"original": {
@ -148,6 +147,34 @@
"type": "github"
}
},
"ixx": {
"inputs": {
"flake-utils": [
"nixvim",
"nuschtosSearch",
"flake-utils"
],
"nixpkgs": [
"nixvim",
"nuschtosSearch",
"nixpkgs"
]
},
"locked": {
"lastModified": 1729958008,
"narHash": "sha256-EiOq8jF4Z/zQe0QYVc3+qSKxRK//CFHMB84aYrYGwEs=",
"owner": "NuschtOS",
"repo": "ixx",
"rev": "9fd01aad037f345350eab2cd45e1946cc66da4eb",
"type": "github"
},
"original": {
"owner": "NuschtOS",
"ref": "v0.0.6",
"repo": "ixx",
"type": "github"
}
},
"nix-darwin": {
"inputs": {
"nixpkgs": [
@ -156,11 +183,11 @@
]
},
"locked": {
"lastModified": 1719845423,
"narHash": "sha256-ZLHDmWAsHQQKnmfyhYSHJDlt8Wfjv6SQhl2qek42O7A=",
"lastModified": 1732324260,
"narHash": "sha256-0xzQvoId/P008QkTSAdFVv465P9rL9nYkIOWXL5pdsY=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "ec12b88104d6c117871fad55e931addac4626756",
"rev": "698a62c628c2ec423aa770d8ec0e1d0bcf4fca1a",
"type": "github"
},
"original": {
@ -178,11 +205,11 @@
"nmt": "nmt"
},
"locked": {
"lastModified": 1715807870,
"narHash": "sha256-lutvG1LFGSpXsGA7U4TWfdfq6p71WdSlhw3vM4W/Opk=",
"lastModified": 1729445390,
"narHash": "sha256-TxJ7RZLlBkKWZos1ai3eWIH0fBq1G6SVE+q3dW+0qRU=",
"owner": "Gerschtli",
"repo": "nix-formatter-pack",
"rev": "ab5feb867e5d074918852de6134500a82a09dc48",
"rev": "9f4bcf647cad2edafda7e1143071e0daf37cbc41",
"type": "github"
},
"original": {
@ -193,11 +220,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1720542800,
"narHash": "sha256-ZgnNHuKV6h2+fQ5LuqnUaqZey1Lqqt5dTUAiAnqH0QQ=",
"lastModified": 1732521221,
"narHash": "sha256-2ThgXBUXAE1oFsVATK1ZX9IjPcS4nKFOAjhPNKuiMn0=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "feb2849fdeb70028c70d73b848214b00d324a497",
"rev": "4633a7c72337ea8fd23a4f2ba3972865e3ec685d",
"type": "github"
},
"original": {
@ -218,14 +245,15 @@
"nixpkgs": [
"nixpkgs"
],
"nuschtosSearch": "nuschtosSearch",
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1720864742,
"narHash": "sha256-NVkF91eZPav7zbcMR+7mUzOdMKgIEBJSwtFU2rv1OpY=",
"lastModified": 1732629460,
"narHash": "sha256-Cr8EyxEFPbVmX6p8LsslFBjDEuVlFNPILrWlwbBNnNA=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "195978e6272702ea5d6e9b837d083c411dc5d688",
"rev": "8b19d154823619af7ced464185e8d13ec80a758b",
"type": "github"
},
"original": {
@ -266,6 +294,29 @@
"type": "gitlab"
}
},
"nuschtosSearch": {
"inputs": {
"flake-utils": "flake-utils",
"ixx": "ixx",
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1731936508,
"narHash": "sha256-z0BSSf78LkxIrrFXZYmCoRRAxAmxMUKpK7CyxQRvkZI=",
"owner": "NuschtOS",
"repo": "search",
"rev": "fe07070f811b717a4626d01fab714a87d422a9e1",
"type": "github"
},
"original": {
"owner": "NuschtOS",
"repo": "search",
"type": "github"
}
},
"root": {
"inputs": {
"nix-formatter-pack": "nix-formatter-pack",
@ -296,11 +347,11 @@
]
},
"locked": {
"lastModified": 1719887753,
"narHash": "sha256-p0B2r98UtZzRDM5miGRafL4h7TwGRC4DII+XXHDHqek=",
"lastModified": 1732292307,
"narHash": "sha256-5WSng844vXt8uytT5djmqBCkopyle6ciFgteuA9bJpw=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "bdb6355009562d8f9313d9460c0d3860f525bc6c",
"rev": "705df92694af7093dfbb27109ce16d828a79155f",
"type": "github"
},
"original": {

View file

@ -0,0 +1,73 @@
{ lib, pkgs, ...}:
{
extra = {
packages = [
(import ./package.nix { inherit lib pkgs; })
];
config = /*lua*/ ''
require("aerial").setup({
backends = { "lsp", "treesitter", "markdown", "man" },
layout = { min_width = 28, placement = "window", default_direction = "prefer_left" },
show_guides = true,
filter_kind = false,
guides = {
mid_item = " ",
last_item = " ",
nested_top = " ",
whitespace = " ",
},
autojump = true,
keymaps = {
["[y"] = "actions.prev",
["]y"] = "actions.next",
["[Y"] = "actions.prev_up",
["]Y"] = "actions.next_up",
["|"] = "actions.jump_vsplit",
["\\"] = "actions.jump_split",
["{"] = false,
["}"] = false,
["[["] = false,
["]]"] = false,
["<C-v>"] = false,
["<C-s>"] = false,
},
attach_mode = "global",
})
'';
};
rootOpts.keymaps = [
{
mode = "n";
key = "<leader>lO";
action.__raw = ''function() require("aerial").open() end'';
options.desc = "Symbols outline (left)";
}
{
mode = "n";
key = "<leader>lo";
action.__raw = ''function() require("aerial").open({direction = "float"}) end'';
options.desc = "Symbols outline (floating)";
}
{
mode = "n";
key = "]S";
action.__raw = ''function() require("aerial").next() end'';
options.desc = "Next symbol";
}
{
mode = "n";
key = "[S";
action.__raw = ''function() require("aerial").prev() end'';
options.desc = "Previous symbol";
}
{
mode = "n";
key = "<leader>fs";
action.__raw = ''require("telescope").extensions.aerial.aerial'';
options.desc = "Find symbols";
}
];
}

View file

@ -0,0 +1,21 @@
{ pkgs, ...}:
let
version = "2.1.0";
in
pkgs.vimUtils.buildVimPlugin {
inherit version;
name = "aerial";
# src = pkgs.fetchFromGitHub {
# owner = "stevearc";
# repo = "aerial.nvim";
# rev = "v${version}";
# hash = "sha256:0ip8xmncp82svlbkphlas88xjvzrpzyy5b1c9x06dqbm4ifai0va";
# };
src = builtins.fetchTarball {
url = "http://github.com/stevearc/aerial.nvim/archive/v${version}.tar.gz";
sha256 = "sha256:0ip8xmncp82svlbkphlas88xjvzrpzyy5b1c9x06dqbm4ifai0va";
};
}

View file

@ -11,6 +11,13 @@
leader_key = ';', -- Recommended to be a single key
buffer_leader_key = 'm', -- Per Buffer Mappings
})
-- prewritten for later
-- require("which-key").add({
-- {";", desc = "Arrow buffers"},
-- {"m", desc = "Arrow marks"}
-- })
'';
};
}

4
plugins/committia.nix Normal file
View file

@ -0,0 +1,4 @@
_:
{
opts.enable = true;
}

View file

@ -8,7 +8,7 @@
# Config from AstroNvim
# https://github.com/AstroNvim/AstroNvim/blob/v4.7.7/lua/astronvim/plugins/heirline.lua
# https://github.com/AstroNvim/AstroNvim/blob/v4.7.7/lua/astronvim/plugins/configs/heirline.lua
config = ''
config = /*lua*/ ''
local status = require("astroui.status")
require("heirline").setup({

View file

@ -36,10 +36,10 @@
action = "rename";
desc = "Rename current symbol";
};
"<leader>lR" = {
action = "rename";
desc = "Search references";
};
# "<leader>lR" = {
# action = "references";
# desc = "Search references";
# };
"<leader>lh" = {
action = "signature_help";
desc = "Signature help";
@ -114,6 +114,7 @@
clangd.enable = true;
marksman.enable = true;
texlab.enable = true;
lemminx.enable = true; # XML
java-language-server.enable = false;
zls.enable = false;

View file

@ -6,4 +6,19 @@ _:{
{ paths = "~/.config/snippets/"; }
];
};
rootOpts.keymaps = [
{
mode = "i";
key = "<C-g>";
action.__raw = ''function() require("luasnip").jump(1) end'';
options.desc = "Jump to next snippet node";
}
{
mode = "i";
key = "<C-h>";
action.__raw = ''function() require("luasnip").jump(-1) end'';
options.desc = "Jump to previous snippet node";
}
];
}

4
plugins/none-ls.nix Normal file
View file

@ -0,0 +1,4 @@
_:
{
opts.enable = true;
}

View file

@ -4,13 +4,13 @@ _: {
keymaps = [
{
key = "<leader>O";
action = "function() require('oil').toggle_float() end";
action = "<Cmd>Oil<Cr>";
options.desc = "Toggle oil floating window";
mode = "n";
}
{
key = "<leader>to";
action = "function() require('oil').toggle_float() end";
action.__raw = "function() require('oil').toggle_float() end";
options.desc = "Toggle oil floating window";
mode = "n";
}

View file

@ -7,6 +7,7 @@ _:
settings = {
ignored_filetypes = [ "nofile" "quickfix" "qf" "prompt" ];
ignored_buftypes = [ "nofile" ];
at_edge = "wrap";
};
};

3
plugins/spider.nix Normal file
View file

@ -0,0 +1,3 @@
_:{
opts.enable = true;
}

1
plugins/surround.nix Normal file
View file

@ -0,0 +1 @@
_:{opts.enable=true;}

View file

@ -104,7 +104,7 @@
}
{
desc = "Find words";
key = "<leader>fg";
key = "<leader>fw";
fn = "live_grep";
}
{
@ -147,15 +147,31 @@
key = "<leader>fC";
fn = "commands";
}
{
desc = "Find man";
key = "<leader>fm";
fn = "man_pages";
}
{
desc = "Find words in all files";
key = "<leader>fm";
fn = "live_grep";
args.additional_args.__raw = ''function(args) return vim.list_extend(args, { "--hidden", "--no-ignore" }) end'';
}
{
desc = "Find themes";
key = "<leader>ft";
fn = "colortheme";
fn = "colorscheme";
args = {
enable_preview = true;
ignore_builtins = true;
};
}
{
desc = "Search diagnostics";
key = "<leader>lD";
fn = "diagnostics";
}
];
};
}

View file

@ -8,7 +8,12 @@
enable = true;
# Enable treesitter based indentation (use '=' to auto-indent)
settings.indent.enable = true;
settings = {
indent.enable = true;
highlight = {
enable = true;
};
};
# Workaround to enable incremental selection without setting default keymaps (keymaps are set globally)
# This is needed in order to set custom descriptions and avoid to have multiple keymaps
@ -33,7 +38,7 @@
}
{
mode = [ "n" "x" "o" ];
key = ";";
key = "-";
action.__raw = "function() require('nvim-treesitter.textobjects.repeatable_move').repeat_last_move_opposite() end";
options.desc = "Repeat last move in the opposite direction";
}

View file

@ -5,29 +5,48 @@
{
opts = {
enable = true;
icons.group = "";
window.border = "single";
# Disable which-key when in neo-tree or telescope
disable.filetypes = [
"TelescopePrompt"
"neo-tree"
"neo-tree-popup"
];
# Customize section names (prefixed mappings)
registrations = {
"<leader>b".name = "${icons.Tab} Buffers";
"<leader>bs".name = "${icons.Sort} Sort Buffers";
"<leader>d".name = "${icons.Debugger} Debugger";
"<leader>f".name = "${icons.Search} Find";
"<leader>g".name = "${icons.Git} Git";
"<leader>l".name = "${icons.ActiveLSP} Language Tools";
"<leader>m".name = " Markdown";
"<leader>s".name = "${icons.Session} Session";
"<leader>t".name = "${icons.Terminal} Terminal";
"<leader>u".name = "${icons.Window} UI/UX";
settings = {
icons.group = "";
window.border = "single";
# Customize section names (prefixed mappings)
spec = [
{ __unkeyed = "<leader>b"; group = "Buffers"; icon = icons.Tab; }
{ __unkeyed = "<leader>bs"; group = "Sort Buffers"; icon = icons.Sort;}
{ __unkeyed = "<leader>d"; group = "Debugger"; icon = icons.Debugger;}
{ __unkeyed = "<leader>f"; group = "Find"; icon = icons.Search;}
{ __unkeyed = "<leader>g"; group = "Git"; icon = icons.Git;}
{ __unkeyed = "<leader>l"; group = "Language Tools"; icon = icons.ActiveLSP;}
{ __unkeyed = "<leader>m"; group = " Markdown"; }
{ __unkeyed = "<leader>s"; group = "Session"; icon = icons.Session;}
{ __unkeyed = "<leader>t"; group = "Terminal"; icon = icons.Terminal;}
{ __unkeyed = "<leader>u"; group = "UI/UX"; icon = icons.Window;}
];
disable.ft = [
"TelescopePrompt"
"neo-tree"
"neo-tree-popup"
];
};
# registrations = {
# "<leader>b".name = "${icons.Tab} Buffers";
# "<leader>bs".name = "${icons.Sort} Sort Buffers";
# "<leader>d".name = "${icons.Debugger} Debugger";
# "<leader>f".name = "${icons.Search} Find";
# "<leader>g".name = "${icons.Git} Git";
# "<leader>l".name = "${icons.ActiveLSP} Language Tools";
# "<leader>m".name = " Markdown";
# "<leader>s".name = "${icons.Session} Session";
# "<leader>t".name = "${icons.Terminal} Terminal";
# "<leader>u".name = "${icons.Window} UI/UX";
# };
};
# Enable catppuccin colors

View file

@ -0,0 +1,7 @@
{lib, pkgs, ...}:{
extra = {
packages = [
(import ./package.nix { inherit lib pkgs; })
];
};
}

View file

@ -0,0 +1,21 @@
{ pkgs, ...}:
let
version = "b1e70b6fc1682a83929aee63680d2b43456fe9a5";
owner = "nanotee";
repo = "zoxide.vim";
in
pkgs.vimUtils.buildVimPlugin {
name = "zoxide.vim";
inherit version;
src = builtins.fetchTarball {
url = "http://github.com/${owner}/${repo}/archive/${version}.tar.gz";
sha256 = "sha256:025rqfs0n2ryi7xwzpq5h2r7jhvxbrb2gjp6fqa072hapgqr0igb";
};
# src = pkgs.fetchFromGitHub {
# owner = "nanotee";
# repo = "zoxide.vim";
# rev = version;
# hash = "";
# };
}

View file

@ -41,7 +41,8 @@
GitSign = "";
GitStaged = "";
GitUnstaged = "";
GitUntracked = "";
GitUntracked.__raw = "require('astroui').get_icon('GitUntracked')"; # TODO: this should be all the signs (or even a function)
# GitUntracked = "★";
LSPLoading1 = "";
LSPLoading2 = "󰀚";
LSPLoading3 = "";