[shared] Replace Neovim with Helix

Moved Helix editor to shared.
Removed Nixvim flake and it's config
This commit is contained in:
2025-04-19 17:54:35 +02:00
parent 7e5bc137e5
commit 985a71d901
7 changed files with 38 additions and 402 deletions

View File

@ -1,7 +1,7 @@
{
imports = [
./git.nix
./nixvim
./helix.nix
./zed.nix
];
# TODO set Wayland vmOptions in Jetbrains products, Requires current installed version in path

View File

@ -0,0 +1,33 @@
{ pkgs, theme, ... }:
{
catppuccin.helix = {
enable = true;
flavor = theme.flavor;
};
programs = {
fish.shellAliases.edit = "hx";
helix = {
enable = true;
defaultEditor = true;
settings = {
editor = {
cursor-shape = {
normal = "block";
insert = "bar";
select = "underline";
};
lsp.display-messages = true;
};
};
languages.language = [
{
name = "nix";
auto-format = true;
formatter.command = "${pkgs.nixfmt-rfc-style}/bin/nixfmt";
}
];
};
};
}

View File

@ -1,77 +0,0 @@
# Neovim configuration for Nix
{ inputs, ... }:
{
imports = [
inputs.nixvim.homeManagerModules.nixvim
];
catppuccin.nvim.enable = true;
home.sessionVariables.EDITOR = "nvim";
programs.nixvim = {
enable = true;
clipboard.providers.wl-copy.enable = true;
colorschemes.catppuccin.enable = true;
defaultEditor = true;
vimdiffAlias = true; # Alias vimdiff to nvim -d
opts = {
number = true; # Show line numbers
relativenumber = true; # Show relative line numbers
shiftwidth = 2; # Tab width should be 2
};
plugins = {
bufferline.enable = false;
# Formatters
conform-nvim = {
enable = true;
# TODO use nix fmt on save
settings = { };
};
lsp = {
enable = true;
servers = {
nixd.enable = true;
};
};
lualine.enable = true;
luasnip.enable = true;
# Completions
cmp = {
enable = true;
autoEnableSources = true;
# TODO complete on <tab>
settings = {
sources = [
{ name = "nvim-lsp"; }
{ name = "path"; }
{ name = "buffer"; }
];
};
};
treesitter.enable = true;
web-devicons.enable = true;
};
extraConfigLua = ''
-- Translucent background
vim.cmd [[
highlight Normal guibg=none
highlight NonText guibg=none
highlight Normal ctermbg=none
highlight NonText ctermbg=none
]]
'';
};
}