Migrate nvim from dotter to home-manager

This commit is contained in:
Julian Mutter 2024-01-27 10:59:10 +01:00
parent ec6be592cb
commit eafd193306
2 changed files with 57 additions and 4 deletions

View File

@ -1,2 +1,2 @@
includes = [".dotter/laptop.toml"]
packages = ["nvim", "emacs", "i3", "starship", "zsh"]
packages = ["emacs", "i3", "starship", "zsh"]

View File

@ -9,9 +9,12 @@
home.packages = with pkgs; [
# Code formatters for use with doom emacs
nixfmt
dockfmt
google-java-format
nixfmt # nix
dockfmt # docker
google-java-format # java
# Lsps for use with doom emacs
# neocmakelsp # cmake
# Rust setup
rustc
@ -28,6 +31,56 @@
# '')
];
programs = {
neovim = let
toLua = str: ''
lua << EOF
${str}
EOF
'';
in {
# https://www.youtube.com/watch?v=YZAnJ0rwREA
enable = true;
viAlias = true;
vimAlias = true;
# vimdiffAlias = true;
plugins = with pkgs.vimPlugins; [
{
plugin = dracula-nvim;
config = "colorscheme dracula";
}
{
plugin = comment-nvim;
config = toLua ''require("Comment").setup()'';
}
# nix file support
vim-nix
# Syntax highlighting
(nvim-treesitter.withPlugins (p: [
p.tree-sitter-nix
p.tree-sitter-vim
p.tree-sitter-bash
p.tree-sitter-lua
p.tree-sitter-python
p.tree-sitter-json
p.tree-sitter-cpp
p.tree-sitter-rust
]))
];
# extraLuaConfig = "\n";
extraLuaConfig = ''
vim.o.termguicolors = true
'';
};
};
home.file = {
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
# # the Nix store. Activating the configuration will then make '~/.screenrc' a