2023-04-01 23:20:13 +05:30
|
|
|
{ config, pkgs, ... }: {
|
|
|
|
programs.nixvim = {
|
|
|
|
enable = true;
|
|
|
|
vimAlias = true;
|
|
|
|
viAlias = true;
|
|
|
|
extraConfigLuaPre = ''
|
|
|
|
vim.g.gitblame_date_format = '%r'
|
|
|
|
vim.g.gitblame_message_when_not_committed = '''
|
2023-04-02 00:26:39 +05:30
|
|
|
|
|
|
|
vim.opt.list = true
|
|
|
|
vim.opt.listchars:append "space:⋅"
|
|
|
|
vim.opt.listchars:append "eol:↴"
|
2023-04-01 23:20:13 +05:30
|
|
|
'';
|
|
|
|
options = {
|
|
|
|
autowrite = true;
|
|
|
|
background = "dark";
|
|
|
|
clipboard = "unnamedplus";
|
|
|
|
expandtab = true;
|
|
|
|
laststatus = 2;
|
|
|
|
list = true;
|
|
|
|
showmode = false;
|
|
|
|
swapfile = false;
|
|
|
|
number = true;
|
|
|
|
relativenumber = true;
|
|
|
|
shiftwidth = 2;
|
|
|
|
signcolumn = "yes";
|
|
|
|
smartindent = true;
|
|
|
|
tabstop = 2;
|
|
|
|
termguicolors = true;
|
|
|
|
updatetime = 100;
|
|
|
|
wrap = true;
|
2023-04-03 20:12:14 +05:30
|
|
|
splitright = true;
|
|
|
|
splitbelow = true;
|
|
|
|
};
|
|
|
|
maps = {
|
|
|
|
normal = {
|
|
|
|
"<C-a>" = {
|
|
|
|
action = ":bp<Return>";
|
|
|
|
};
|
|
|
|
"<C-d>" = {
|
|
|
|
action = ":bn<Return>";
|
|
|
|
};
|
|
|
|
"<C-h>" = {
|
|
|
|
silent = true;
|
|
|
|
action = ":noh<Return>";
|
|
|
|
};
|
|
|
|
"<leader>1" = {
|
|
|
|
silent = true;
|
|
|
|
action = ":NvimTreeToggle<Return>";
|
|
|
|
};
|
|
|
|
"<leader>`" = {
|
|
|
|
silent = true;
|
|
|
|
action = ":split term://zsh<Return>";
|
|
|
|
};
|
|
|
|
"<leader>ff" = {
|
|
|
|
silent = true;
|
|
|
|
action = "<cmd>Telescope find_files<cr>";
|
|
|
|
};
|
|
|
|
"<leader>fg" = {
|
|
|
|
silent = true;
|
|
|
|
action = "<cmd>Telescope live_grep<cr>";
|
|
|
|
};
|
|
|
|
"<leader>fb" = {
|
|
|
|
silent = true;
|
|
|
|
action = "<cmd>Telescope buffers<cr>";
|
|
|
|
};
|
|
|
|
};
|
2023-04-01 23:20:13 +05:30
|
|
|
};
|
|
|
|
extraPlugins = with pkgs.vimPlugins; [ dracula-nvim git-blame-nvim ];
|
|
|
|
colorscheme = "dracula";
|
|
|
|
plugins = {
|
2023-04-02 00:26:39 +05:30
|
|
|
comment-nvim.enable = true;
|
|
|
|
fugitive.enable = true;
|
|
|
|
gitsigns.enable = true;
|
|
|
|
trouble.enable = true;
|
|
|
|
nvim-cmp.enable = true;
|
|
|
|
cmp-buffer.enable = true;
|
|
|
|
cmp-nvim-lsp.enable = true;
|
|
|
|
cmp-treesitter.enable = true;
|
|
|
|
bufferline = {
|
|
|
|
enable = true;
|
|
|
|
diagnostics = "nvim_lsp";
|
|
|
|
offsets = [
|
|
|
|
{
|
|
|
|
filetype = "NvimTree";
|
|
|
|
separator = true;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
separatorStyle = "slant";
|
|
|
|
truncateNames = true;
|
|
|
|
};
|
2023-04-01 23:20:13 +05:30
|
|
|
treesitter = {
|
|
|
|
enable = true;
|
|
|
|
grammarPackages = with config.programs.nixvim.plugins.treesitter.package.builtGrammars; [
|
2023-04-02 00:26:39 +05:30
|
|
|
bash
|
|
|
|
dockerfile
|
|
|
|
gitcommit
|
|
|
|
gitignore
|
|
|
|
git_rebase
|
|
|
|
go
|
|
|
|
markdown
|
|
|
|
markdown_inline
|
|
|
|
nix
|
|
|
|
rust
|
|
|
|
toml
|
|
|
|
yaml
|
2023-04-01 23:20:13 +05:30
|
|
|
];
|
|
|
|
indent = true;
|
|
|
|
incrementalSelection.enable = true;
|
|
|
|
};
|
|
|
|
treesitter-context = {
|
|
|
|
enable = true;
|
|
|
|
};
|
|
|
|
treesitter-refactor = {
|
|
|
|
enable = true;
|
|
|
|
highlightCurrentScope.enable = true;
|
|
|
|
};
|
|
|
|
telescope = {
|
|
|
|
enable = true;
|
|
|
|
extensions = {
|
2023-04-02 00:26:39 +05:30
|
|
|
fzy-native = {
|
2023-04-01 23:20:13 +05:30
|
|
|
enable = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
lualine = {
|
|
|
|
enable = true;
|
|
|
|
globalstatus = true;
|
|
|
|
};
|
2023-04-02 00:26:39 +05:30
|
|
|
indent-blankline = {
|
|
|
|
enable = true;
|
|
|
|
showEndOfLine = true;
|
|
|
|
};
|
|
|
|
nvim-tree = {
|
|
|
|
enable = true;
|
|
|
|
disableNetrw = true;
|
|
|
|
filesystemWatchers.enable = true;
|
|
|
|
};
|
|
|
|
lsp = {
|
|
|
|
enable = true;
|
|
|
|
servers = {
|
|
|
|
gopls.enable = true;
|
|
|
|
rnix-lsp.enable = true;
|
|
|
|
rust-analyzer.enable = true;
|
|
|
|
};
|
|
|
|
};
|
2023-04-01 23:20:13 +05:30
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|