init by ai
This commit is contained in:
69
home/modules/editor.nix
Normal file
69
home/modules/editor.nix
Normal 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;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user