1
0
forked from extern/zaneyos

Start Using Neovim / Nixvim

This commit is contained in:
Tyler Kelley 2024-02-05 14:18:53 -06:00
parent ae4c00a20a
commit 22807a7a4c
7 changed files with 50 additions and 11 deletions

View File

@ -24,7 +24,7 @@
flake-rebuild="sudo nixos-rebuild switch --flake ${flakeDir}";
flake-update="sudo nix flake update ${flakeDir}";
gcCleanup="nix-collect-garbage --delete-old && sudo nix-collect-garbage -d && sudo /run/current-system/bin/switch-to-configuration boot";
v="vim";
v="nvim";
ls="lsd";
ll="lsd -l";
la="lsd -a";

View File

@ -12,7 +12,7 @@ in {
settings = {
scrollback_lines = 2000;
wheel_scroll_min_lines = 1;
window_padding_width = 6;
window_padding_width = 0;
confirm_os_window_close = 0;
background_opacity = "0.85";
};

View File

@ -7,7 +7,7 @@
pkgs."${browser}" discord libvirt swww grim slurp gnome.file-roller
swaynotificationcenter rofi-wayland imv transmission-gtk mpv
gimp obs-studio blender-hip kdenlive godot_4 rustup audacity
font-awesome spotify swayidle vim neovide neovim pavucontrol
font-awesome spotify swayidle neovide pavucontrol
element-desktop swaylock
(nerdfonts.override { fonts = [ "JetBrainsMono" ]; })
# Import Scripts

View File

@ -9,6 +9,7 @@
./intel-amd.nix
./intel-gpu.nix
./intel-nvidia.nix
./neovim.nix
./nvidia.nix
./packages.nix
./polkit.nix

43
config/system/neovim.nix Normal file
View File

@ -0,0 +1,43 @@
{ config, pkgs, ... }:
let
plugins = pkgs.vimPlugins;
in {
programs.nixvim = {
enable = true;
extraPlugins = [
plugins.telescope-nvim
plugins.rose-pine
plugins.nvim-treesitter
plugins.nvim-treesitter.withAllGrammars
];
colorscheme = "rose-pine";
globals.mapleader = " "; # Sets the leader key to space
extraConfigLua = ''
local builtin = require('telescope.builtin')
vim.keymap.set('n', '<leader>f', builtin.find_files, {})
vim.keymap.set('n', '<leader>s', function()
builtin.grep_string({ search = vim.fn.input("Grep > ") })
end)
'';
keymaps = [
{
mode = "n";
key = "<leader>tf";
options.silent = false;
action = "<cmd>Ex<CR>";
}
];
options = {
number = true; # Show line numbers
relativenumber = true; # Show relative line numbers
shiftwidth = 2; # Tab width should be 2
};
};
}

View File

@ -17,16 +17,10 @@ in {
pkg-config meson hugo gnumake ninja go nodejs symbola
noto-fonts-color-emoji material-icons brightnessctl
toybox virt-viewer jetbrains.pycharm-community-bin
swappy
swappy ripgrep
(pkgs.python3.withPackages my-python-packages)
];
programs.nixvim = {
enable = true;
colorschemes.gruvbox.enable = true;
plugins.lightline.enable = true;
};
programs.steam.gamescopeSession.enable = true;
programs.dconf.enable = true;
programs.hyprland = {

View File

@ -30,7 +30,7 @@
theKBDLayout = "us";
theLCVariables = "en_US.UTF-8";
theTimezone = "America/Chicago";
theme = "tokyo-night-storm";
theme = "rose-pine";
waybarStyle = "style2"; # can be style1-2
borderAnim = "on"; # anything other than on disables anim borders in Hyprland
browser = "firefox";
@ -66,6 +66,7 @@
inherit wallpaperDir; inherit wallpaperGit;
inherit cpuType; inherit theKBDLayout;
inherit theLCVariables; inherit gpuType;
inherit theme;
};
modules = [ ./system.nix
home-manager.nixosModules.home-manager {