2023-09-15 05:03:35 +02:00
|
|
|
{config, pkgs, ... }: {
|
2023-07-01 14:25:37 +02:00
|
|
|
programs.neovim = {
|
2023-08-29 13:09:37 +02:00
|
|
|
package = pkgs.neovim-unwrapped;
|
2023-07-01 12:02:59 +02:00
|
|
|
enable = true;
|
2023-07-01 14:25:07 +02:00
|
|
|
defaultEditor = true;
|
|
|
|
viAlias = true;
|
|
|
|
vimAlias = true;
|
|
|
|
vimdiffAlias = true;
|
2023-08-29 11:54:57 +02:00
|
|
|
plugins = with pkgs.vimPlugins; [
|
2024-02-07 04:59:48 +01:00
|
|
|
nvchad
|
2023-08-30 00:30:35 +02:00
|
|
|
fugitive
|
2024-02-07 04:45:52 +01:00
|
|
|
fzf-vim
|
2024-02-07 04:46:59 +01:00
|
|
|
fzf-lua
|
|
|
|
fzfWrapper
|
2024-02-07 05:22:23 +01:00
|
|
|
nvim-treesitter
|
|
|
|
elixir-tools-nvim
|
|
|
|
nvchad-ui
|
|
|
|
catppuccin-nvim
|
2023-07-01 13:08:44 +02:00
|
|
|
];
|
2023-08-29 12:46:03 +02:00
|
|
|
};
|
2023-08-29 13:21:25 +02:00
|
|
|
|
2023-08-29 14:15:01 +02:00
|
|
|
# nvchad requires gcc, npm, and unzip
|
2023-08-29 14:17:12 +02:00
|
|
|
home.packages = [
|
|
|
|
pkgs.gcc
|
|
|
|
pkgs.unzip
|
2023-08-29 14:48:52 +02:00
|
|
|
pkgs.nodejs_20
|
2023-08-30 00:30:35 +02:00
|
|
|
pkgs.ripgrep
|
2024-02-07 04:44:24 +01:00
|
|
|
pkgs.fd
|
2024-02-07 04:45:52 +01:00
|
|
|
pkgs.lazygit
|
2023-08-29 14:15:01 +02:00
|
|
|
];
|
|
|
|
|
2023-08-29 13:21:25 +02:00
|
|
|
# Link the nvchad files to my homedir
|
|
|
|
# https://mipmip.github.io/home-manager-option-search/?query=xdg.dataFile
|
2023-08-29 13:49:54 +02:00
|
|
|
xdg.configFile."nvim" = {
|
2024-02-07 04:49:02 +01:00
|
|
|
enable = true;
|
2023-08-29 13:22:01 +02:00
|
|
|
recursive = true;
|
2024-02-07 04:59:48 +01:00
|
|
|
source = "${pkgs.vimPlugins.nvchad}/";
|
2023-08-29 13:55:33 +02:00
|
|
|
target = "./nvim";
|
2023-08-29 13:21:25 +02:00
|
|
|
};
|
2023-08-30 07:02:30 +02:00
|
|
|
|
|
|
|
xdg.configFile."nvim-custom-plugins" = {
|
2024-02-07 04:58:53 +01:00
|
|
|
enable = true;
|
2023-08-30 07:02:30 +02:00
|
|
|
target = "./nvim/lua/custom/plugins.lua";
|
|
|
|
text = ''
|
|
|
|
local overrides = require("custom.configs.overrides")
|
|
|
|
|
|
|
|
---@type NvPluginSpec[]
|
|
|
|
local plugins = {
|
|
|
|
|
|
|
|
-- Override plugin definition options
|
|
|
|
|
|
|
|
{
|
|
|
|
"neovim/nvim-lspconfig",
|
|
|
|
dependencies = {
|
|
|
|
-- format & linting
|
|
|
|
{
|
|
|
|
"jose-elias-alvarez/null-ls.nvim",
|
|
|
|
config = function()
|
|
|
|
require "custom.configs.null-ls"
|
|
|
|
end,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
config = function()
|
|
|
|
require "plugins.configs.lspconfig"
|
|
|
|
require "custom.configs.lspconfig"
|
|
|
|
end, -- Override to setup mason-lspconfig
|
|
|
|
},
|
|
|
|
|
|
|
|
-- override plugin configs
|
|
|
|
{
|
|
|
|
"williamboman/mason.nvim",
|
|
|
|
opts = overrides.mason
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
"nvim-treesitter/nvim-treesitter",
|
|
|
|
opts = overrides.treesitter,
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
"nvim-tree/nvim-tree.lua",
|
|
|
|
opts = overrides.nvimtree,
|
|
|
|
},
|
|
|
|
|
|
|
|
-- Install a plugin
|
|
|
|
{
|
|
|
|
"max397574/better-escape.nvim",
|
|
|
|
event = "InsertEnter",
|
|
|
|
config = function()
|
|
|
|
require("better_escape").setup()
|
|
|
|
end,
|
|
|
|
},
|
|
|
|
|
|
|
|
-- vim-fugitive for integrated Git
|
|
|
|
{
|
|
|
|
"tpope/vim-fugitive",
|
|
|
|
event = "VeryLazy",
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return plugins
|
|
|
|
'';
|
|
|
|
};
|
2023-08-29 12:10:20 +02:00
|
|
|
}
|