formatting

This commit is contained in:
Osman Faruk Bayram 2025-03-16 21:13:57 +03:00
parent 9addbe931a
commit 72f087c33d
6 changed files with 42 additions and 37 deletions

View file

@ -9,9 +9,12 @@
listchars = "tab:» ,trail:·,multispace:·,lead: ,nbsp:";
# Tab options
tabstop = 2; # Number of spaces a <Tab> in the text stands for (local to buffer)
shiftwidth = 2; # Number of spaces used for each step of (auto)indent (local to buffer)
softtabstop = 0; # If non-zero, number of spaces to insert for a <Tab> (local to buffer)
tabstop =
2; # Number of spaces a <Tab> in the text stands for (local to buffer)
shiftwidth =
2; # Number of spaces used for each step of (auto)indent (local to buffer)
softtabstop =
0; # If non-zero, number of spaces to insert for a <Tab> (local to buffer)
expandtab = true; # Expand <Tab> to spaces in Insert mode (local to buffer)
autoindent = true; # Do clever autoindenting
# TODO: i want to see 4 spaces when i press tab in python and 2 spaces in nix using setlocal

View file

@ -4,11 +4,18 @@
settings = {
sources = [
# LSP source
{ name = "nvim_lsp"; }
{
name = "nvim_lsp";
}
# For path completion
{ name = "path"; }
{
name = "path";
}
# For buffer completion
{ name = "buffer"; keyword_length = 5; }
{
name = "buffer";
keyword_length = 5;
}
# For command line completion
{ name = "cmdline"; }
];

View file

@ -1,12 +1,6 @@
{
# settings of these plugins live in their respective files
imports = [
./cmp.nix
./lsp.nix
./mini.nix
./oil.nix
./treesitter.nix
];
imports = [ ./cmp.nix ./lsp.nix ./mini.nix ./oil.nix ./treesitter.nix ];
plugins = {
# todo comments highlighter

View file

@ -1,4 +1,4 @@
{config, lib, ...}:{
{ config, lib, ... }: {
plugins.mini = {
modules = {
starter = {
@ -12,13 +12,15 @@
# this items and content_hooks are copied from khanelivim config
# but i want to understand them
items = {
"__unkeyed-1.builtin_actions".__raw = "require('mini.starter').sections.builtin_actions()";
"__unkeyed-1.builtin_actions".__raw =
"require('mini.starter').sections.builtin_actions()";
"__unkeyed-2.recent_files_current_directory".__raw =
"require('mini.starter').sections.recent_files(10, true)";
"__unkeyed-3.recent_files".__raw = "require('mini.starter').sections.recent_files(10, false)";
"__unkeyed-4.sessions".__raw = lib.mkIf (
config.plugins.mini.enable && lib.hasAttr "sessions" config.plugins.mini.modules
) "require('mini.starter').sections.sessions(5, true)";
"__unkeyed-3.recent_files".__raw =
"require('mini.starter').sections.recent_files(10, false)";
"__unkeyed-4.sessions".__raw = lib.mkIf (config.plugins.mini.enable
&& lib.hasAttr "sessions" config.plugins.mini.modules)
"require('mini.starter').sections.sessions(5, true)";
__unkeyed-5 = lib.mkIf config.plugins.persistence.enable {
name = "Restore session";
action.__raw = "[[lua require('persistence').load()]]";
@ -27,10 +29,12 @@
};
content_hooks = {
"__unkeyed-1.adding_bullet".__raw = "require('mini.starter').gen_hook.adding_bullet()";
"__unkeyed-1.adding_bullet".__raw =
"require('mini.starter').gen_hook.adding_bullet()";
"__unkeyed-2.indexing".__raw =
"require('mini.starter').gen_hook.indexing('all', { 'Builtin actions' })";
"__unkeyed-3.padding".__raw = "require('mini.starter').gen_hook.aligning('center', 'center')";
"__unkeyed-3.padding".__raw =
"require('mini.starter').gen_hook.aligning('center', 'center')";
};
};
};

View file

@ -1,15 +1,12 @@
{config, lib, ...}: {
plugins.oil = {
};
{ config, lib, ... }: {
plugins.oil = { };
# add this keymaps only if oil plugin is enabled
keymaps = lib.mkIf config.plugins.oil.enable [
{
keymaps = lib.mkIf config.plugins.oil.enable [{
action = "<cmd>Oil<CR>";
key = "-";
options = {
silent = true;
# TODO what does silent do?
};
}
];
}];
}