nix/prog/nvim: add folding
nix/prog/nvim: enable arrows in the insert mode
This commit is contained in:
parent
8b36965078
commit
5fd8136cd1
3 changed files with 63 additions and 17 deletions
|
@ -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 <C-h> <C-W>h
|
||||
|
@ -82,24 +96,27 @@ nnoremap <C-k> <C-W>k
|
|||
nnoremap Q <nop>
|
||||
nnoremap gQ <nop>
|
||||
|
||||
" Disable arrow keys and page up / down
|
||||
" Disable arrow keys
|
||||
noremap <Up> <nop>
|
||||
noremap <Down> <nop>
|
||||
noremap <Left> <nop>
|
||||
noremap <Right> <nop>
|
||||
inoremap <Up> <nop>
|
||||
inoremap <Down> <nop>
|
||||
inoremap <Left> <nop>
|
||||
inoremap <Right> <nop>
|
||||
vnoremap <Up> <nop>
|
||||
vnoremap <Down> <nop>
|
||||
vnoremap <Left> <nop>
|
||||
vnoremap <Right> <nop>
|
||||
"... instead of insert mode for rus lang
|
||||
"inoremap <Up> <nop>
|
||||
"inoremap <Down> <nop>
|
||||
"inoremap <Left> <nop>
|
||||
"inoremap <Right> <nop>
|
||||
|
||||
" Disable page up / down
|
||||
noremap <PageUp> <nop>
|
||||
inoremap <PageUp> <nop>
|
||||
vnoremap <PageUp> <nop>
|
||||
noremap <PageDown> <nop>
|
||||
inoremap <PageUp> <nop>
|
||||
inoremap <PageDown> <nop>
|
||||
vnoremap <PageUp> <nop>
|
||||
vnoremap <PageDown> <nop>
|
||||
|
||||
" Disable mouse / touchpad (only in vim)
|
||||
|
|
28
nix/progs/xplr/default.nix
Normal file
28
nix/progs/xplr/default.nix
Normal file
|
@ -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;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
1
nix/progs/xplr/init.lua
Normal file
1
nix/progs/xplr/init.lua
Normal file
|
@ -0,0 +1 @@
|
|||
version = "0.18.0"
|
Loading…
Reference in a new issue