2024-12-21 01:30:34 +01:00
|
|
|
{ config, pkgs, lib, mail, ... }:
|
|
|
|
{
|
|
|
|
# TODO
|
|
|
|
# Linter (ale)
|
|
|
|
# Markdown spellcheck
|
|
|
|
# Autocomplete
|
|
|
|
# Missing plugins
|
|
|
|
# Telescope and fuzzy finder
|
2024-12-21 15:08:54 +01:00
|
|
|
# Ruff linter for python and black formatting on save
|
|
|
|
# Language support for python, go, tofu, terraform, yaml
|
2024-12-21 01:30:34 +01:00
|
|
|
# Format on exit
|
2024-12-21 15:08:54 +01:00
|
|
|
# Trailing spaces in statusline
|
2024-12-21 01:30:34 +01:00
|
|
|
# Good example: https://github.com/fred-drake/neovim/blob/master/config/python/language.nix
|
|
|
|
|
2024-12-21 15:08:54 +01:00
|
|
|
imports = [
|
|
|
|
./telescope.nix
|
|
|
|
];
|
|
|
|
|
2024-12-21 01:30:34 +01:00
|
|
|
programs.nixvim = {
|
|
|
|
colorscheme = "sonokai";
|
|
|
|
enable = true;
|
2024-12-21 15:08:54 +01:00
|
|
|
extraPlugins = [
|
2024-12-21 01:30:34 +01:00
|
|
|
pkgs.vimPlugins.indentLine
|
|
|
|
pkgs.vimPlugins.polyglot
|
|
|
|
pkgs.vimPlugins.sonokai
|
|
|
|
];
|
|
|
|
globals = {
|
|
|
|
mapleader = ",";
|
|
|
|
sonokai_style = "atlantis";
|
|
|
|
sonokai_disable_italic_comment = 1;
|
|
|
|
};
|
2024-12-21 15:08:54 +01:00
|
|
|
keymaps = [];
|
2024-12-21 01:30:34 +01:00
|
|
|
opts = {
|
|
|
|
colorcolumn = "88";
|
|
|
|
cursorline = true;
|
|
|
|
number = true;
|
|
|
|
termguicolors = true;
|
|
|
|
};
|
|
|
|
plugins = {
|
|
|
|
cmp = {
|
|
|
|
enable = true; # Completion
|
|
|
|
autoEnableSources = true;
|
|
|
|
settings.sources = [
|
|
|
|
{ name = "nvim_lsp"; }
|
|
|
|
{ name = "path"; }
|
|
|
|
{ name = "buffer"; }
|
|
|
|
];
|
|
|
|
settings.mapping = {
|
|
|
|
"<C-d>" = "cmp.mapping.scroll_docs(-4)";
|
|
|
|
"<C-f>" = "cmp.mapping.scroll_docs(4)";
|
|
|
|
"<C-Space>" = "cmp.mapping.complete()";
|
|
|
|
"<C-e>" = "cmp.mapping.close()";
|
|
|
|
"<Tab>" = "cmp.mapping(cmp.mapping.select_next_item({behavior = cmp.SelectBehavior.Select}), {'i', 's'})";
|
|
|
|
"<S-Tab>" = "cmp.mapping(cmp.mapping.select_prev_item({behavior = cmp.SelectBehavior.Select}), {'i', 's'})";
|
|
|
|
"<CR>" = "cmp.mapping.confirm({ select = false, behavior = cmp.ConfirmBehavior.Replace })";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
committia.enable = true;
|
|
|
|
gitgutter.enable = true;
|
|
|
|
guess-indent.enable = true;
|
|
|
|
lsp.enable = true;
|
|
|
|
lsp.servers.pylsp = {
|
|
|
|
enable = true;
|
|
|
|
settings.plugins = {
|
|
|
|
black.enabled = true;
|
|
|
|
isort.enabled = true;
|
|
|
|
ruff.enabled = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
lualine.enable = true;
|
2024-12-21 15:08:54 +01:00
|
|
|
treesitter.enable = true;
|
2024-12-21 01:30:34 +01:00
|
|
|
web-devicons.enable = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|