2023-11-04 16:12:45 +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;
|
2023-09-10 16:04:45 +05:30
|
|
|
colorschemes.dracula = {
|
|
|
|
enable = true;
|
|
|
|
fullSpecialAttrsSupport = true;
|
|
|
|
};
|
2023-08-06 22:46:58 +05:30
|
|
|
extraPackages = with pkgs; [
|
|
|
|
fd
|
|
|
|
ripgrep
|
|
|
|
];
|
2023-08-20 12:19:51 +05:30
|
|
|
extraConfigLuaPre = ''
|
|
|
|
vim.opt.listchars:append "space:⋅"
|
|
|
|
vim.opt.listchars:append "eol:↴"
|
|
|
|
'';
|
2023-08-05 17:42:16 +05:30
|
|
|
options = {
|
|
|
|
autowrite = true;
|
|
|
|
background = "dark";
|
|
|
|
clipboard = "unnamedplus";
|
|
|
|
expandtab = true;
|
|
|
|
laststatus = 2;
|
2023-08-20 12:19:51 +05:30
|
|
|
list = true;
|
2023-08-05 17:42:16 +05:30
|
|
|
number = true;
|
|
|
|
relativenumber = true;
|
|
|
|
shiftwidth = 2;
|
2023-08-20 12:19:34 +05:30
|
|
|
showmode = false;
|
2023-08-05 17:42:16 +05:30
|
|
|
signcolumn = "yes";
|
|
|
|
smartindent = true;
|
2023-08-20 12:19:34 +05:30
|
|
|
splitbelow = true;
|
|
|
|
splitright = true;
|
|
|
|
swapfile = false;
|
2023-08-05 17:42:16 +05:30
|
|
|
tabstop = 2;
|
|
|
|
termguicolors = true;
|
|
|
|
updatetime = 100;
|
|
|
|
wrap = true;
|
|
|
|
};
|
2023-10-03 11:55:48 +05:30
|
|
|
keymaps = [
|
|
|
|
{
|
|
|
|
mode = "n";
|
|
|
|
key = "<C-a>";
|
|
|
|
options.silent = true;
|
|
|
|
action = "<cmd>bp<Return>";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
mode = "n";
|
|
|
|
key = "<C-d>";
|
|
|
|
options.silent = true;
|
|
|
|
action = "<cmd>bn<Return>";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
mode = "n";
|
|
|
|
key = "<C-h>";
|
|
|
|
options.silent = true;
|
|
|
|
action = "<cmd>noh<Return>";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
mode = "n";
|
|
|
|
key = "<leader>w";
|
|
|
|
options.silent = true;
|
|
|
|
action = "<cmd>bdelete<Return><cmd>bnext<Return>";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
mode = "n";
|
|
|
|
key = "<leader>`";
|
|
|
|
options.silent = true;
|
|
|
|
action = "<cmd>:ToggleTerm<Return>";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
mode = "n";
|
|
|
|
key = "<leader>1";
|
|
|
|
options.silent = true;
|
|
|
|
action = "<cmd>:Neotree toggle<Return>";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
mode = "n";
|
|
|
|
key = "<leader>ff";
|
|
|
|
options.silent = true;
|
|
|
|
action = "<cmd>:Telescope find_files<Return>";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
mode = "n";
|
|
|
|
key = "<leader>fg";
|
|
|
|
options.silent = true;
|
|
|
|
action = "<cmd>:Telescope live_grep<Return>";
|
|
|
|
}
|
2023-11-05 16:47:56 +05:30
|
|
|
{
|
|
|
|
mode = "n";
|
|
|
|
key = "<leader>pp";
|
|
|
|
options.silent = true;
|
|
|
|
action = "<cmd>:MarkdownPreview<Return>";
|
|
|
|
}
|
|
|
|
{
|
|
|
|
mode = "n";
|
|
|
|
key = "<leader>po";
|
|
|
|
options.silent = true;
|
|
|
|
action = "<cmd>:MarkdownPreviewStop<Return>";
|
|
|
|
}
|
2023-10-03 11:55:48 +05:30
|
|
|
];
|
2023-08-06 11:25:35 +05:30
|
|
|
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 19:34:00 +05:30
|
|
|
cmp-buffer.enable = true;
|
|
|
|
cmp-nvim-lsp.enable = true;
|
|
|
|
cmp-nvim-lsp-document-symbol.enable = true;
|
|
|
|
cmp-nvim-lsp-signature-help.enable = true;
|
|
|
|
cmp-treesitter.enable = true;
|
|
|
|
cmp_luasnip.enable = true;
|
2023-09-16 17:39:35 +05:30
|
|
|
gitblame = {
|
|
|
|
enable = true;
|
|
|
|
dateFormat = "%r";
|
|
|
|
};
|
2023-08-20 12:19:02 +05:30
|
|
|
gitsigns.enable = true;
|
2023-10-26 23:10:42 +05:30
|
|
|
indent-blankline.enable = true;
|
2023-08-06 19:34:33 +05:30
|
|
|
lastplace.enable = true;
|
2023-08-14 19:54:36 +05:30
|
|
|
lsp = {
|
|
|
|
enable = true;
|
|
|
|
servers = {
|
|
|
|
bashls.enable = true;
|
2023-09-14 21:35:20 +05:30
|
|
|
dartls.enable = true;
|
2023-08-14 19:54:36 +05:30
|
|
|
gopls.enable = true;
|
2023-11-27 23:11:57 +05:30
|
|
|
hls = {
|
|
|
|
installLanguageServer = false;
|
|
|
|
enable = true;
|
|
|
|
};
|
2023-08-14 19:54:36 +05:30
|
|
|
jsonls.enable = true;
|
|
|
|
nixd.enable = true;
|
2023-11-25 17:00:41 +05:30
|
|
|
rust-analyzer = {
|
|
|
|
enable = true;
|
|
|
|
installCargo = false;
|
|
|
|
installRustc = false;
|
|
|
|
};
|
2023-08-14 19:54:36 +05:30
|
|
|
yamlls.enable = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
lualine = {
|
|
|
|
enable = true;
|
|
|
|
globalstatus = true;
|
|
|
|
theme = "dracula";
|
|
|
|
};
|
2023-11-05 15:01:47 +05:30
|
|
|
markdown-preview = {
|
|
|
|
enable = true;
|
2023-11-09 20:31:47 +05:30
|
|
|
browser = "${pkgs.ungoogled-chromium}/bin/chromium";
|
2023-11-05 22:57:29 +05:30
|
|
|
theme = "light";
|
2023-11-05 15:01:47 +05:30
|
|
|
};
|
2023-08-06 11:25:35 +05:30
|
|
|
neo-tree = {
|
|
|
|
enable = true;
|
|
|
|
addBlankLineAtTop = true;
|
|
|
|
enableDiagnostics = true;
|
|
|
|
enableGitStatus = true;
|
2023-08-20 12:50:48 +05:30
|
|
|
closeIfLastWindow = false;
|
2023-08-06 11:25:35 +05:30
|
|
|
filesystem = {
|
2023-08-09 22:45:44 +05:30
|
|
|
followCurrentFile = {
|
|
|
|
enabled = true;
|
|
|
|
leaveDirsOpen = false;
|
|
|
|
};
|
2023-08-28 19:24:00 +05:30
|
|
|
filteredItems.visible = true;
|
2023-08-06 11:25:35 +05:30
|
|
|
useLibuvFileWatcher = true;
|
2023-08-05 17:42:16 +05:30
|
|
|
};
|
|
|
|
};
|
2023-08-06 19:34:00 +05:30
|
|
|
nvim-cmp = {
|
|
|
|
enable = true;
|
2023-08-06 19:45:20 +05:30
|
|
|
snippet.expand = "luasnip";
|
|
|
|
sources = [
|
2023-11-04 16:12:45 +05:30
|
|
|
{ name = "nvim_lsp"; }
|
|
|
|
{ name = "luasnip"; }
|
|
|
|
{ name = "buffers"; }
|
|
|
|
{ name = "treesitter"; }
|
2023-08-06 19:45:20 +05:30
|
|
|
];
|
2023-08-06 19:34:00 +05:30
|
|
|
};
|
2023-08-06 22:46:58 +05:30
|
|
|
telescope = {
|
|
|
|
enable = true;
|
|
|
|
extensions = {
|
|
|
|
fzf-native = {
|
|
|
|
enable = true;
|
|
|
|
caseMode = "smart_case";
|
|
|
|
fuzzy = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2023-08-14 19:54:18 +05:30
|
|
|
toggleterm = {
|
|
|
|
enable = true;
|
|
|
|
};
|
2023-08-06 18:51:04 +05:30
|
|
|
treesitter = {
|
|
|
|
enable = true;
|
|
|
|
};
|
2023-10-10 18:24:02 +05:30
|
|
|
treesitter-refactor = {
|
|
|
|
enable = true;
|
|
|
|
highlightDefinitions.enable = true;
|
|
|
|
navigation.enable = true;
|
|
|
|
};
|
2023-08-05 17:42:16 +05:30
|
|
|
};
|
2023-05-27 17:07:47 +05:30
|
|
|
};
|
|
|
|
}
|