feat:lazyvim-nix

add:opencode

Version 451 -> 452:
  dart: 3.10.3 → ∅
  dbeaver-bin: 25.3.0 → 25.3.1, -2025.8 KiB
  deno: 2.5.6 → 2.6.3, +909.8 KiB
  firefox-unwrapped: -68.5 KiB
  firmware: +20.7 KiB
  flutter: 3.38.4 → 3.38.5
  flutter-tools: 3.38.4 → 3.38.5
  flutter-wrapped: 3.38.4, 3.38.4-sdk → 3.38.5, 3.38.5-sdk
  golines: -3157.3 KiB
  gpsd: 3.27 → 3.27.2, -14.5 KiB
  initrd-linux-zen: 6.18.1 → 6.18.2
  ipxe: 1.21.1-unstable-2025-12-15 → 1.21.1-unstable-2025-12-22, +19.4 KiB
  just: 1.43.1 → 1.45.0, +84.2 KiB
  libvlc: 3.0.23 → 3.0.23-2, +8.8 KiB
  linux-firmware: 20251125 → 20251125-unstable-2025-12-18, +7566.1 KiB
  linux-zen: 6.18.1, 6.18.1-modules → 6.18.2, 6.18.2-modules, +31.2 KiB
  mpv: 0.40.0 → 0.41.0, +165.6 KiB
  mpv-with-scripts: 0.40.0 → 0.41.0
  nixd: 2.7.0 → 2.8.0
  nixf: 2.7.0 → 2.8.0, +125.9 KiB
  nixos-system-dos: 26.05.20251221.a653104 → 26.05.20251225.3e2499d
  nixt: 2.7.0 → 2.8.0
  opencode: 1.0.180 → 1.0.184, +26.3 KiB
  pnpm: 10.25.0 → 10.26.1
  python3.13-curl-cffi: 0.14.0b2 → 0.14.0, +106.2 KiB
  source: +160.8 KiB
  strawberry: 1.2.13 → 1.2.16, +174.0 KiB
  wireplumber: 0.5.12 → 0.5.13, +40.7 KiB
This commit is contained in:
dichgrem
2025-12-24 19:11:10 +08:00
parent 6decde827c
commit 785bdefbaf
8 changed files with 114 additions and 329 deletions

View File

@@ -1,233 +1,81 @@
{ config
, lib
, pkgs
, ...
}: {
programs.neovim = {
{ inputs, config, lib, pkgs, ... }:
{
imports = [ inputs.lazyvim.homeManagerModules.default ];
programs.lazyvim = {
enable = true;
configFiles = ./lua;
extras = {
lang = {
go.enable = true;
clangd.enable = true;
rust.enable = true;
typescript.enable = true;
python.enable = true;
tailwind.enable = true;
java.enable = true;
json.enable = true;
yaml.enable = true;
toml.enable = true;
docker.enable = true;
kotlin.enable = true;
dart.enable = true;
nix.enable = true;
};
};
extraPackages = with pkgs; [
#Go
# All
tree-sitter
# Go
gopls
gofumpt
golines
#Lua
# Lua
stylua
lua-language-server
#Nix
# Nix
nixd
nixpkgs-fmt
#Java
# Java
google-java-format
jdt-language-server
#Rust
# Rust
clippy
rustfmt
rust-analyzer
#Shell
# Shell
shfmt
bash-language-server
#C/C++
# C/C++
clang-tools
#Kotlin
# Kotlin
ktlint
kotlin-language-server
#Python
# Python
ruff
black
python312Packages.python-lsp-server
#JS/TS/Web
# JS/TS/Web
biome
prettierd
nodePackages.prettier
# Data formats
jq #JSON
taplo #TOML
yamlfmt #YAML
];
plugins = with pkgs.vimPlugins; [
lazy-nvim
];
extraLuaConfig =
let
plugins = with pkgs.vimPlugins; [
LazyVim
bufferline-nvim
cmp_luasnip
conform-nvim
dashboard-nvim
flash-nvim
friendly-snippets
gitsigns-nvim
lualine-nvim
neo-tree-nvim
neoconf-nvim
neodev-nvim
noice-nvim
nui-nvim
nvim-lint
nvim-lspconfig
nvim-notify
nvim-spectre
nvim-treesitter
nvim-treesitter-context
nvim-ts-autotag
nvim-ts-context-commentstring
nvim-web-devicons
persistence-nvim
plenary-nvim
todo-comments-nvim
tokyonight-nvim
trouble-nvim
vim-illuminate
vim-startuptime
which-key-nvim
fzf-lua
snacks-nvim
{
name = "lazydev.nvim";
path = lazydev-nvim;
}
{
name = "blink.cmp";
path = blink-cmp;
}
{
name = "LuaSnip";
path = luasnip;
}
{
name = "mini.ai";
path = mini-nvim;
}
{
name = "mini.bufremove";
path = mini-nvim;
}
{
name = "mini.comment";
path = mini-nvim;
}
{
name = "mini.indentscope";
path = mini-nvim;
}
{
name = "mini.pairs";
path = mini-nvim;
}
{
name = "mini.surround";
path = mini-nvim;
}
{
name = "mini.icons";
path = mini-icons;
}
{
name = "grug-far.nvim";
path = grug-far-nvim;
}
];
mkEntryFromDrv = drv:
if lib.isDerivation drv
then {
name = "${lib.getName drv}";
path = drv;
}
else drv;
lazyPath = pkgs.linkFarm "lazy-plugins" (builtins.map mkEntryFromDrv plugins);
in
''
require("lazy").setup({
defaults = {
lazy = true,
},
dev = {
-- reuse files from pkgs.vimPlugins.*
path = "${lazyPath}",
patterns = { "." },
-- fallback to download
fallback = true,
},
rocks = {
enabled = false,
hererocks = false,
},
spec = {
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
-- The following configs are needed for fixing lazyvim on nix
-- disable mason.nvim, use programs.neovim.extraPackages
{ "mason-org/mason-lspconfig.nvim", enabled = false },
{ "mason-org/mason.nvim", enabled = false },
-- import/override with your plugins
{ import = "lazyvim.plugins.extras.lang.go" },
{ import = "lazyvim.plugins.extras.lang.clangd" },
{ import = "lazyvim.plugins.extras.lang.rust" },
{ import = "lazyvim.plugins.extras.lang.typescript" },
{ import = "lazyvim.plugins.extras.lang.python" },
{ import = "lazyvim.plugins.extras.lang.tailwind" },
{ import = "lazyvim.plugins.extras.lang.java" },
{ import = "lazyvim.plugins.extras.lang.json" },
{ import = "lazyvim.plugins.extras.lang.yaml" },
{ import = "lazyvim.plugins.extras.lang.toml" },
{ import = "lazyvim.plugins.extras.lang.docker" },
{ import = "lazyvim.plugins.extras.lang.kotlin" },
{ import = "lazyvim.plugins.extras.lang.dart" },
{ import = "plugins" },
-- treesitter handled by xdg.configFile."nvim/parser", put this line at the end of spec to clear ensure_installed
{ "nvim-treesitter/nvim-treesitter",
opts = function(_, opts)
opts.ensure_installed = {}
end,
},
},
})
'';
};
# https://github.com/nvim-treesitter/nvim-treesitter#i-get-query-error-invalid-node-type-at-position
xdg.configFile."nvim/parser".source =
let
parsers = pkgs.symlinkJoin {
name = "treesitter-parsers";
paths =
(pkgs.vimPlugins.nvim-treesitter.withPlugins (plugins:
with plugins; [
bash
c
go
lua
rust
java
dart
kotlin
python
javascript
typescript
tsx
vue
html
css
json
yaml
toml
dockerfile
])).dependencies;
};
in
"${parsers}/parser";
# Normal LazyVim config here, see https://github.com/LazyVim/starter/tree/main/lua
xdg.configFile."nvim/lua".source = ./lua;
}