nix-config/users/tacocat/neovim/default.nix

150 lines
3.2 KiB
Nix
Raw Normal View History

2024-02-23 02:16:38 +00:00
{
pkgs,
...
}: {
2024-02-10 15:23:56 +00:00
programs.nixvim = {
enable = true;
2024-02-24 21:14:11 +00:00
colorschemes.ayu = {
2024-02-10 15:23:56 +00:00
enable = true;
2024-02-24 21:45:06 +00:00
settings = {
mirage = true;
overrides = {
LineNr = { fg = "#707A8C"; };
};
};
2024-02-10 15:23:56 +00:00
};
clipboard = {
2024-02-14 01:09:30 +00:00
providers.wl-copy.enable = true;
register = "unnamedplus";
2024-02-10 15:23:56 +00:00
};
extraPackages = with pkgs; [
latexrun
zathura
];
2024-02-10 15:23:56 +00:00
options = {
number = true;
relativenumber = true;
tabstop = 2;
shiftwidth = 2;
expandtab = false;
2024-02-14 01:09:30 +00:00
scrolloff = 5;
autoindent = true;
2024-02-23 02:16:38 +00:00
smartindent = true;
2024-02-14 01:09:30 +00:00
copyindent = true;
signcolumn = "yes";
cursorline = true;
showmode = false;
};
plugins = {
2024-02-26 03:35:52 +00:00
telescope = {
enable = true;
};
comment-nvim = {
enable = true;
};
markdown-preview = {
enable = true;
settings.browser = "firefox";
2024-02-26 03:35:52 +00:00
};
2024-02-24 21:14:11 +00:00
lualine = {
2024-02-14 01:09:30 +00:00
enable = true;
2024-02-26 02:48:51 +00:00
sectionSeparators = {
left = "";
right = "";
};
componentSeparators = {
2024-03-06 20:32:12 +00:00
left = "";
right = "";
2024-02-26 02:48:51 +00:00
};
2024-02-24 21:14:11 +00:00
};
lsp = {
enable = true;
servers = {
nil_ls = {
enable = true;
};
};
2024-02-14 01:09:30 +00:00
};
cmp = {
2024-02-26 02:48:51 +00:00
enable = true;
settings = {
sources = [
{ name = "nvim_lsp"; }
{ name = "treesitter"; }
{ name = "luasnip"; }
{ name = "latex_symbols"; }
{ name = "path"; }
{ name = "buffer"; }
];
snippet.expand = "luasnip";
completion = {
autocomplete = false;
2024-02-26 02:48:51 +00:00
};
mapping = {
"<C-Space>" = "cmp.mapping.complete()";
"<C-e>" = "cmp.mapping.close()";
"<CR>" = "cmp.mapping.confirm({ select = true })";
"<C-b>" = "cmp.mapping.scroll_docs(-4)";
"<C-f>" = "cmp.mapping.scroll_docs(4)";
"<C-p>" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})";
"<C-n>" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})";
2024-02-26 02:48:51 +00:00
};
};
};
luasnip = {
enable = true;
};
friendly-snippets.enable = true;
2024-02-14 01:09:30 +00:00
gitsigns = {
enable = true;
};
treesitter = {
enable = true;
nixvimInjections = true;
indent = true;
disabledLanguages = [
"latex"
];
ignoreInstall = [
"latex"
];
};
vimtex = {
enable = true;
texlivePackage = pkgs.texliveFull;
settings = {
compiler_method = "latexrun";
view_method = "zathura";
compiler_latexrun.out_dir = "build";
};
2024-02-14 01:09:30 +00:00
};
2024-02-10 15:23:56 +00:00
};
2024-02-24 16:55:49 +00:00
files = {
"ftplugin/nix.lua" = {
options = {
expandtab = true;
shiftwidth = 2;
tabstop = 2;
};
};
"ftplugin/markdown.lua" = {
options = {
spell = true;
};
};
"ftplugin/tex.lua" = {
options = {
spell = true;
};
};
2024-02-24 16:55:49 +00:00
};
keymaps = [
{
action = "<cmd>nohl<CR>";
key = "<C-q>";
options.silent = true;
}
];
2024-02-10 15:23:56 +00:00
};
}