flakes/modules/user/neovim.nix

102 lines
2.4 KiB
Nix
Raw Normal View History

2026-06-19 07:36:13 +10:00
{ config, lib, pkgs, sysConfig, ... }:
let
luaconf = pkgs.writeText "config.lua"
2023-02-23 22:48:03 +07:00
(lib.replaceStrings
2026-06-19 07:36:13 +10:00
["{{OMNISHARP_PATH}}" "{{DART_PATH}}" "{{CATPPUCCIN_FLAVOUR}}" "{{USERNAME}}" "{{HOSTNAME}}"]
["${pkgs.omnisharp-roslyn}/bin/OmniSharp" "${pkgs.dart}/bin/dart" config.catppuccin.nvim.flavor config.home.username sysConfig.networking.hostName]
(builtins.readFile ../../res/config.lua));
in {
systemd.user.tmpfiles.rules = [
"D %t/vim/swap 0755 - - - -"
"D %t/vim/undo 0755 - - - -"
];
programs.neovim = {
enable = true;
viAlias = true;
vimAlias = true;
vimdiffAlias = true;
#package = pkgs.neovim-nightly;
withNodeJs = true;
withPython3 = true;
withRuby = false;
extraPackages = with pkgs; [
2026-06-19 07:36:13 +10:00
nixd
rust-analyzer
2025-08-27 17:28:29 +10:00
texlab
2026-05-10 22:44:46 +10:00
astro-language-server
tailwindcss-language-server
diagnostic-languageserver
eslint_d
typescript-language-server
vscode-langservers-extracted
yaml-language-server
];
plugins = with pkgs.vimPlugins; [
autoclose-nvim
2025-08-18 00:11:28 +10:00
auto-save-nvim
2023-02-23 22:36:29 +07:00
flutter-tools-nvim
fzf-vim
fzf-lsp-nvim
lualine-nvim
2025-08-17 23:32:23 +10:00
nvim-ts-autotag
nvim-web-devicons
2022-10-05 13:45:30 +07:00
plenary-nvim
tokyonight-nvim
2021-08-19 19:13:29 +07:00
vim-fugitive
2025-07-17 17:42:43 +10:00
vim-latex-live-preview
vim-nix
2021-05-30 22:09:45 +07:00
vim-repeat
2021-08-19 16:56:50 +07:00
vim-signify
vim-surround
2025-01-15 23:21:25 +11:00
vimtex
lsp_signature-nvim
nvim-cmp
2023-02-23 22:41:41 +07:00
nvim-dap
2025-08-17 23:09:58 +10:00
nvim-highlight-colors
nvim-lspconfig
cmp-nvim-lsp
cmp_luasnip
luasnip
#(pkgs.me.nvim-treesitter-nightly.withPlugins (p: with p; [
(nvim-treesitter.withPlugins (p: with p; [
2025-08-17 23:06:33 +10:00
tree-sitter-astro
tree-sitter-bash
tree-sitter-c
2021-09-01 15:48:11 +07:00
tree-sitter-c-sharp
tree-sitter-cpp
2025-04-25 00:02:55 +10:00
tree-sitter-groovy
tree-sitter-html
tree-sitter-java
tree-sitter-javascript
tree-sitter-json
tree-sitter-kotlin
2025-07-17 17:42:43 +10:00
tree-sitter-latex
tree-sitter-lua
tree-sitter-markdown
tree-sitter-nix
tree-sitter-php
tree-sitter-python
tree-sitter-query
tree-sitter-regex
2021-07-11 13:54:48 +07:00
tree-sitter-rust
tree-sitter-swift
2021-07-11 13:54:48 +07:00
tree-sitter-toml
tree-sitter-tsx
tree-sitter-typescript
tree-sitter-vim
tree-sitter-vimdoc
tree-sitter-xml
2021-07-07 08:28:21 +07:00
tree-sitter-yaml
]))
];
extraConfig = ''
luafile ${luaconf}
'';
};
}