neovim - completion and snippets

This commit is contained in:
Aria Nolan 2024-02-25 21:48:51 -05:00
parent 3ae435fcd4
commit 5ff463bab3
4 changed files with 51 additions and 125 deletions

View file

@ -21,27 +21,6 @@
"type": "github"
}
},
"crane": {
"inputs": {
"nixpkgs": [
"helix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1701025348,
"narHash": "sha256-42GHmYH+GF7VjwGSt+fVT1CQuNpGanJbNgVHTAZppUM=",
"owner": "ipetkov",
"repo": "crane",
"rev": "42afaeb1a0325194a7cdb526332d2cb92fddd07b",
"type": "github"
},
"original": {
"owner": "ipetkov",
"repo": "crane",
"type": "github"
}
},
"darwin": {
"inputs": {
"nixpkgs": [
@ -135,24 +114,6 @@
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1694529238,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_3"
},
"locked": {
"lastModified": 1701680307,
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
@ -189,28 +150,6 @@
"type": "github"
}
},
"helix": {
"inputs": {
"crane": "crane",
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs_2",
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1708790351,
"narHash": "sha256-sIulGqVSTOsV4tbX2Ph72106sjkpHOnxFNQrgYj3SLs=",
"owner": "helix-editor",
"repo": "helix",
"rev": "6db666fce1fb4627c06d147554b8e1eb9970619e",
"type": "github"
},
"original": {
"owner": "helix-editor",
"ref": "master",
"repo": "helix",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@ -348,22 +287,6 @@
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1700794826,
"narHash": "sha256-RyJTnTNKhO0yqRpDISk03I/4A67/dp96YRxc86YOPgU=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "5a09cb4b393d58f9ed0d9ca1555016a8543c2ac8",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1708655239,
"narHash": "sha256-ZrP/yACUvDB+zbqYJsln4iwotbH6CTZiTkANJ0AgDv4=",
@ -422,7 +345,7 @@
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat_3",
"flake-utils": "flake-utils_2",
"flake-utils": "flake-utils",
"gitignore": "gitignore",
"nixpkgs": [
"nixvim",
@ -450,40 +373,14 @@
"root": {
"inputs": {
"agenix": "agenix",
"helix": "helix",
"home-manager": "home-manager_2",
"nix-matlab": "nix-matlab",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_3",
"nixpkgs": "nixpkgs_2",
"nixvim": "nixvim",
"nur": "nur"
}
},
"rust-overlay": {
"inputs": {
"flake-utils": [
"helix",
"flake-utils"
],
"nixpkgs": [
"helix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1701137803,
"narHash": "sha256-0LcPAdql5IhQSUXJx3Zna0dYTgdIoYO7zUrsKgiBd04=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "9dd940c967502f844eacea52a61e9596268d4f70",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
@ -513,21 +410,6 @@
"repo": "default",
"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"
}
}
},
"root": "root",

View file

@ -6,17 +6,14 @@
extra-substituters = [
# Nix community's cache server
"https://nix-community.cachix.org"
"https://helix.cachix.org"
];
extra-trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs="
];
};
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
helix.url = "github:helix-editor/helix/master";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
@ -40,7 +37,6 @@
self,
nixpkgs,
home-manager,
helix,
nixos-hardware,
nur,
agenix,

View file

@ -23,11 +23,12 @@
"$HOME/.dotnet"
];
packages = with pkgs; [
fd
ripgrep
matlab
octave
mpv
krita
notesnook
tree
gimp
r2modman

View file

@ -38,6 +38,14 @@
plugins = {
lualine = {
enable = true;
sectionSeparators = {
left = "";
right = "";
};
componentSeparators = {
left = "";
right = "";
};
};
lsp = {
enable = true;
@ -47,6 +55,45 @@
};
};
};
nvim-cmp = {
enable = true;
sources = [
{ name = "nvim_lsp"; }
{ name = "treesitter"; }
{ name = "luasnip"; }
{ name = "latex_symbols"; }
{ name = "path"; }
{ name = "buffer"; }
];
completion = {
autocomplete = false;
};
mapping = {
"<C-Space>" = "cmp.mapping.complete()";
"<C-e>" = "cmp.mapping.close()";
"<CR>" = "cmp.mapping.confirm({ select = true })";
"<C-b>" = "cmp.mapping.scroll_docs(-4)";
"<C-f>" = "cmp.mapping.scroll_docs(4)";
"<C-p>" = {
action = "cmp.mapping.select_prev_item()";
modes = [
"i"
"s"
];
};
"<C-n>" = {
action = "cmp.mapping.select_next_item()";
modes = [
"i"
"s"
];
};
};
};
luasnip = {
enable = true;
};
friendly-snippets.enable = true;
gitsigns = {
enable = true;
};