add nvim layzyvim config

This commit is contained in:
Florian Schmitt 2023-12-21 16:02:24 +03:00
parent 92f3851041
commit 51fe3dba50
14 changed files with 651 additions and 7 deletions

View file

@ -18,11 +18,11 @@
};
programs = {
mosh.enable = true;
neovim = {
enable = true;
viAlias = true;
vimAlias = true;
};
# neovim = {
# enable = true;
# viAlias = true;
# vimAlias = true;
# };
ssh.startAgent = true;
starship = {
enable = true;
@ -54,6 +54,7 @@
bat
btop
bitwarden-cli
btop
catnip
coreutils
curl

View file

@ -1,10 +1,39 @@
# Inject the right home-manager config for the machine.
{ config, pkgs, lib, ... }:
let
treesitterWithGrammars = (pkgs.vimPlugins.nvim-treesitter.withPlugins (p: [
p.bash
p.comment
p.css
p.dockerfile
p.fish
p.gitattributes
p.gitignore
p.go
p.gomod
p.gowork
p.hcl
p.php
p.javascript
p.jq
p.json5
p.json
p.lua
p.make
p.markdown
p.nix
p.python
p.rust
p.toml
p.typescript
p.vue
p.yaml
]));
in
{
# TODO can we automate the installation of home-manager ?
# sudo nix-channel --add https://github.com/nix-community/home-manager/archive/release-23.11.tar.gz home-manager
{
imports = [<home-manager/nixos>];
# Let Home Manager install and manage itself.
@ -12,6 +41,43 @@
home-manager.users.mrflos = { pkgs, ... }: {
home.stateVersion = "23.05";
home.packages = with pkgs; [
gcc
cmake
ripgrep
fd
lua-language-server
rust-analyzer-unwrapped
php83Packages.composer
nodejs_20
yarn
];
programs.neovim = {
enable = true;
viAlias = true;
vimAlias = true;
coc.enable = false;
plugins = [
treesitterWithGrammars
];
};
home.file."./.config/nvim/" = {
source = ../configs/nvim;
recursive = true;
};
# Treesitter is configured as a locally developed module in lazy.nvim
# we hardcode a symlink here so that we can refer to it in our lazy config
home.file."./.local/share/nvim/nix/nvim-treesitter/" = {
recursive = true;
source = treesitterWithGrammars;
};
accounts.email.accounts = {
"mrflos@chmok.net" = {