Refactored nvim config; Using master upstram of nixvim

This commit is contained in:
xqtc161 2024-03-13 18:00:41 +01:00
parent 1606790e9d
commit 637d16e3f5
6 changed files with 231 additions and 61 deletions

View file

@ -9,11 +9,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1708939976, "lastModified": 1710156081,
"narHash": "sha256-O5+nFozxz2Vubpdl1YZtPrilcIXPcRAjqNdNE8oCRoA=", "narHash": "sha256-4PMY6aumJi5dLFjBzF5O4flKXmadMNq3AGUHKYfchh0=",
"owner": "numtide", "owner": "numtide",
"repo": "devshell", "repo": "devshell",
"rev": "5ddecd67edbd568ebe0a55905273e56cc82aabe3", "rev": "bc68b058dc7e6d4d6befc4ec6c60082b6e844b7d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -29,11 +29,11 @@
}, },
"locked": { "locked": {
"dir": "pkgs/firefox-addons", "dir": "pkgs/firefox-addons",
"lastModified": 1709784245, "lastModified": 1710329340,
"narHash": "sha256-t1sobS2zj7hD/dZj9aVPipYnskrk+Q7FqAViSqEMLQU=", "narHash": "sha256-EL1wI4vyZsT0bUT8t5ZOPS+UrVZ6NKsQtKwxOSmZm6Q=",
"owner": "rycee", "owner": "rycee",
"repo": "nur-expressions", "repo": "nur-expressions",
"rev": "673c3faea3a5239f4efe545c4649c2b68501dbe1", "rev": "2587d46d5904de710b56a9f359579a165c38ee55",
"type": "gitlab" "type": "gitlab"
}, },
"original": { "original": {
@ -114,11 +114,11 @@
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1709126324, "lastModified": 1710146030,
"narHash": "sha256-q6EQdSeUZOG26WelxqkmR7kArjgWCdw5sfJVHPH/7j8=", "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "d465f4819400de7c8d874d50b982301f28a84605", "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -192,11 +192,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1709764752, "lastModified": 1710329147,
"narHash": "sha256-+lM4J4JoJeiN8V+3WSWndPHj1pJ9Jc1UMikGbXLqCTk=", "narHash": "sha256-ExKfXL6PURo5VJ9bNPkOxCNBlRDoPILeCfUrMyJ20i0=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "cf111d1a849ddfc38e9155be029519b0e2329615", "rev": "1b74e3679e90fe7ad142bb5f66610a0d92ac0165",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -214,11 +214,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1709578243, "lastModified": 1710062421,
"narHash": "sha256-hF96D+c2PBmAFhymMw3z8hou++lqKtZ7IzpFbYeL1/Y=", "narHash": "sha256-FiCNRfyUgJOLYIokLiFsfI7B+Zn9HDnOzFR3uVr5qsQ=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "23ff9821bcaec12981e32049e8687f25f11e5ef3", "rev": "36f873dfc8e2b6b89936ff3e2b74803d50447e0a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -235,11 +235,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1709554374, "lastModified": 1709771483,
"narHash": "sha256-1yYgwxBzia+QrOaQaZ6YKqGFfiQcSBwYLzd9XRsRLQY=", "narHash": "sha256-Hjzu9nCknHLQvhdaRFfCEprH0o15KcaNu1QDr3J88DI=",
"owner": "lnl7", "owner": "lnl7",
"repo": "nix-darwin", "repo": "nix-darwin",
"rev": "daa03606dfb5296a22e842acb02b46c1c4e9f5e7", "rev": "550340062c16d7ef8c2cc20a3d2b97bcd3c6b6f6",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -250,11 +250,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1709410583, "lastModified": 1710123225,
"narHash": "sha256-esOSUoQ7mblwcsSea0K17McZuwAIjoS6dq/4b83+lvw=", "narHash": "sha256-j3oWlxRZxB7cFsgEntpH3rosjFHRkAo/dhX9H3OfxtY=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "59e37017b9ed31dee303dbbd4531c594df95cfbc", "rev": "ad2fd7b978d5e462048729a6c635c45d3d33c9ba",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -282,11 +282,11 @@
}, },
"nixpkgs-master": { "nixpkgs-master": {
"locked": { "locked": {
"lastModified": 1709840082, "lastModified": 1710329155,
"narHash": "sha256-IE6KVI305U3Oy2J7Wz+hnllqy1SqUapUUT2BaSEJ2F4=", "narHash": "sha256-HvOKJXyu0JJuTGHHHw3gdiXgvWnyDkOyX42Nmnc2fDk=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "76716d32209e34054ca9dfb0dd69270713d3a7e3", "rev": "a6af0d92679222ba704841a6515d9a7e022af6fd",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -298,11 +298,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1709703039, "lastModified": 1710272261,
"narHash": "sha256-6hqgQ8OK6gsMu1VtcGKBxKQInRLHtzulDo9Z5jxHEFY=", "narHash": "sha256-g0bDwXFmTE7uGDOs9HcJsfLFhH7fOsASbAuOzDC+fhQ=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "9df3e30ce24fd28c7b3e2de0d986769db5d6225d", "rev": "0ad13a6833440b8e238947e47bea7f11071dc2b2",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -325,17 +325,16 @@
"pre-commit-hooks": "pre-commit-hooks" "pre-commit-hooks": "pre-commit-hooks"
}, },
"locked": { "locked": {
"lastModified": 1709760463, "lastModified": 1710283972,
"narHash": "sha256-gKP997+xtyWvJXBjnAaiT/Dmk22wo1T/DzkNMDk9GHU=", "narHash": "sha256-kkN0CJwykU4XoTDLHG68eEBXyp+GLTp7eJGDVrI7QIU=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixvim", "repo": "nixvim",
"rev": "22b587f3dc5c040eb1916aa2a67868f1918d9d17", "rev": "c2cd3cb7a13c0677c49f46d55a8c65b50b7d9431",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"repo": "nixvim", "repo": "nixvim",
"rev": "22b587f3dc5c040eb1916aa2a67868f1918d9d17",
"type": "github" "type": "github"
} }
}, },

View file

@ -13,7 +13,8 @@
inputs.nixos-hardware.url = "github:NixOS/nixos-hardware/master"; inputs.nixos-hardware.url = "github:NixOS/nixos-hardware/master";
inputs.nixvim = { inputs.nixvim = {
# If you are not running an unstable channel of nixpkgs, select the corresponding branch of nixvim. # If you are not running an unstable channel of nixpkgs, select the corresponding branch of nixvim.
url = "github:nix-community/nixvim/22b587f3dc5c040eb1916aa2a67868f1918d9d17"; #url = "github:nix-community/nixvim/22b587f3dc5c040eb1916aa2a67868f1918d9d17";
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };

View file

@ -36,7 +36,7 @@ input {
device { device {
name = at-translated-set-2-keyboard name = at-translated-set-2-keyboard
enabled = false enabled = true
} }
general { general {

View file

@ -31,6 +31,8 @@
nodejs nodejs
nerdfonts nerdfonts
ipafont
vivaldi vivaldi
vivaldi-ffmpeg-codecs vivaldi-ffmpeg-codecs
@ -50,6 +52,8 @@
neovide neovide
ripgrep
yubioath-flutter yubioath-flutter
steam steam

View file

@ -63,24 +63,34 @@
navigation.enable = true; navigation.enable = true;
}; };
cursorline.enable = true; cursorline.enable = true;
nvim-cmp = { cmp = {
enable = true; enable = true;
autoEnableSources = true; autoEnableSources = true;
settings = {
snippet = {
expand = "function(args) require('luasnip').lsp_expand(args.body) end";
};
sources = [ sources = [
{name = "nvim_lsp";} {name = "nvim_lsp";}
{name = "path";} {name = "path";}
{name = "buffer";} {name = "buffer";}
{name = "luasnip";} {name = "luasnip";}
]; ];
#mapping = {
snippet.expand = "luasnip"; # __raw = ''
# cmp.mapping.preset.insert({
# ['<Tab>'] =
# })
# '';
#};
mapping = { mapping = {
"<CR>" = "cmp.mapping.confirm({ select = true })"; "<CR>" = ''
"<Tab>" = { cmp.mapping.confirm({ select = true })
action = '' '';
"<Tab>" = ''
function(fallback) function(fallback)
local luasnip = require 'luasnip' local luasnip = require('luasnip')
if cmp.visible() then if cmp.visible() then
cmp.select_next_item() cmp.select_next_item()
elseif luasnip.expandable() then elseif luasnip.expandable() then
@ -92,7 +102,6 @@
end end
end end
''; '';
modes = ["i" "s"];
}; };
}; };
}; };
@ -104,13 +113,164 @@
noice.enable = true; noice.enable = true;
notify.enable = true; notify.enable = true;
luasnip.enable = true; luasnip.enable = true;
cmp_luasnip.enable = true;
neo-tree.enable = true; neo-tree.enable = true;
presence-nvim.enable = true; presence-nvim.enable = true;
crates-nvim.enable = true; crates-nvim.enable = true;
fidget.enable = true; fidget.enable = true;
alpha = { alpha = {
enable = true; enable = true;
theme = "startify"; theme = null;
iconsEnabled = true;
layout = [
{
type = "padding";
val = 4;
}
{
type = "text";
#val = [
# " config by: "
# " ▒██ ██▒ █████ ▄▄▄█████▓ ▄████▄ "
# " ▒▒ █ █ ▒░▒██▓ ██▒▓ ██▒ ▓▒▒██▀ ▀█ "
# " ░░ █ ░▒██▒ ██░▒ ▓██░ ▒░▒▓█ ▄ "
# " ░ █ █ ▒ ░██ █▀ ░░ ▓██▓ ░ ▒▓▓▄ ▄██▒ "
# " ▒██▒ ▒██▒░▒███▒█▄ ▒██▒ ░ ▒ ▓███▀ ░ "
# " ▒▒ ░ ░▓ ░░░ ▒▒░ ▒ ▒ ░░ ░ ░▒ ▒ ░ "
# " ░░ ░▒ ░ ░ ▒░ ░ ░ ░ ▒ "
# " ░ ░ ░ ░ ░ ░ "
# " ░ ░ ░ ░ ░ "
# " ░ "
# " git@git.sr.ht:xqtc "
#];
val = [
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
" "
];
opts = {
position = "center";
hl = "Type";
};
}
{
type = "padding";
val = 3;
}
{
type = "text";
# val = [
# " ███▄ █ ██▓▒██ ██▒ ██▒ █▓ ██▓ ███▄ ▄███▓"
# " ██ ▀█ █ ▓██▒▒▒ █ █ ▒░▓██░ █▒▓██▒▓██▒▀█▀ ██▒"
# "▓██ ▀█ ██▒▒██▒░░ █ ░ ▓██ █▒░▒██▒▓██ ▓██░"
# "▓██▒ ▐▌██▒░██░ ░ █ █ ▒ ▒██ █░░░██░▒██ ▒██ "
# "▒██░ ▓██░░██░▒██▒ ▒██▒ ▒▀█░ ░██░▒██▒ ░██▒"
# "░ ▒░ ▒ ▒ ░▓ ▒▒ ░ ░▓ ░ ░ ▐░ ░▓ ░ ▒░ ░ ░"
# "░ ░░ ░ ▒░ ▒ ░░░ ░▒ ░ ░ ░░ ▒ ░░ ░ ░"
# " ░ ░ ░ ▒ ░ ░ ░ ░░ ▒ ░░ ░ "
# " ░ ░ ░ ░ ░ ░ ░ "
# " ░ "
# ];
val = [
"TOHA HEAVY INDUSTRIES"
];
opts = {
position = "center";
hl = "Keyword";
};
}
{
type = "padding";
val = 2;
}
{
type = "group";
val = [
{
type = "text";
val = " To browse files press '<leader>ff'";
opts = {
position = "center";
};
}
];
opts = {
position = "center";
};
}
{
type = "padding";
val = 2;
}
{
type = "text";
val = "uwu";
opts = {
position = "center";
hl = "Keyword";
};
}
{
type = "padding";
val = 4;
}
#{
# type = "text";
# val = [
# "      />》, -―‐‐<^}"
# "     ./:::/,≠´::::::ヽ."
# "    /::::〃::::}::丿ハ"
# "   ./:::::i{l|/ ノ/ }::}"
# "   /:::::::瓜イ> ´< ,:ノ"
# "  ./::::::|ノヘ.{、 (_フ_ノイ_"
# "  |:::::::|}`ス / /"
# ". |::::::|(_:::つ/ ThinkPad / neovim!"
# ". ̄ ̄ ̄ ̄ ̄ ̄ ̄\/_____/ ̄ ̄ ̄ ̄ ̄"
# ];
# opts = {
# position = "center";
# hl = "Type";
# };
#}
];
opts = {
#noautocmd = true;
keymap = {
press = "<CR>";
press_queue = "<M-CR>";
};
};
}; };
bufferline.enable = true; bufferline.enable = true;
}; };
@ -121,6 +281,12 @@
options.silent = true; options.silent = true;
action = "<cmd>Telescope file_browser<CR>"; action = "<cmd>Telescope file_browser<CR>";
} }
{
mode = "n";
key = "<leader>hh";
options.silent = true;
action = "<cmd>Alpha<CR>";
}
{ {
mode = "n"; mode = "n";
key = "<leader>bb"; key = "<leader>bb";

View file

@ -150,7 +150,7 @@
wdisplays wdisplays
#qemu_full #qemu_full
gnomeExtensions.blur-my-shell gnomeExtensions.blur-my-shell
surrealdb #surrealdb
zathura zathura
]; ];