Skip to content

Commit

Permalink
replacing neovim with helix
Browse files Browse the repository at this point in the history
  • Loading branch information
orzklv committed Aug 3, 2024
1 parent 67f1d86 commit d22aa0f
Show file tree
Hide file tree
Showing 9 changed files with 73 additions and 793 deletions.
1 change: 1 addition & 0 deletions home/muzaffar.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
}: {
imports = [
outputs.homeManagerModules.zsh
outputs.homeManagerModules.helix
outputs.homeManagerModules.nixpkgs
outputs.homeManagerModules.packages
];
Expand Down
2 changes: 1 addition & 1 deletion home/sakhib.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
}: {
imports = [
outputs.homeManagerModules.zsh
outputs.homeManagerModules.neovim
outputs.homeManagerModules.helix
outputs.homeManagerModules.nixpkgs
outputs.homeManagerModules.topgrade
outputs.homeManagerModules.packages
Expand Down
2 changes: 1 addition & 1 deletion home/shakhzod.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
}: {
imports = [
outputs.homeManagerModules.zsh
outputs.homeManagerModules.neovim
outputs.homeManagerModules.helix
outputs.homeManagerModules.nixpkgs
outputs.homeManagerModules.topgrade
outputs.homeManagerModules.packages
Expand Down
2 changes: 1 addition & 1 deletion modules/home/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
# List your module files here
zsh = import ./zsh;
neovim = import ./neovim;
helix = import ./helix;
nixpkgs = import ./nixpkgs;
topgrade = import ./topgrade;
packages = import ./packages;
Expand Down
101 changes: 66 additions & 35 deletions modules/home/neovim/default.nix → modules/home/helix/default.nix
Original file line number Diff line number Diff line change
@@ -1,39 +1,67 @@
{
inputs,
pkgs,
...
}: {
imports = [];

xdg.configFile = {
# astronvim's config
"nvim".source = inputs.astronvim;

# my custom astronvim config, astronvim will load it after base config
# https://github.com/AstroNvim/AstroNvim/blob/v3.32.0/lua/astronvim/bootstrap.lua#L15-L16
"astronvim/lua/user".source = ./user;
};

nixpkgs.config = {
programs.npm.npmrc = ''
prefix = ''${HOME}/.npm-global
'';
};

programs = {
neovim = {
{ pkgs, ... }: {
config = {
programs.helix = {
enable = true;

defaultEditor = true;
viAlias = true;
vimAlias = true;

# currently we use lazy.nvim as neovim's package manager, so comment this one.
# plugins = with pkgs.vimPlugins; [
# # search all the plugins using https://search.nixos.org/packages
# ];
settings = {
theme = "autumn_night";

editor = {
line-number = "relative";

cursor-shape = {
insert = "bar";
normal = "block";
select = "underline";
};

file-picker = {
hidden = false;
git-ignore = true;
git-global = true;
};

lsp = {
enable = true;
display-messages = true;
display-inlay-hints = true;
};

statusline = {
left = [ "mode" "spinner" "read-only-indicator" "file-modification-indicator" ];

center = [ "file-name" ];

right = [
"diagnostics"
"selections"
"position"
"file-encoding"
"file-line-ending"
"file-type"
];

separator = "│";

mode = {
normal = "SLAVE";
insert = "MASTER";
select = "DUNGEON";
};
};
};

keys.normal = {
# Easy window movement
"C-left" = "jump_view_left";
"C-right" = "jump_view_right";
"C-up" = "jump_view_up";
"C-down" = "jump_view_down";

"C-r" = ":reload";
};
};

# Extra packages only available to nvim(won't pollute the global home environment)
extraPackages = with pkgs;
[
#-- c/c++
Expand Down Expand Up @@ -71,6 +99,10 @@

#-- nix
nil
nixd
nixpkgs-fmt
nixpkgs-lint

# nixd
statix # Lints and suggestions for the nix programming language
deadnix # Find and remove unused code in .nix source files
Expand Down Expand Up @@ -134,11 +166,10 @@
#-- Optional Requirements:
gdu # disk usage analyzer, required by AstroNvim
ripgrep # fast search tool, required by AstroNvim's '<leader>fw'(<leader> is space key)
git # git
]
++ (
if pkgs.stdenv.isDarwin
then []
then [ ]
else [
#-- verilog / systemverilog
verible
Expand Down
228 changes: 0 additions & 228 deletions modules/home/neovim/readme.md

This file was deleted.

Loading

0 comments on commit d22aa0f

Please sign in to comment.