feat: Add vim basic config
This commit is contained in:
parent
05d4f717c1
commit
fc3fa26a27
4 changed files with 90 additions and 0 deletions
|
|
@ -15,6 +15,7 @@ in
|
||||||
./spotifyd.nix
|
./spotifyd.nix
|
||||||
./nautilus.nix
|
./nautilus.nix
|
||||||
./neovim-nightly.nix
|
./neovim-nightly.nix
|
||||||
|
./vim.nix
|
||||||
|
|
||||||
# Nur
|
# Nur
|
||||||
./nur.nix
|
./nur.nix
|
||||||
|
|
|
||||||
8
overlays/modifications/vim.nix
Normal file
8
overlays/modifications/vim.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{ outputs, ... }:
|
||||||
|
_final: prev:
|
||||||
|
let
|
||||||
|
inherit (prev.stdenv.hostPlatform) system;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
vim = outputs.packages.${system}.vim';
|
||||||
|
}
|
||||||
15
pkgs/vim'/package.nix
Normal file
15
pkgs/vim'/package.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
{ vim-full, vimPlugins }:
|
||||||
|
vim-full.customize {
|
||||||
|
name = "vim";
|
||||||
|
|
||||||
|
vimrcConfig = {
|
||||||
|
customRC = builtins.readFile ./vimrc.vim;
|
||||||
|
packages.myVimPackage = {
|
||||||
|
start = with vimPlugins; [
|
||||||
|
vim-one
|
||||||
|
vim-airline
|
||||||
|
];
|
||||||
|
opt = [ ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
66
pkgs/vim'/vimrc.vim
Normal file
66
pkgs/vim'/vimrc.vim
Normal file
|
|
@ -0,0 +1,66 @@
|
||||||
|
source $VIMRUNTIME/defaults.vim
|
||||||
|
|
||||||
|
colorscheme one
|
||||||
|
set background=light
|
||||||
|
|
||||||
|
" Set airline
|
||||||
|
let g:airline#extensions#tabline#enabled = 1
|
||||||
|
let g:airline#extensions#tabline#formatter = "unique_tail_improved"
|
||||||
|
let g:airline_powerline_fonts = 1
|
||||||
|
|
||||||
|
" Set option
|
||||||
|
set autoindent
|
||||||
|
set autoread
|
||||||
|
set backspace=indent,eol,start
|
||||||
|
set nobackup
|
||||||
|
set breakindent
|
||||||
|
set breakindentopt=sbr
|
||||||
|
set showbreak=↪
|
||||||
|
set cdhome
|
||||||
|
set cmdheight=1
|
||||||
|
set completeopt=fuzzy,menuone,noselect,popup
|
||||||
|
set concealcursor=v
|
||||||
|
set confirm
|
||||||
|
set cursorline
|
||||||
|
set cursorlineopt=number,screenline
|
||||||
|
set diffopt=algorithm:minimal,closeoff,context:20,followwrap,internal,linematch:40
|
||||||
|
set errorbells
|
||||||
|
set expandtab
|
||||||
|
set exrc
|
||||||
|
set foldcolumn=0
|
||||||
|
set fsync
|
||||||
|
set nogdefault
|
||||||
|
set helplang=zh,en
|
||||||
|
set history=10000
|
||||||
|
set hlsearch
|
||||||
|
set ignorecase
|
||||||
|
set smartcase
|
||||||
|
set list
|
||||||
|
set listchars=tab:--→,trail:·,multispace:\ ,nbsp:⍽,space:·
|
||||||
|
set magic
|
||||||
|
set more
|
||||||
|
set mouse=a
|
||||||
|
set number
|
||||||
|
set numberwidth=4
|
||||||
|
set relativenumber
|
||||||
|
set scrolloff=5
|
||||||
|
set shiftround
|
||||||
|
set shiftwidth=2
|
||||||
|
set noshowmode
|
||||||
|
set signcolumn=yes
|
||||||
|
set smoothscroll
|
||||||
|
set splitbelow
|
||||||
|
set splitright
|
||||||
|
set startofline
|
||||||
|
set noswapfile
|
||||||
|
set tabclose=uselast
|
||||||
|
set tabstop=2
|
||||||
|
set termguicolors
|
||||||
|
set undofile
|
||||||
|
set undolevels=100000
|
||||||
|
set virtualedit=block,onemore
|
||||||
|
set whichwrap=b,s,\<,\>
|
||||||
|
set wildmenu
|
||||||
|
set wildmode=full
|
||||||
|
set wildoptions=fuzzy,pum
|
||||||
|
set wrap
|
||||||
Loading…
Add table
Add a link
Reference in a new issue