init by ai

This commit is contained in:
2026-04-07 02:34:03 +02:00
commit 0cec50d607
23 changed files with 2803 additions and 0 deletions

69
home/modules/editor.nix Normal file
View File

@@ -0,0 +1,69 @@
{ config, lib, pkgs, pkgs-unstable, ... }:
{
# Neovim as primary editor
programs.neovim = {
enable = true;
defaultEditor = true;
extraPackages = with pkgs; [
ripgrep
fd
tree-sitter
];
# Minimal LSP setup - expand as needed
plugins = with pkgs.vimPlugins; [
# essentials
nvim-lspconfig
nvim-cmp
cmp-nvim-lsp
luasnip
friendly-snippets
# ui improvements
telescope-nvim
telescope-fzf-native-nvim
lualine-nvim
nvim-web-devicons
nvim-tree-lua
# treesitter
nvim-treesitter
nvim-treesitter-context
# git integration
gitsigns-nvim
vim-fugitive
];
# Basic init.lua configuration
extraConfig = ''
lua << EOF
-- Basic settings
vim.opt.number = true
vim.opt.relativenumber = true
vim.opt.expandtab = true
vim.opt.shiftwidth = 2
vim.opt.tabstop = 2
vim.opt.smartindent = true
-- LSP
local lspconfig = require('lspconfig')
-- Python
lspconfig.pyright.setup{}
-- Rust
lspconfig.rust_analyzer.setup{}
-- Node/JavaScript
lspconfig.ts_ls.setup{}
EOF
'';
};
# Alternative: VS Code (uncomment if preferred)
# programs.vscode.enable = true;
}