162 lines
4.4 KiB
Nix
162 lines
4.4 KiB
Nix
{ config, pkgs, nixvim, ... }: {
|
|
home.packages = with pkgs; [ tree-sitter fd ];
|
|
programs = {
|
|
ripgrep.enable = true;
|
|
nixvim = {
|
|
globals.mapleader = " ";
|
|
opts = {
|
|
number = true;
|
|
relativenumber = false;
|
|
termguicolors = true;
|
|
completeopt = [
|
|
"menuone"
|
|
"noselect"
|
|
"noinsert"
|
|
];
|
|
# Always show the signcolumn, otherwise text would be shifted when displaying error icons
|
|
signcolumn = "yes";
|
|
mouse = "a";
|
|
ignorecase = true;
|
|
smartcase = true;
|
|
splitright = true;
|
|
splitbelow = true;
|
|
list = true;
|
|
# NOTE: .__raw here means that this field is raw lua code
|
|
listchars.__raw = "{ tab = '» ', trail = '·', nbsp = '␣' }";
|
|
expandtab = true;
|
|
tabstop = 4;
|
|
shiftwidth = 2;
|
|
softtabstop = 0;
|
|
smarttab = true;
|
|
clipboard = {
|
|
providers.wl-copy.enable = true; # Use wl-copy for wayland and xsel for Xorg
|
|
register = "unnamedplus";
|
|
};
|
|
encoding = "utf-8";
|
|
fileencoding = "utf-8";
|
|
cursorline = true;
|
|
ruler = true;
|
|
scrolloff = 5;
|
|
};
|
|
keymaps = [
|
|
{
|
|
key = "<Tab>";
|
|
action = ":bnext<CR>";
|
|
}
|
|
{
|
|
key = "<leader>t";
|
|
action = ":Telescope buffers<CR>";
|
|
}
|
|
{
|
|
key = "<leader>T";
|
|
action = ":terminal<CR>";
|
|
}
|
|
{
|
|
key = "<leader>e";
|
|
action = ":Neotree<CR>";
|
|
}
|
|
{
|
|
key = "<leader>o";
|
|
action = ":Obsidian<CR>";
|
|
}
|
|
{
|
|
key = "<leader>gg";
|
|
action = ":LazyGit<CR>";
|
|
}
|
|
{
|
|
key = "<leader>gl";
|
|
action = ":LazyGitLog<CR>";
|
|
}
|
|
];
|
|
enable = true;
|
|
defaultEditor = true;
|
|
# colorschemes.dracula.enable = true;
|
|
colorschemes.catppuccin.enable = true;
|
|
extraConfigLuaPost = ''
|
|
vim.opt.conceallevel = 2
|
|
vim.api.nvim_create_autocmd("FileType", {
|
|
pattern = "markdown",
|
|
callback = function()
|
|
vim.opt_local.spell = true
|
|
end,
|
|
})
|
|
'';
|
|
plugins = {
|
|
airline.enable = true;
|
|
alpha = {
|
|
enable = true;
|
|
theme = "dashboard";
|
|
};
|
|
blink-cmp.enable = true;
|
|
bufferline.enable = true;
|
|
cmp.enable = true;
|
|
cmp-buffer.enable = true;
|
|
cmp-nvim-lsp.enable = true;
|
|
cmp-path.enable = true;
|
|
cmp-treesitter.enable = true;
|
|
cmp_luasnip.enable = true;
|
|
comment.enable = true;
|
|
friendly-snippets.enable = true;
|
|
gitsigns.enable = true;
|
|
indent-blankline.enable = true;
|
|
lz-n.enable = true;
|
|
lazygit.enable = true;
|
|
lsp = {
|
|
servers = {
|
|
bashls.enable = true;
|
|
html.enable = true;
|
|
lua_ls.enable = true;
|
|
markdown_oxide.enable = true;
|
|
nixd.enable = true;
|
|
perlls.enable = true;
|
|
pylsp.enable = true;
|
|
vimls.enable = true;
|
|
};
|
|
};
|
|
lualine.enable = true;
|
|
luasnip.enable = true;
|
|
neo-tree.enable = true;
|
|
nix.enable = true;
|
|
none-ls.enable = true;
|
|
nvim-autopairs.enable = true;
|
|
nvim-tree.enable = true;
|
|
project-nvim.enable = true;
|
|
render-markdown = {
|
|
enable = true;
|
|
settings.enable = true;
|
|
};
|
|
# snacks.enable = true;
|
|
telescope.enable = true;
|
|
treesitter = {
|
|
enable = true;
|
|
settings = {
|
|
auto_install = true;
|
|
ensure_installed = "all";
|
|
highlight = {
|
|
additional_vim_regex_highlighting = true;
|
|
custom_captures = { };
|
|
enable = true;
|
|
disable = [ "ipgk" ];
|
|
};
|
|
ignore_install = [ "ipkg" ];
|
|
incremental_selection = {
|
|
enable = true;
|
|
keymaps = {
|
|
init_selection = false;
|
|
node_decremental = "grm";
|
|
node_incremental = "grn";
|
|
scope_incremental = "grc";
|
|
};
|
|
};
|
|
indent = { enable = true; };
|
|
parser_install_dir = {
|
|
__raw = "vim.fs.joinpath(vim.fn.stdpath('data'), 'treesitter')";
|
|
};
|
|
sync_install = false;
|
|
};
|
|
};
|
|
web-devicons.enable = true;
|
|
};
|
|
};
|
|
};
|
|
}
|