diff options
| author | Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com> | 2024-09-30 22:31:37 +0530 |
|---|---|---|
| committer | Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com> | 2024-09-30 22:31:37 +0530 |
| commit | 5f8027fef5ab482be9275aa310ac22dd1d414159 (patch) | |
| tree | b0e8712d770e615d1222ebb6b3d3aeb566fe7fb0 /modules/tools | |
| parent | b89e5d998891feb55b14220e129c6ee69c98cacb (diff) | |
| download | home-manager-config-5f8027fef5ab482be9275aa310ac22dd1d414159.tar.gz home-manager-config-5f8027fef5ab482be9275aa310ac22dd1d414159.zip | |
Changed the zsh prompt and forcing neovim to use tabs instead of spaces for all files.
Diffstat (limited to 'modules/tools')
| -rw-r--r-- | modules/tools/editor/neovim/config/options.lua | 20 | ||||
| -rw-r--r-- | modules/tools/file-manager/lf/default.nix | 2 | ||||
| -rw-r--r-- | modules/tools/viewer/bat/default.nix | 4 |
3 files changed, 23 insertions, 3 deletions
diff --git a/modules/tools/editor/neovim/config/options.lua b/modules/tools/editor/neovim/config/options.lua index b1fe9cb..17772ca 100644 --- a/modules/tools/editor/neovim/config/options.lua +++ b/modules/tools/editor/neovim/config/options.lua @@ -19,3 +19,23 @@ vim.o.expandtab = false; vim.o.updatetime = 300; vim.o.mouse = "a"; + +-- Force all filetypes to use tabs +vim.api.nvim_create_autocmd("FileType", { + pattern = "*", + callback = function() + vim.bo.expandtab = false; + vim.bo.tabstop = 2; + vim.bo.shiftwidth = 2; + end, +}); + +-- Exception that use spaces +vim.api.nvim_create_autocmd("FileType", { + pattern = {}, + callback = function() + vim.bo.expandtab = true; + vim.bo.tabstop = 2; + vim.bo.shiftwidth = 2; + end, +}); diff --git a/modules/tools/file-manager/lf/default.nix b/modules/tools/file-manager/lf/default.nix index bdbefbc..983b2f2 100644 --- a/modules/tools/file-manager/lf/default.nix +++ b/modules/tools/file-manager/lf/default.nix @@ -22,7 +22,7 @@ #!/bin/sh unset COLORTERM ${if config.tools.viewer.bat.enable then - "bat -pp --line-range=:500 --color=always '$1'" + "bat -pp --line-range=:500 --color=always $1" else "cat"} ''; programs.lf.extraConfig = "set icons"; diff --git a/modules/tools/viewer/bat/default.nix b/modules/tools/viewer/bat/default.nix index ec68eb7..4d52a62 100644 --- a/modules/tools/viewer/bat/default.nix +++ b/modules/tools/viewer/bat/default.nix @@ -11,8 +11,8 @@ tabs = "4"; theme = "custom-theme"; }; - shell.alias."bc" = "${pkgs.bat}/bin/bat -pp"; - shell.alias."bp" = "${pkgs.bat}/bin/bat --paging always"; + shell.alias."cat" = "${pkgs.bat}/bin/bat -pp"; + shell.alias."less" = "${pkgs.bat}/bin/bat --paging always"; home.sessionVariables."PAGER" = "${pkgs.bat}/bin/bat --paging always"; xdg.configFile."bat/themes/custom-theme.tmTheme".source = config.scheme { |
