88 lines
2.6 KiB
Nix
Raw Normal View History

2024-12-21 19:04:51 +01:00
{ pkgs, ... }:
2024-12-21 01:30:34 +01:00
{
2024-12-22 00:00:02 +01:00
# Trailing spaces in status line
2024-12-21 01:30:34 +01:00
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
2024-12-21 23:30:20 +01:00
pkgs.vimPlugins.nvim-lspconfig
2024-12-21 01:30:34 +01:00
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;
2024-12-22 00:00:02 +01:00
spell = true;
2024-12-21 01:30:34 +01:00
termguicolors = true;
2024-12-22 00:00:02 +01:00
textwidth = 80;
2024-12-21 01:30:34 +01:00
};
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 23:31:12 +01:00
lsp.servers.bashls.enable = true;
2024-12-21 19:04:51 +01:00
lsp.servers.gopls.enable = true;
lsp.servers.nixd.enable = true;
2024-12-21 23:30:20 +01:00
lsp.servers.terraformls = {
enable = true;
rootDir = "require('lspconfig.util').root_pattern('.git', '.terraform')";
};
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
2024-12-22 00:00:02 +01:00
lsp-lines.enable = true; # Display LSP hints in lines
2024-12-21 18:38:18 +01:00
lsp-signature.enable = true; # Show function signature when typing
2024-12-22 00:00:02 +01:00
lualine.enable = true; # Status line
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;
};
};
}