159 lines
3.3 KiB
Nix
159 lines
3.3 KiB
Nix
{
|
||
pkgs,
|
||
...
|
||
}: {
|
||
programs.nixvim = {
|
||
enable = true;
|
||
colorschemes.ayu = {
|
||
enable = true;
|
||
settings = {
|
||
mirage = true;
|
||
overrides = {
|
||
LineNr = { fg = "#707A8C"; };
|
||
};
|
||
};
|
||
};
|
||
clipboard = {
|
||
providers.wl-copy.enable = true;
|
||
register = "unnamedplus";
|
||
};
|
||
extraPackages = with pkgs; [
|
||
latexrun
|
||
zathura
|
||
];
|
||
options = {
|
||
number = true;
|
||
relativenumber = true;
|
||
tabstop = 2;
|
||
shiftwidth = 2;
|
||
expandtab = false;
|
||
scrolloff = 5;
|
||
autoindent = true;
|
||
smartindent = true;
|
||
copyindent = true;
|
||
signcolumn = "yes";
|
||
cursorline = true;
|
||
showmode = false;
|
||
};
|
||
plugins = {
|
||
telescope = {
|
||
enable = true;
|
||
};
|
||
comment-nvim = {
|
||
enable = true;
|
||
};
|
||
markdown-preview = {
|
||
enable = true;
|
||
browser = "firefox";
|
||
};
|
||
lualine = {
|
||
enable = true;
|
||
sectionSeparators = {
|
||
left = "";
|
||
right = "";
|
||
};
|
||
componentSeparators = {
|
||
left = "╱";
|
||
right = "╲";
|
||
};
|
||
};
|
||
lsp = {
|
||
enable = true;
|
||
servers = {
|
||
nil_ls = {
|
||
enable = true;
|
||
};
|
||
};
|
||
};
|
||
nvim-cmp = {
|
||
enable = true;
|
||
sources = [
|
||
{ name = "nvim_lsp"; }
|
||
{ name = "treesitter"; }
|
||
{ name = "luasnip"; }
|
||
{ name = "latex_symbols"; }
|
||
{ name = "path"; }
|
||
{ name = "buffer"; }
|
||
];
|
||
snippet.expand = "luasnip";
|
||
completion = {
|
||
autocomplete = false;
|
||
};
|
||
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>" = {
|
||
action = "cmp.mapping.select_prev_item()";
|
||
modes = [
|
||
"i"
|
||
"s"
|
||
];
|
||
};
|
||
"<C-n>" = {
|
||
action = "cmp.mapping.select_next_item()";
|
||
modes = [
|
||
"i"
|
||
"s"
|
||
];
|
||
};
|
||
};
|
||
};
|
||
luasnip = {
|
||
enable = true;
|
||
};
|
||
friendly-snippets.enable = true;
|
||
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";
|
||
};
|
||
};
|
||
};
|
||
files = {
|
||
"ftplugin/nix.lua" = {
|
||
options = {
|
||
expandtab = true;
|
||
shiftwidth = 2;
|
||
tabstop = 2;
|
||
};
|
||
};
|
||
"ftplugin/markdown.lua" = {
|
||
options = {
|
||
spell = true;
|
||
};
|
||
};
|
||
"ftplugin/tex.lua" = {
|
||
options = {
|
||
spell = true;
|
||
};
|
||
};
|
||
};
|
||
keymaps = [
|
||
{
|
||
action = "<cmd>nohl<CR>";
|
||
key = "<C-q>";
|
||
options.silent = true;
|
||
}
|
||
];
|
||
};
|
||
}
|