2024-12-21 19:04:51 +01:00
|
|
|
{ pkgs, ... }:
|
2024-12-21 01:30:34 +01:00
|
|
|
{
|
|
|
|
# TODO
|
|
|
|
# Linter (ale)
|
|
|
|
# Markdown spellcheck
|
|
|
|
# Autocomplete
|
|
|
|
# Missing plugins
|
2024-12-21 15:08:54 +01:00
|
|
|
# Language support for python, go, tofu, terraform, yaml
|
|
|
|
# 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 21:49:19 +01:00
|
|
|
keymaps = [
|
|
|
|
{
|
|
|
|
key = "<leader>rm";
|
|
|
|
action = "<cmd>RenderMarkdown toggle<CR>";
|
|
|
|
}
|
|
|
|
];
|
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 = {
|
2024-12-21 21:49:19 +01:00
|
|
|
"<C-d>" = "cmp.mapping.scroll_docs(-2)";
|
|
|
|
"<C-f>" = "cmp.mapping.scroll_docs(2)";
|
2024-12-21 01:30:34 +01:00
|
|
|
"<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 })";
|
|
|
|
};
|
|
|
|
};
|
2024-12-21 18:38:18 +01:00
|
|
|
committia.enable = true; # Enhanced git commits
|
|
|
|
gitgutter.enable = true; # Show git change in first line
|
|
|
|
guess-indent.enable = true; # Guess indent of the file
|
2024-12-21 01:30:34 +01:00
|
|
|
lsp.enable = true;
|
|
|
|
lsp.servers.pylsp = {
|
|
|
|
enable = true;
|
|
|
|
settings.plugins = {
|
|
|
|
black.enabled = true;
|
|
|
|
isort.enabled = true;
|
|
|
|
ruff.enabled = true;
|
2024-12-21 18:38:18 +01:00
|
|
|
ruff.formatEnabled = false;
|
2024-12-21 01:30:34 +01:00
|
|
|
};
|
|
|
|
};
|
2024-12-21 19:04:51 +01:00
|
|
|
lsp.servers.gopls.enable = true;
|
|
|
|
lsp.servers.nixd.enable = true;
|
2024-12-21 21:49:19 +01:00
|
|
|
lsp.servers.terraformls.enable = true;
|
2024-12-21 19:04:51 +01:00
|
|
|
lsp.servers.tflint.enable = true;
|
|
|
|
lsp.servers.yamlls.enable = true;
|
2024-12-21 18:38:18 +01:00
|
|
|
lsp-format.enable = true; # Automatically format on save
|
|
|
|
lsp-lines.enable = true; # Display lsp hints in lines
|
|
|
|
lsp-signature.enable = true; # Show function signature when typing
|
|
|
|
lualine.enable = true; # Statusline
|
2024-12-21 21:49:19 +01:00
|
|
|
render-markdown.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;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|