xin/configs/neovim.nix

112 lines
2.3 KiB
Nix
Raw Normal View History

2024-04-26 19:41:27 -06:00
{ pkgs, isUnstable, ... }:
with pkgs;
let
2023-12-01 14:27:57 -07:00
vimBuildTool = pkgs.vimUtils.buildVimPlugin;
vacme = vimBuildTool rec {
pname = "vacme";
# https://github.com/qbit/vacme
version = "2017-01-14";
src = pkgs.fetchFromGitHub {
owner = "qbit";
repo = pname;
rev = "3715958cc23195e0224efe4cb5ba5cfe129bd592";
hash = "sha256-vwqCa/iC01SY68seZ4/WarXDVjyi1FO5XHJglZr4l+8=";
};
};
nofrils = vimBuildTool rec {
pname = "nofrils";
version = "unstable-2020-10-08";
src = pkgs.fetchFromGitHub {
owner = "robertmeta";
repo = pname;
rev = "bad6e490846e098866136ef20fff31e99f428bb9";
hash = "sha256-BVBX2sFyTTqqgUmP0o77SKP1xrraJvCqkF+73rs0fLk=";
};
};
2024-04-26 19:41:27 -06:00
unstablePkgs = if isUnstable then [ htmx-lsp ] else [ ];
2022-08-25 12:21:35 -06:00
baseVimPackages = with vimPlugins; [
2023-03-28 14:21:27 -06:00
elm-vim
2022-08-25 12:21:35 -06:00
fugitive
fzf-vim
2024-03-07 07:17:34 -07:00
gleam-vim
haskell-vim
neoformat
2024-05-16 09:38:45 -06:00
neogit
nvim-cmp
2022-08-25 12:21:35 -06:00
nvim-lspconfig
nvim-tree-lua
nvim-treesitter.withAllGrammars
rust-vim
telescope-fzf-native-nvim
telescope-manix
telescope-nvim
2023-06-16 11:04:01 -06:00
todo-comments-nvim
vimagit
2022-08-25 12:21:35 -06:00
vim-gitgutter
vim-go
vim-hindent
vim-lua
2023-01-18 15:48:33 -07:00
vim-markdown
2022-08-25 12:21:35 -06:00
vim-nix
2022-10-08 06:06:57 -06:00
vim-ocaml
2023-05-01 14:37:38 -06:00
vim-sleuth
2022-08-25 12:21:35 -06:00
zig-vim
2023-01-23 17:30:06 -07:00
neogen
vacme
nofrils
2022-08-25 12:21:35 -06:00
];
2023-09-12 08:44:05 -06:00
myVimPackages = baseVimPackages;
in
{
2023-01-05 06:45:49 -07:00
environment.systemPackages = with pkgs; [
2024-04-29 21:15:24 -06:00
djlint
2023-03-28 14:21:27 -06:00
elmPackages.elm
elmPackages.elm-format
elmPackages.elm-language-server
fd
fzf
2023-01-05 06:45:49 -07:00
go
gopls
gotools
haskellPackages.haskell-language-server
haskellPackages.hindent
luaformatter
2023-03-28 14:21:27 -06:00
luajitPackages.lua-lsp
2023-01-05 06:45:49 -07:00
manix
nixpkgs-fmt
nodejs
2023-07-27 10:27:09 -06:00
nodePackages.prettier
nodePackages.typescript-language-server
perl
perlPackages.NeovimExt
perlPackages.PerlCritic
perlPackages.PLS
ripgrep
rubyPackages.solargraph
sleek
sumneko-lua-language-server
tree-sitter
zls
2024-04-26 19:41:27 -06:00
] ++ unstablePkgs;
2022-08-25 12:21:35 -06:00
programs.neovim = {
enable = true;
configure = {
2023-09-12 08:44:05 -06:00
packages.myVimPackage = { start = myVimPackages; };
2022-08-25 12:21:35 -06:00
customRC = ''
" Restore cursor position
autocmd BufReadPost *
\ if line("'\"") > 1 && line("'\"") <= line("$") |
\ exe "normal! g`\"" |
\ endif
luafile ${./neovim.lua}
'';
};
};
}