Integrate neovim config into home-manager, separate external configs under config/
This commit is contained in:
@@ -6,59 +6,22 @@
|
||||
defaultEditor = true;
|
||||
|
||||
extraPackages = with pkgs; [
|
||||
# Telescope
|
||||
ripgrep
|
||||
fd
|
||||
tree-sitter
|
||||
# LSP servers
|
||||
lua-language-server
|
||||
gopls
|
||||
python3.pkgs.python-lsp-server
|
||||
# Formatters
|
||||
stylua
|
||||
];
|
||||
};
|
||||
|
||||
# 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
|
||||
'';
|
||||
# Link the lua config directory as ~/.config/nvim
|
||||
# Plugins are managed by lazy.nvim (see nvim-config/lua/eliaskohout/plugins.lua)
|
||||
xdg.configFile."nvim" = {
|
||||
source = ../../config/nvim;
|
||||
recursive = true;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user