neovim-flake/configuration.nix

248 lines
5.5 KiB
Nix
Raw Normal View History

2023-02-07 13:03:21 +01:00
inputs: let
2023-02-10 18:39:31 +01:00
modulesWithInputs = import ./modules inputs;
2023-02-07 13:03:21 +01:00
neovimConfiguration = {
modules ? [],
pkgs,
lib ? pkgs.lib,
check ? true,
extraSpecialArgs ? {},
}:
modulesWithInputs {
inherit pkgs lib check extraSpecialArgs;
2023-02-10 18:39:31 +01:00
configuration.imports = modules;
2023-02-07 13:03:21 +01:00
};
tidalConfig = {
config.vim.languages.tidal.enable = true;
};
2023-02-07 13:03:21 +01:00
mainConfig = isMaximal: {
config = {
vim = {
viAlias = true;
vimAlias = true;
2023-03-01 09:34:23 +01:00
debugMode = {
2023-03-01 10:45:42 +01:00
enable = false;
2023-03-01 09:34:23 +01:00
level = 20;
logFile = "/tmp/nvim.log";
};
2023-02-07 13:03:21 +01:00
};
2023-04-18 00:48:44 +02:00
vim.lsp = {
formatOnSave = true;
lspkind.enable = false;
lightbulb.enable = true;
lspsaga.enable = false;
nvimCodeActionMenu.enable = isMaximal;
2023-04-18 00:48:44 +02:00
trouble.enable = true;
lspSignature.enable = true;
lsplines.enable = isMaximal;
2023-04-18 00:48:44 +02:00
};
2023-05-04 17:41:11 +02:00
vim.debugger = {
nvim-dap = {
enable = true;
ui.enable = true;
};
};
vim.languages = {
enableLSP = true;
enableFormat = true;
enableTreesitter = true;
enableExtraDiagnostics = true;
nix.enable = true;
2023-04-18 00:05:18 +02:00
html.enable = isMaximal;
2023-07-19 21:49:06 +02:00
clang = {
enable = isMaximal;
lsp.server = "clangd";
};
sql.enable = isMaximal;
rust = {
enable = isMaximal;
crates.enable = true;
2023-02-07 13:03:21 +01:00
};
2023-08-09 06:41:48 +02:00
java.enable = isMaximal;
ts.enable = isMaximal;
2023-06-03 16:18:26 +02:00
svelte.enable = isMaximal;
go.enable = isMaximal;
zig.enable = isMaximal;
python.enable = isMaximal;
dart.enable = isMaximal;
elixir.enable = false;
bash.enable = isMaximal;
2023-02-07 13:03:21 +01:00
};
vim.visuals = {
enable = true;
nvimWebDevicons.enable = true;
scrollBar.enable = true;
smoothScroll.enable = true;
cellularAutomaton.enable = false;
fidget-nvim.enable = true;
highlight-undo.enable = true;
2023-02-07 13:03:21 +01:00
indentBlankline = {
enable = true;
fillChar = null;
eolChar = null;
2023-02-07 13:03:21 +01:00
showCurrContext = true;
};
2023-08-07 04:30:06 +02:00
cursorline = {
2023-02-07 13:03:21 +01:00
enable = true;
lineTimeout = 0;
};
};
2023-03-01 09:34:23 +01:00
vim.statusline = {
lualine = {
2023-03-01 10:45:42 +01:00
enable = true;
2023-03-01 09:34:23 +01:00
theme = "catppuccin";
};
2023-02-07 13:03:21 +01:00
};
vim.theme = {
enable = true;
name = "catppuccin";
style = "mocha";
transparent = false;
2023-02-07 13:03:21 +01:00
};
vim.autopairs.enable = true;
vim.autocomplete = {
enable = true;
2023-02-07 13:03:21 +01:00
type = "nvim-cmp";
};
vim.filetree = {
2023-07-30 10:41:52 +02:00
nvimTree = {
2023-02-07 13:03:21 +01:00
enable = true;
};
};
vim.tabline = {
nvimBufferline.enable = true;
};
vim.treesitter.context.enable = true;
2023-02-07 13:03:21 +01:00
vim.binds = {
whichKey.enable = true;
cheatsheet.enable = true;
};
vim.telescope.enable = true;
2023-02-07 13:03:21 +01:00
vim.git = {
enable = true;
gitsigns.enable = true;
gitsigns.codeActions = false; # throws an annoying debug message
2023-02-07 13:03:21 +01:00
};
vim.minimap = {
minimap-vim.enable = false;
codewindow.enable = isMaximal; # lighter, faster, and uses lua for configuration
2023-02-07 13:03:21 +01:00
};
vim.dashboard = {
dashboard-nvim.enable = false;
alpha.enable = isMaximal;
2023-02-07 13:03:21 +01:00
};
vim.notify = {
nvim-notify.enable = true;
};
2023-04-07 19:36:27 +02:00
vim.projects = {
project-nvim.enable = isMaximal;
2023-04-07 19:36:27 +02:00
};
2023-02-07 13:03:21 +01:00
vim.utility = {
ccc.enable = isMaximal;
vim-wakatime.enable = isMaximal;
icon-picker.enable = isMaximal;
2023-06-07 13:28:27 +02:00
surround.enable = isMaximal;
2023-03-01 10:08:24 +01:00
diffview-nvim.enable = true;
2023-04-05 01:14:13 +02:00
motion = {
hop.enable = true;
leap.enable = true;
};
2023-02-07 13:03:21 +01:00
};
vim.notes = {
obsidian.enable = false; # FIXME neovim fails to build if obsidian is enabled
orgmode.enable = false;
mind-nvim.enable = isMaximal;
todo-comments.enable = true;
2023-02-07 13:03:21 +01:00
};
vim.terminal = {
2023-04-28 07:59:35 +02:00
toggleterm = {
enable = true;
lazygit.enable = true;
2023-04-28 12:39:29 +02:00
};
2023-02-07 13:03:21 +01:00
};
vim.ui = {
borders.enable = true;
2023-02-07 13:03:21 +01:00
noice.enable = true;
colorizer.enable = true;
2023-06-07 13:28:27 +02:00
modes-nvim.enable = false; # the theme looks terrible with catppuccin
2023-06-06 02:05:05 +02:00
illuminate.enable = true;
breadcrumbs = {
enable = isMaximal;
navbuddy.enable = isMaximal;
};
smartcolumn = {
enable = true;
columnAt.languages = {
# this is a freeform module, it's `buftype = int;` for configuring column position
nix = 110;
ruby = 120;
java = 130;
2023-06-04 16:36:01 +02:00
go = [90 130];
};
};
2023-02-07 13:03:21 +01:00
};
vim.assistant = {
copilot = {
enable = isMaximal;
cmp.enable = isMaximal;
};
2023-02-07 13:03:21 +01:00
};
vim.session = {
nvim-session-manager.enable = false;
2023-02-07 13:03:21 +01:00
};
vim.gestures = {
gesture-nvim.enable = false;
};
vim.comments = {
comment-nvim.enable = true;
};
vim.presence = {
presence-nvim = {
enable = true;
auto_update = true;
image_text = "The Superior Text Editor";
client_id = "793271441293967371";
main_image = "neovim";
2023-05-04 17:41:11 +02:00
show_time = true;
rich_presence = {
editing_text = "Editing %s";
};
};
};
2023-02-07 13:03:21 +01:00
};
};
in {
inherit neovimConfiguration mainConfig tidalConfig;
2023-02-07 13:03:21 +01:00
}