configuration.nix/home/programs/neovim.nix

93 lines
2.1 KiB
Nix
Raw Normal View History

2023-05-27 21:11:38 +05:30
{pkgs, ...}: {
2023-08-05 17:50:01 +05:30
xdg.desktopEntries = {
"nvim".name = "Neovim wrapper";
"nvim".exec = "nvim %F";
"nvim".noDisplay = true;
};
2023-08-05 17:42:16 +05:30
programs.nixvim = {
enable = true;
2023-06-04 10:20:19 +05:30
viAlias = true;
vimAlias = true;
2023-08-05 17:42:16 +05:30
clipboard.providers.wl-copy.enable = true;
colorscheme = "dracula";
extraPlugins = with pkgs.vimPlugins; [
2023-08-06 11:26:16 +05:30
dracula-vim
2023-06-04 10:20:19 +05:30
];
2023-08-05 17:42:16 +05:30
options = {
autowrite = true;
background = "dark";
clipboard = "unnamedplus";
expandtab = true;
laststatus = 2;
showmode = false;
swapfile = false;
number = true;
relativenumber = true;
shiftwidth = 2;
signcolumn = "yes";
smartindent = true;
tabstop = 2;
termguicolors = true;
updatetime = 100;
wrap = true;
splitright = true;
splitbelow = true;
};
maps = {
normal = {
"<C-a>" = {
silent = true;
action = "<cmd>bp<Return>";
};
"<C-d>" = {
silent = true;
action = "<cmd>bn<Return>";
};
"<C-h>" = {
silent = true;
action = "<cmd>noh<Return>";
};
"<leader>w" = {
2023-08-06 11:25:35 +05:30
action = "<cmd>bdelete<CR><cmd>bnext<Return>";
};
"<leader>1" = {
action = "<cmd>:Neotree toggle<Return>";
};
};
};
plugins = {
2023-08-06 11:25:55 +05:30
bufferline = {
enable = true;
diagnostics = "nvim_lsp";
offsets = [
{
filetype = "neo-tree";
text = "File Explorer";
separator = true;
}
];
separatorStyle = "slant";
};
2023-08-06 11:25:35 +05:30
neo-tree = {
enable = true;
addBlankLineAtTop = true;
enableDiagnostics = true;
enableGitStatus = true;
closeIfLastWindow = true;
buffers = {
followCurrentFile = true;
};
filesystem = {
followCurrentFile = true;
useLibuvFileWatcher = true;
2023-08-05 17:42:16 +05:30
};
};
2023-08-06 11:26:25 +05:30
lualine = {
enable = true;
globalstatus = true;
theme = "dracula";
};
2023-08-05 17:42:16 +05:30
};
2023-05-27 17:07:47 +05:30
};
}