Compare commits
2 commits
7fcba96288
...
94aa73b2c0
Author | SHA1 | Date | |
---|---|---|---|
94aa73b2c0 | |||
847196e0a3 |
3 changed files with 115 additions and 120 deletions
|
@ -446,8 +446,9 @@ in
|
||||||
ipb = "ip --color --brief";
|
ipb = "ip --color --brief";
|
||||||
ll = "ls -l";
|
ll = "ls -l";
|
||||||
wavesynth = "nix-shell -p sox --run 'play -n synth brownnoise synth pinknoise mix synth 0 0 0 15 40 80 trapezium amod 0.2 20'";
|
wavesynth = "nix-shell -p sox --run 'play -n synth brownnoise synth pinknoise mix synth 0 0 0 15 40 80 trapezium amod 0.2 20'";
|
||||||
|
vim = "nvim";
|
||||||
};
|
};
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
EDITOR = "vim";
|
EDITOR = "nvim";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,10 +4,8 @@
|
||||||
self: super:
|
self: super:
|
||||||
rec {
|
rec {
|
||||||
#jami-ring-daemon = super.qt5.callPackage ./ov/jami/ring-daemon.nix {};
|
#jami-ring-daemon = super.qt5.callPackage ./ov/jami/ring-daemon.nix {};
|
||||||
myVim = with super; vim_configurable.customize {
|
myVim = with super; neovim.override { configure = {
|
||||||
# executable/ package name
|
packages.myVimPackage = with pkgs.vimPlugins; {
|
||||||
name = "vim";
|
|
||||||
vimrcConfig.packages.myVimPackage = with pkgs.vimPlugins; {
|
|
||||||
# loaded on start
|
# loaded on start
|
||||||
start = [
|
start = [
|
||||||
ale
|
ale
|
||||||
|
@ -27,121 +25,8 @@
|
||||||
vim-jinja
|
vim-jinja
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
vimrcConfig.customRC = ''
|
customRC = builtins.readFile ./vimrc;
|
||||||
" disable vim modelines for security reasons
|
};};
|
||||||
set modelines=0
|
|
||||||
set nomodeline
|
|
||||||
|
|
||||||
" Uncomment the following to have Vim jump to the last position when
|
|
||||||
" reopening a file
|
|
||||||
if has("autocmd")
|
|
||||||
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
set nocompatible
|
|
||||||
set hidden
|
|
||||||
|
|
||||||
" automatically close preview window after suggestion
|
|
||||||
autocmd CompleteDone * pclose
|
|
||||||
|
|
||||||
" Pathogen
|
|
||||||
"execute pathogen#infect()
|
|
||||||
"call pathogen#infect()
|
|
||||||
"call pathogen#helptags()
|
|
||||||
|
|
||||||
set statusline=%<\ %n:%f\ %m%r%y%=%-35.(line:\ %l\ of\ %L,\ col:\ %c%V\ (%P)%)
|
|
||||||
filetype plugin indent on
|
|
||||||
|
|
||||||
syntax on
|
|
||||||
|
|
||||||
set number
|
|
||||||
set mouse=a
|
|
||||||
set mousehide
|
|
||||||
|
|
||||||
set backspace=indent,eol,start
|
|
||||||
|
|
||||||
set hlsearch
|
|
||||||
set showmatch
|
|
||||||
set incsearch
|
|
||||||
set autoindent
|
|
||||||
set history=1000
|
|
||||||
" set cursorline
|
|
||||||
if has("unnamedplus")
|
|
||||||
set clipboard=unnamedplus
|
|
||||||
elseif has("clipboard")
|
|
||||||
set clipboard=unnamed
|
|
||||||
endif
|
|
||||||
|
|
||||||
" set expandtab
|
|
||||||
set shiftwidth=4
|
|
||||||
set tabstop=4
|
|
||||||
set softtabstop=4
|
|
||||||
|
|
||||||
" enable truecolor support
|
|
||||||
"let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
|
|
||||||
"let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
|
|
||||||
"set termguicolors
|
|
||||||
"
|
|
||||||
"let base16colorspace=256
|
|
||||||
|
|
||||||
"colorscheme base16-tomorrow-night
|
|
||||||
"colorscheme Tomorrow-Night
|
|
||||||
"colorscheme base16-default-dark
|
|
||||||
|
|
||||||
set background=dark
|
|
||||||
|
|
||||||
" Use the same symbols as TextMate for tabstops and EOLs
|
|
||||||
set listchars=tab:▸\ ,eol:¬
|
|
||||||
|
|
||||||
" default tab completion with supertab
|
|
||||||
let g:SuperTabDefaultCompletionType = "context"
|
|
||||||
|
|
||||||
|
|
||||||
" LanguageClient
|
|
||||||
" Required for operations modifying multiple buffers like rename.
|
|
||||||
set hidden
|
|
||||||
nnoremap <F5> :call LanguageClient_contextMenu()<CR>
|
|
||||||
let g:LanguageClient_serverCommands = { 'haskell': ['hie-wrapper', '--lsp'] }
|
|
||||||
|
|
||||||
" enable LanguageClient functions only if a server mapping exists
|
|
||||||
function LC_maps()
|
|
||||||
if has_key(g:LanguageClient_serverCommands, &filetype)
|
|
||||||
nnoremap <buffer> <silent> K :call LanguageClient#textDocument_hover()<cr>
|
|
||||||
nnoremap <buffer> <silent> gd :call LanguageClient#textDocument_definition()<CR>
|
|
||||||
nnoremap <buffer> <silent> <F2> :call LanguageClient#textDocument_rename()<CR>
|
|
||||||
set omnifunc=LanguageClient#complete
|
|
||||||
set completefunc=LanguageClient#complete
|
|
||||||
endif
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
autocmd FileType * call LC_maps()
|
|
||||||
|
|
||||||
au FileType python setlocal tabstop=4 expandtab shiftwidth=4 softtabstop=4
|
|
||||||
au FileType haskell setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4
|
|
||||||
" haskell-vim
|
|
||||||
let g:haskell_enable_quantification = 1 " to enable highlighting of `forall`
|
|
||||||
let g:haskell_enable_recursivedo = 1 " to enable highlighting of `mdo` and `rec`
|
|
||||||
let g:haskell_enable_arrowsyntax = 1 " to enable highlighting of `proc`
|
|
||||||
let g:haskell_enable_pattern_synonyms = 1 " to enable highlighting of `pattern`
|
|
||||||
let g:haskell_enable_typeroles = 1 " to enable highlighting of type roles
|
|
||||||
let g:haskell_enable_static_pointers = 1 " to enable highlighting of `static`
|
|
||||||
let g:haskell_backpack = 1 " to enable highlighting of backpack keywords
|
|
||||||
au FileType markdown setlocal tabstop=4 expandtab shiftwidth=4 softtabstop=4
|
|
||||||
au FileType nix setlocal tabstop=2 expandtab shiftwidth=2 softtabstop=2
|
|
||||||
set ofu=syntaxcomplete#Complete
|
|
||||||
" nmap <C-V> "+gP
|
|
||||||
" imap <C-V> <ESC><C-V>a
|
|
||||||
vmap <C-C> "+y
|
|
||||||
|
|
||||||
" ALE linter settings
|
|
||||||
let g:ale_linters = { 'python': ['flake8'] }
|
|
||||||
|
|
||||||
" vim-pandoc settings
|
|
||||||
let g:pandoc#modules#disabled = ["spell"]
|
|
||||||
set textwidth=0
|
|
||||||
set wrapmargin=0
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
# build with debug symbols and in debug mode (less optimized)
|
# build with debug symbols and in debug mode (less optimized)
|
||||||
opencvDebug = with super; enableDebugging ((opencv3.override { enablePython = true; enableGtk3 = true; enableDocs = true; pythonPackages = pkgs.python3Packages; }).overrideAttrs (oldAttrs: rec { cmakeBuildType = "Debug"; }));
|
opencvDebug = with super; enableDebugging ((opencv3.override { enablePython = true; enableGtk3 = true; enableDocs = true; pythonPackages = pkgs.python3Packages; }).overrideAttrs (oldAttrs: rec { cmakeBuildType = "Debug"; }));
|
||||||
#gnutls = super.callPackage ./ov/gnutls {inherit (super.darwin.apple_sdk.frameworks) Security;};
|
#gnutls = super.callPackage ./ov/gnutls {inherit (super.darwin.apple_sdk.frameworks) Security;};
|
||||||
|
|
109
home/vimrc
Normal file
109
home/vimrc
Normal file
|
@ -0,0 +1,109 @@
|
||||||
|
" disable vim modelines for security reasons
|
||||||
|
set modelines=0
|
||||||
|
set nomodeline
|
||||||
|
|
||||||
|
" Uncomment the following to have Vim jump to the last position when
|
||||||
|
" reopening a file
|
||||||
|
if has("autocmd")
|
||||||
|
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
set nocompatible
|
||||||
|
set hidden
|
||||||
|
|
||||||
|
" automatically close preview window after suggestion
|
||||||
|
autocmd CompleteDone * pclose
|
||||||
|
|
||||||
|
" Pathogen
|
||||||
|
"execute pathogen#infect()
|
||||||
|
"call pathogen#infect()
|
||||||
|
"call pathogen#helptags()
|
||||||
|
|
||||||
|
set statusline=%<\ %n:%f\ %m%r%y%=%-35.(line:\ %l\ of\ %L,\ col:\ %c%V\ (%P)%)
|
||||||
|
filetype plugin indent on
|
||||||
|
|
||||||
|
syntax on
|
||||||
|
|
||||||
|
set number
|
||||||
|
set mouse=a
|
||||||
|
set mousehide
|
||||||
|
|
||||||
|
set backspace=indent,eol,start
|
||||||
|
|
||||||
|
set hlsearch
|
||||||
|
set showmatch
|
||||||
|
set incsearch
|
||||||
|
set autoindent
|
||||||
|
set history=1000
|
||||||
|
" set cursorline
|
||||||
|
" use system clipboard as default buffer
|
||||||
|
set clipboard=unnamed
|
||||||
|
|
||||||
|
" set expandtab
|
||||||
|
set shiftwidth=4
|
||||||
|
set tabstop=4
|
||||||
|
set softtabstop=4
|
||||||
|
|
||||||
|
" enable truecolor support
|
||||||
|
"let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
|
||||||
|
"let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
|
||||||
|
"set termguicolors
|
||||||
|
"
|
||||||
|
"let base16colorspace=256
|
||||||
|
|
||||||
|
"colorscheme base16-tomorrow-night
|
||||||
|
"colorscheme Tomorrow-Night
|
||||||
|
"colorscheme base16-default-dark
|
||||||
|
|
||||||
|
set background=dark
|
||||||
|
|
||||||
|
" Use the same symbols as TextMate for tabstops and EOLs
|
||||||
|
set listchars=tab:▸\ ,eol:¬
|
||||||
|
|
||||||
|
" default tab completion with supertab
|
||||||
|
let g:SuperTabDefaultCompletionType = "context"
|
||||||
|
|
||||||
|
|
||||||
|
" LanguageClient
|
||||||
|
" Required for operations modifying multiple buffers like rename.
|
||||||
|
set hidden
|
||||||
|
nnoremap <F5> :call LanguageClient_contextMenu()<CR>
|
||||||
|
let g:LanguageClient_serverCommands = { 'haskell': ['hie-wrapper', '--lsp'] }
|
||||||
|
|
||||||
|
" enable LanguageClient functions only if a server mapping exists
|
||||||
|
function LC_maps()
|
||||||
|
if has_key(g:LanguageClient_serverCommands, &filetype)
|
||||||
|
nnoremap <buffer> <silent> K :call LanguageClient#textDocument_hover()<cr>
|
||||||
|
nnoremap <buffer> <silent> gd :call LanguageClient#textDocument_definition()<CR>
|
||||||
|
nnoremap <buffer> <silent> <F2> :call LanguageClient#textDocument_rename()<CR>
|
||||||
|
set omnifunc=LanguageClient#complete
|
||||||
|
set completefunc=LanguageClient#complete
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
autocmd FileType * call LC_maps()
|
||||||
|
|
||||||
|
au FileType python setlocal tabstop=4 expandtab shiftwidth=4 softtabstop=4
|
||||||
|
au FileType haskell setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4
|
||||||
|
" haskell-vim
|
||||||
|
let g:haskell_enable_quantification = 1 " to enable highlighting of `forall`
|
||||||
|
let g:haskell_enable_recursivedo = 1 " to enable highlighting of `mdo` and `rec`
|
||||||
|
let g:haskell_enable_arrowsyntax = 1 " to enable highlighting of `proc`
|
||||||
|
let g:haskell_enable_pattern_synonyms = 1 " to enable highlighting of `pattern`
|
||||||
|
let g:haskell_enable_typeroles = 1 " to enable highlighting of type roles
|
||||||
|
let g:haskell_enable_static_pointers = 1 " to enable highlighting of `static`
|
||||||
|
let g:haskell_backpack = 1 " to enable highlighting of backpack keywords
|
||||||
|
au FileType markdown setlocal tabstop=4 expandtab shiftwidth=4 softtabstop=4
|
||||||
|
au FileType nix setlocal tabstop=2 expandtab shiftwidth=2 softtabstop=2
|
||||||
|
set ofu=syntaxcomplete#Complete
|
||||||
|
" nmap <C-V> "+gP
|
||||||
|
" imap <C-V> <ESC><C-V>a
|
||||||
|
"vmap <C-C> "+y
|
||||||
|
|
||||||
|
" ALE linter settings
|
||||||
|
let g:ale_linters = { 'python': ['flake8'] }
|
||||||
|
|
||||||
|
" vim-pandoc settings
|
||||||
|
let g:pandoc#modules#disabled = ["spell"]
|
||||||
|
set textwidth=0
|
||||||
|
set wrapmargin=0
|
Loading…
Add table
Add a link
Reference in a new issue