2023-11-01 16:27:35 +01:00
|
|
|
{ inputs
|
|
|
|
, lib
|
|
|
|
, config
|
|
|
|
, pkgs
|
|
|
|
, ...
|
2023-10-31 12:20:02 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
{
|
2023-11-01 16:27:35 +01:00
|
|
|
programs.neovim =
|
|
|
|
let
|
|
|
|
toLua = str: "lua << EOF\n${str}\nEOF\n";
|
|
|
|
toLuaFile = file: "lua << EOF\n${builtins.readFile file}\nEOF\n";
|
|
|
|
in
|
|
|
|
{
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
viAlias = true;
|
|
|
|
vimAlias = true;
|
|
|
|
vimdiffAlias = true;
|
|
|
|
|
|
|
|
extraPackages = with pkgs; [
|
2024-07-25 19:29:32 +02:00
|
|
|
nodejs_22 # Required for copilot-vim
|
2024-01-10 11:54:07 +01:00
|
|
|
ripgrep # Required for telescope
|
|
|
|
wl-clipboard # Required for clipboard sync
|
|
|
|
|
|
|
|
# Language servers
|
|
|
|
clang-tools
|
2023-11-01 16:27:35 +01:00
|
|
|
lua-language-server
|
2024-01-10 11:54:07 +01:00
|
|
|
nodePackages.typescript-language-server
|
2024-07-25 19:29:32 +02:00
|
|
|
typescript
|
2024-01-10 11:54:07 +01:00
|
|
|
tailwindcss-language-server
|
2024-07-25 19:29:32 +02:00
|
|
|
gopls
|
|
|
|
vhdl-ls
|
|
|
|
nixd
|
2023-11-01 16:27:35 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
plugins = with pkgs.vimPlugins; [
|
2024-01-10 11:54:07 +01:00
|
|
|
yuck-vim
|
|
|
|
|
2023-11-01 16:27:35 +01:00
|
|
|
{
|
|
|
|
plugin = which-key-nvim;
|
|
|
|
config = toLua "require('which-key').setup()";
|
|
|
|
}
|
|
|
|
|
|
|
|
neodev-nvim
|
|
|
|
plenary-nvim
|
|
|
|
|
2024-01-10 11:54:07 +01:00
|
|
|
{
|
|
|
|
plugin = telescope-nvim;
|
|
|
|
config = toLuaFile ./plugin/telescope.lua;
|
|
|
|
}
|
2023-11-01 16:27:35 +01:00
|
|
|
telescope-ui-select-nvim
|
|
|
|
|
|
|
|
FTerm-nvim
|
|
|
|
|
2024-02-29 10:34:02 +01:00
|
|
|
vim-fugitive
|
2023-11-01 16:27:35 +01:00
|
|
|
|
2024-01-10 11:54:07 +01:00
|
|
|
harpoon1
|
2023-11-01 16:27:35 +01:00
|
|
|
|
|
|
|
{
|
|
|
|
plugin = undotree-nvim;
|
|
|
|
config = toLua "require('undotree').setup()";
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
plugin = comment-nvim;
|
|
|
|
config = toLua "require('Comment').setup()";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
plugin = todo-comments-nvim;
|
|
|
|
config = toLua "require('todo-comments').setup()";
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
plugin = neoconf-nvim;
|
|
|
|
config = toLua "require('neoconf').setup()";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
plugin = catppuccin-nvim;
|
|
|
|
config = "colorscheme catppuccin-mocha";
|
|
|
|
}
|
|
|
|
|
|
|
|
cmp-nvim-lsp
|
|
|
|
cmp-nvim-lsp-signature-help
|
|
|
|
cmp-buffer
|
|
|
|
cmp-path
|
|
|
|
cmp-cmdline
|
|
|
|
cmp-git
|
|
|
|
cmp-calc
|
|
|
|
cmp_luasnip
|
2024-01-10 11:54:07 +01:00
|
|
|
copilot-cmp
|
2023-11-01 16:27:35 +01:00
|
|
|
luasnip
|
|
|
|
friendly-snippets
|
|
|
|
{
|
|
|
|
plugin = nvim-cmp;
|
|
|
|
config = toLuaFile ./plugin/cmp.lua;
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
plugin = nvim-lspconfig;
|
|
|
|
config = toLuaFile ./plugin/lsp.lua;
|
|
|
|
}
|
|
|
|
rust-tools-nvim
|
|
|
|
{
|
|
|
|
plugin = fidget-nvim;
|
|
|
|
config = toLua "require('fidget').setup({})";
|
|
|
|
}
|
|
|
|
|
|
|
|
rainbow-delimiters-nvim
|
|
|
|
|
|
|
|
{
|
2024-01-10 11:54:07 +01:00
|
|
|
plugin = (nvim-treesitter.withAllGrammars);
|
2023-11-01 16:27:35 +01:00
|
|
|
config = toLuaFile ./plugin/treesitter.lua;
|
|
|
|
}
|
|
|
|
|
2024-01-10 11:54:07 +01:00
|
|
|
{
|
|
|
|
plugin = copilot-lua;
|
|
|
|
config = toLua ''
|
|
|
|
require("copilot").setup({
|
|
|
|
suggestion = { enabled = false },
|
|
|
|
panel = { enabled = false },
|
|
|
|
})
|
|
|
|
'';
|
|
|
|
}
|
2023-11-01 16:27:35 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
extraLuaConfig = ''
|
|
|
|
${builtins.readFile ./options.lua}
|
|
|
|
${builtins.readFile ./keymaps.lua}
|
|
|
|
'';
|
|
|
|
|
|
|
|
};
|
2023-10-31 12:20:02 +01:00
|
|
|
}
|