diff --git a/nix/progs/nvim/config.vim b/nix/progs/nvim/config.vim index 3bba539..2b75ad1 100644 --- a/nix/progs/nvim/config.vim +++ b/nix/progs/nvim/config.vim @@ -59,18 +59,32 @@ set ignorecase " Case insensitive. set smartcase " Case insensitive if no uppercase letter in pattern, case sensitive otherwise " Set up a line limiter for each lang -au BufNewFile,BufRead *.nix set colorcolumn=101 -au BufNewFile,BufRead *.vim set colorcolumn=101 -au BufNewFile,BufRead *.ts,*.tsx set colorcolumn=101 -au BufNewFile,BufRead *.js,*.jsx set colorcolumn=101 -au BufNewFile,BufRead *.rs set colorcolumn=101 -au BufNewFile,BufRead *.json set colorcolumn=81 -au BufNewFile,BufRead *.yml,*.yaml set colorcolumn=81 -au BufNewFile,BufRead *.md set colorcolumn=81 -" TODO: add limiter for haskell +aug line_limiter + au! + au BufNewFile,BufRead *.nix setlocal colorcolumn=101 + au BufNewFile,BufRead *.vim setlocal colorcolumn=101 + au BufNewFile,BufRead *.ts,*.tsx setlocal colorcolumn=101 + au BufNewFile,BufRead *.js,*.jsx setlocal colorcolumn=101 + au BufNewFile,BufRead *.rs setlocal colorcolumn=101 + au BufNewFile,BufRead *.json setlocal colorcolumn=81 + au BufNewFile,BufRead *.yml,*.yaml setlocal colorcolumn=81 + au BufNewFile,BufRead *.md setlocal colorcolumn=81 + " TODO: add limiter for haskell +aug END " Spell check for markdown files -au BufNewFile,BufRead *.md set spell +aug spell_check + au! + au BufNewFile,BufRead *.md setlocal spell +aug END + +" Set up folding +aug folding + au! + au BufNewFile,BufRead *.js,*.jsx syntax on | setlocal foldmethod=syntax + au BufNewFile,BufRead *.ts,*.tsx syntax on | setlocal foldmethod=syntax + au BufNewFile,BufRead *.rs syntax on | setlocal foldmethod=syntax +aug END " Enable fast navigation between windows nnoremap h @@ -82,24 +96,27 @@ nnoremap k nnoremap Q nnoremap gQ -" Disable arrow keys and page up / down +" Disable arrow keys noremap noremap noremap noremap -inoremap -inoremap -inoremap -inoremap vnoremap vnoremap vnoremap vnoremap +"... instead of insert mode for rus lang +"inoremap +"inoremap +"inoremap +"inoremap + +" Disable page up / down noremap -inoremap -vnoremap noremap +inoremap inoremap +vnoremap vnoremap " Disable mouse / touchpad (only in vim) diff --git a/nix/progs/xplr/default.nix b/nix/progs/xplr/default.nix new file mode 100644 index 0000000..57a6b24 --- /dev/null +++ b/nix/progs/xplr/default.nix @@ -0,0 +1,28 @@ +{ lib, config, pkgs, ... }: + +with lib; + +let + cfg = config.progs.xplr; +in +{ + options.progs.xplr = { + enable = mkOption { + type = types.bool; + default = false; + description = "Add and configure xplr, a terminal UI based file explorer"; + }; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ + xplr # a terminal UI based file explorer + ]; + + + xdg.configFile = { + "xplr/init.lua".source = ./init.lua; + }; + }; +} + diff --git a/nix/progs/xplr/init.lua b/nix/progs/xplr/init.lua new file mode 100644 index 0000000..561d56e --- /dev/null +++ b/nix/progs/xplr/init.lua @@ -0,0 +1 @@ +version = "0.18.0"