big nvim updates
Lint / lint (push) Failing after 2m40s Details

new
Vivian 2024-03-19 10:14:30 +01:00
parent 868112e4cc
commit 86e4c4b78d
4 changed files with 112 additions and 61 deletions

View File

@ -1,3 +1,3 @@
{ ... }: {
imports = [ ./catppuccin.nix ./nvim.nix ./riff.nix ./vscode.nix ./git.nix ./rust.nix ];
imports = [ ./catppuccin.nix ./nvim ./riff.nix ./vscode.nix ./git.nix ./rust.nix ];
}

View File

@ -3,6 +3,7 @@ let cfg = config.programs.v.nvim;
in with lib; {
options.programs.v.nvim = { enable = mkEnableOption "nvim"; };
config = mkIf cfg.enable {
home.packages = with pkgs; [ fd ];
programs.nixvim = {
enable = true;
package = pkgs.neovim-unwrapped;
@ -13,14 +14,13 @@ in with lib; {
options.number = true;
clipboard = { providers.wl-copy.enable = true; };
clipboard.providers.wl-copy.enable = true;
keymaps = [
{
mode = "n";
key = "<leader>ff";
action = "require('telescope.builtin').find_files";
lua = true;
action = ":Telescope file_browser<CR>";
}
{
mode = "n";
@ -28,6 +28,11 @@ in with lib; {
action = "require('telescope.builtin').live_grep";
lua = true;
}
{
mode = "n";
key = "<leader>fb";
action = ":Telescope file_browser<CR>";
}
{
mode = "n";
key = "<C-_>";
@ -48,12 +53,6 @@ in with lib; {
'';
lua = true;
}
{
mode = "n";
key = "g=";
action = "vim.lsp.buf.format";
lua = true;
}
{
mode = "n";
key = "t";
@ -75,6 +74,7 @@ in with lib; {
key = "<S-C-Tab>";
action = ":bp<CR>";
}
# Change Indenting
{
mode = "n";
key = "<S-Tab>";
@ -90,14 +90,36 @@ in with lib; {
key = "<S-Tab>";
action = "<gv";
}
# Neotest
{
mode = "n";
key = "<leader>nr";
lua = true;
action = "require('neotest').run.run";
}
{
mode = "n";
key = "<leader>no";
lua = true;
action = "require('neotest').output.open";
}
{
mode = "n";
key = "<leader>ns";
lua = true;
action = "require('neotest').run.stop";
}
{
mode = "n";
key = "<leader>nf";
lua = true;
action = "function() require('neotest').run.run(vim.fn.expand('%')) end";
}
];
extraPlugins = with pkgs.vimPlugins; [
FixCursorHold-nvim
plenary-nvim
neotest
neotest-plenary
neotest-rust
nvim-web-devicons
];
colorschemes.catppuccin = {
@ -105,21 +127,32 @@ in with lib; {
flavour = "frappe";
};
extraConfigLua = ''
require("neotest").setup({
adapters = {
require("neotest-plenary"),
require("neotest-rust") {
args = { "--no-capture" },
}
},
})
'';
extraConfigLua = "";
plugins = {
bufferline.enable = true;
nix.enable = true;
luasnip.enable = true;
typst-vim.enable = true;
fidget = {
enable = true;
progress = {
ignoreDoneAlready = true;
ignore = [ "ltex" ];
};
notification = {
overrideVimNotify = true;
# group_seperator = "";
};
};
neotest = {
enable = true;
adapters.plenary.enable = true;
adapters.rust = {
enable = true;
settings.args = [ "--no-capture" ];
};
};
treesitter = {
enable = true;
nixGrammars = true;
@ -134,12 +167,31 @@ in with lib; {
};
telescope = {
enable = true;
extensions.file_browser = {
enable = true;
hijackNetrw = true;
};
extensions.fzf-native.enable = true;
extensions.fzf-native.fuzzy = true;
};
comment-nvim = { enable = true; };
lsp = {
enable = true;
keymaps = {
lspBuf = {
K = "hover";
gD = "references";
gd = "definition";
gi = "implementation";
gt = "type_definition";
"g=" = "format";
};
diagnostic = {
"<leader>j" = "goto_next";
"<leader>k" = "goto_prev";
};
};
servers = {
nil_ls.enable = true;
dockerls.enable = true;

View File

@ -710,11 +710,11 @@
"systems": "systems_6"
},
"locked": {
"lastModified": 1709126324,
"narHash": "sha256-q6EQdSeUZOG26WelxqkmR7kArjgWCdw5sfJVHPH/7j8=",
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "d465f4819400de7c8d874d50b982301f28a84605",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
@ -897,11 +897,11 @@
]
},
"locked": {
"lastModified": 1710714957,
"narHash": "sha256-eZCxuF58YWgaJMMRrn8oRkwRhxooe5kBS/s2wRVr9PA=",
"lastModified": 1710820906,
"narHash": "sha256-2bNMraoRB4pdw/HtxgYTFeMhEekBZeQ53/a8xkqpbZc=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "7b3fca5adcf6c709874a8f2e0c364fe9c58db989",
"rev": "022464438a85450abb23d93b91aa82e0addd71fb",
"type": "github"
},
"original": {
@ -918,11 +918,11 @@
]
},
"locked": {
"lastModified": 1710281778,
"narHash": "sha256-bvWr9vvBrAxb44kHM3H3cY/uQg+4pYP1BM/Nu3e/7V8=",
"lastModified": 1710714957,
"narHash": "sha256-eZCxuF58YWgaJMMRrn8oRkwRhxooe5kBS/s2wRVr9PA=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "49a266d2ca59df8a03249550e73a54626181b65d",
"rev": "7b3fca5adcf6c709874a8f2e0c364fe9c58db989",
"type": "github"
},
"original": {
@ -944,11 +944,11 @@
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1710171982,
"narHash": "sha256-WFMB+Yohcvego1/vOtaq+MJ8Wvp5meOANfNifg26Ie4=",
"lastModified": 1710754079,
"narHash": "sha256-i2GEmGDjFP8K86x5OcH0JbCoYZqLW5H+P866pVTSxU4=",
"owner": "nix-community",
"repo": "lanzaboote",
"rev": "19ad7fd5724f30868748b8156ff25be838cd2bc5",
"rev": "67dbf85b7c35b5e0be476facf1b360b791e4a3ae",
"type": "github"
},
"original": {
@ -1018,11 +1018,11 @@
"spectrum": "spectrum"
},
"locked": {
"lastModified": 1710327053,
"narHash": "sha256-5S3jnObtWfXlTx00KzsPwpJtDoyfa1WpZnCrWnxovcw=",
"lastModified": 1710760349,
"narHash": "sha256-yqGeSnAB3Yeg02jtitzSGIuE21kq7+pWAdeGK3F9/cY=",
"owner": "astro",
"repo": "microvm.nix",
"rev": "d535b9b6c9f6612e323d4504660ebbdcd1bd79bd",
"rev": "0e2223d8fd459725850bd9aff7e9d68ec329769a",
"type": "github"
},
"original": {
@ -1101,11 +1101,11 @@
]
},
"locked": {
"lastModified": 1710281379,
"narHash": "sha256-uFo9hxt982L3nFJeweW4Gip2esiGrIQlbvEGrNTh4AY=",
"lastModified": 1710717205,
"narHash": "sha256-Wf3gHh5uV6W1TV/A8X8QJf99a5ypDSugY4sNtdJDe0A=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "d9ea313bc4851670dc99c5cc979cb79750e7d670",
"rev": "bcc8afd06e237df060c85bad6af7128e05fd61a3",
"type": "github"
},
"original": {
@ -1168,11 +1168,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1710622004,
"narHash": "sha256-6zR642tXcZzzk3C8BHxlCrR0yh8z8zMXLiuXpWDIpX0=",
"lastModified": 1710783728,
"narHash": "sha256-eIsfu3c9JUBgm3cURSKTXLEI9Dlk1azo+MWKZVqrmkc=",
"owner": "nixos",
"repo": "nixos-hardware",
"rev": "968952f950a59dee9ed1e8799dda38c6dfa1bad3",
"rev": "1e679b9a9970780cd5d4dfe755a74a8f96d33388",
"type": "github"
},
"original": {
@ -1393,11 +1393,11 @@
},
"nixpkgs_7": {
"locked": {
"lastModified": 1710716398,
"narHash": "sha256-HfuWX+8cykZsLWw2Kj6AbN1l6ZH8yB7vxjOKD8C0008=",
"lastModified": 1710803033,
"narHash": "sha256-7sRXMRZPHUbHY9n3unU5/2SxT50MH9uJAFr1vkjiQYc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ca0de94ebb9a7c06447285310777567afd0053aa",
"rev": "c2f60aeadc7af3f832c1ffa86bae06518d227fbf",
"type": "github"
},
"original": {
@ -1408,11 +1408,11 @@
},
"nixpkgs_8": {
"locked": {
"lastModified": 1710272261,
"narHash": "sha256-g0bDwXFmTE7uGDOs9HcJsfLFhH7fOsASbAuOzDC+fhQ=",
"lastModified": 1710631334,
"narHash": "sha256-rL5LSYd85kplL5othxK5lmAtjyMOBg390sGBTb3LRMM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "0ad13a6833440b8e238947e47bea7f11071dc2b2",
"rev": "c75037bbf9093a2acb617804ee46320d6d1fea5a",
"type": "github"
},
"original": {
@ -1449,11 +1449,11 @@
"pre-commit-hooks": "pre-commit-hooks"
},
"locked": {
"lastModified": 1710634405,
"narHash": "sha256-e+EHQGqqjpvkln6vYmiAcafFKbTaze3XF7DEjDZyXGY=",
"lastModified": 1710799652,
"narHash": "sha256-TWX1slRN1IQcalrY64ltQUpVhbxGnT0PaIHqNcC0VtY=",
"owner": "pta2002",
"repo": "nixvim",
"rev": "939530edca29b44e65d8bd606ef3485346510ebe",
"rev": "975f1ca526e37c9cb9c646399f03613ea77f5ec2",
"type": "github"
},
"original": {
@ -1464,11 +1464,11 @@
},
"nur": {
"locked": {
"lastModified": 1710750753,
"narHash": "sha256-MQ5haKyTNKAFTw3oDaShLHiECiD5DVV4HfmzN3l77Yk=",
"lastModified": 1710833135,
"narHash": "sha256-vtF350PUNgnQpVSy0EPS5uwza8gIFpaIx9dDk14EWI4=",
"owner": "nix-community",
"repo": "NUR",
"rev": "05351320d5ece2eb43cbd991edd4d1f56f5ca17f",
"rev": "cee2a9bfe726df39af812591e8b17e8a2f319bd5",
"type": "github"
},
"original": {
@ -1671,11 +1671,11 @@
]
},
"locked": {
"lastModified": 1710036830,
"narHash": "sha256-pnV4gO3N/7/GzyRSKTRlSfS/19KJiPSvYcL4apnSkoQ=",
"lastModified": 1710641527,
"narHash": "sha256-R9JZEevtSyg7++LEryYJRrfyEe45azJxmu2k9VezEW0=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "d09dac6a63a2ac4b74ac2ecdc19acd8c46c2da2c",
"rev": "50db54295d3922a3b7a40d580b84d75150b36c34",
"type": "github"
},
"original": {

View File

@ -106,7 +106,6 @@ in {
kernel.sysctl = { "fs.inotify.max_user_watches" = 524288; };
};
services = {
gnome.gnome-keyring.enable = true;
udisks2.enable = true;