fix: fix direnv TMPDIR
This commit is contained in:
parent
1ca1091f5f
commit
b795aef8b2
|
@ -23,13 +23,13 @@ use_nix() {
|
||||||
log_status using cached derivation
|
log_status using cached derivation
|
||||||
fi
|
fi
|
||||||
local term_backup=$TERM path_backup=$PATH
|
local term_backup=$TERM path_backup=$PATH
|
||||||
if [ -n ${TMPDIR+x} ]; then
|
if ! [ -z ${TMPDIR+x} ]; then
|
||||||
local tmp_backup=$TMPDIR
|
local tmp_backup=$TMPDIR
|
||||||
fi
|
fi
|
||||||
|
|
||||||
eval "$(< $cache)"
|
eval "$(< $cache)"
|
||||||
export PATH=$PATH:$path_backup TERM=$term_backup TMPDIR=$tmp_backup
|
export PATH=$PATH:$path_backup TERM=$term_backup TMPDIR=$tmp_backup
|
||||||
if [ -n ${tmp_backup+x} ]; then
|
if ! [ -z ${tmp_backup+x} ]; then
|
||||||
export TMPDIR=${tmp_backup}
|
export TMPDIR=${tmp_backup}
|
||||||
else
|
else
|
||||||
unset TMPDIR
|
unset TMPDIR
|
||||||
|
|
46
home/common/coc.vim
Normal file
46
home/common/coc.vim
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
" Use tab for trigger completion with characters ahead and navigate.
|
||||||
|
" Use command ':verbose imap <tab>' to make sure tab is not mapped by other plugin.
|
||||||
|
inoremap <silent><expr> <TAB>
|
||||||
|
\ pumvisible() ? "\<C-n>" :
|
||||||
|
\ <SID>check_back_space() ? "\<TAB>" :
|
||||||
|
\ coc#refresh()
|
||||||
|
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
|
||||||
|
|
||||||
|
function! s:check_back_space() abort
|
||||||
|
let col = col('.') - 1
|
||||||
|
return !col || getline('.')[col - 1] =~# '\s'
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Use <cr> to confirm completion, `<C-g>u` means break undo chain at current position.
|
||||||
|
inoremap <expr> <cr> complete_info()["selected"] != "-1" ? "\<C-y>" : "\<C-g>u\<CR>"
|
||||||
|
|
||||||
|
" Use <c-space> to trigger completion.
|
||||||
|
inoremap <silent><expr> <c-space> coc#refresh()
|
||||||
|
|
||||||
|
" Remap keys for gotos
|
||||||
|
nmap <silent> gd <Plug>(coc-definition)
|
||||||
|
nmap <silent> gy <Plug>(coc-type-definition)
|
||||||
|
nmap <silent> gi <Plug>(coc-implementation)
|
||||||
|
nmap <silent> gr <Plug>(coc-references)
|
||||||
|
|
||||||
|
" Highlight symbol under cursor on CursorHold
|
||||||
|
autocmd CursorHold * silent call CocActionAsync('highlight')
|
||||||
|
|
||||||
|
" Remap for rename current word
|
||||||
|
nmap <leader>rn <Plug>(coc-rename)
|
||||||
|
|
||||||
|
" Remap for format selected region
|
||||||
|
xmap <leader>f <Plug>(coc-format-selected)
|
||||||
|
nmap <leader>f <Plug>(coc-format-selected)
|
||||||
|
|
||||||
|
" Remap for do codeAction of selected region, ex: `<leader>aap` for current paragraph
|
||||||
|
xmap <leader>a <Plug>(coc-codeaction-selected)
|
||||||
|
nmap <leader>a <Plug>(coc-codeaction-selected)
|
||||||
|
|
||||||
|
" Remap for do codeAction of current line
|
||||||
|
nmap <leader>ac <Plug>(coc-codeaction)
|
||||||
|
" Fix autofix problem of current line
|
||||||
|
nmap <leader>qf <Plug>(coc-fix-current)
|
||||||
|
|
||||||
|
" Use `:Format` to format current buffer
|
||||||
|
command! -nargs=0 Format :call CocAction('format')
|
33
home/common/init.vim
Normal file
33
home/common/init.vim
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
colorscheme gruvbox
|
||||||
|
let g:gruvbox_number_column = 'bg1'
|
||||||
|
|
||||||
|
let g:startify_bookmarks = [
|
||||||
|
\ '~/dev/fitnesspilot/microservices',
|
||||||
|
\ '~/dev/fitnesspilot/clients/fitnesspilot-web',
|
||||||
|
\ '~/dev/fitnesspilot/microservices/fitnesspilot',
|
||||||
|
\ '~/dev/fitnesspilot/microservices/coachtasks',
|
||||||
|
\ '~/dev/fitnesspilot/microservices/notifications',
|
||||||
|
\ '~/dev/fitnesspilot/microservices/googlefitimport',
|
||||||
|
\ ]
|
||||||
|
|
||||||
|
let mapleader=" "
|
||||||
|
let g:camelcasemotion_key = '<leader>'
|
||||||
|
|
||||||
|
" omnisharp-vim config:
|
||||||
|
let g:OmniSharp_server_stdio = 1
|
||||||
|
let g:OmniSharp_server_path = '/home/felschr/.nix-profile/bin/omnisharp'
|
||||||
|
let g:OmniSharp_selector_ui = 'fzf'
|
||||||
|
let g:OmniSharp_highlight_types = 3
|
||||||
|
let g:ale_linters = {
|
||||||
|
\ 'cs': ['OmniSharp']
|
||||||
|
\ }
|
||||||
|
|
||||||
|
" nvim-lsp using neovim's official LSP interface
|
||||||
|
" call nvim_lsp#setup("tsserver", {})
|
||||||
|
" call nvim_lsp#setup("ghcide", {})
|
||||||
|
|
||||||
|
set relativenumber
|
||||||
|
|
||||||
|
map ; :Files<CR>
|
||||||
|
map <C-o> :NERDTreeToggle<CR>
|
||||||
|
map <Leader> <Plug>(easymotion-prefix)
|
|
@ -75,12 +75,14 @@ in
|
||||||
lightline-vim
|
lightline-vim
|
||||||
lightline-ale
|
lightline-ale
|
||||||
nerdtree
|
nerdtree
|
||||||
|
vim-startify
|
||||||
vim-polyglot
|
vim-polyglot
|
||||||
vim-multiple-cursors
|
vim-multiple-cursors
|
||||||
vim-surround
|
vim-surround
|
||||||
vim-commentary
|
vim-commentary
|
||||||
vim-easymotion
|
vim-easymotion
|
||||||
vim-gitgutter
|
vim-gitgutter
|
||||||
|
vim-fugitive
|
||||||
camelcasemotion
|
camelcasemotion
|
||||||
|
|
||||||
# nvim-lsp # nixos-rebuild currently fails
|
# nvim-lsp # nixos-rebuild currently fails
|
||||||
|
@ -88,7 +90,6 @@ in
|
||||||
ale
|
ale
|
||||||
vim-orgmode
|
vim-orgmode
|
||||||
vim-nix
|
vim-nix
|
||||||
vim-fugitive
|
|
||||||
|
|
||||||
coc-nvim
|
coc-nvim
|
||||||
coc-emmet
|
coc-emmet
|
||||||
|
@ -103,35 +104,6 @@ in
|
||||||
|
|
||||||
omnisharp-vim
|
omnisharp-vim
|
||||||
];
|
];
|
||||||
extraConfig = ''
|
extraConfig = with builtins; readFile ./init.vim + readFile ./coc.vim;
|
||||||
colorscheme gruvbox
|
|
||||||
let g:gruvbox_number_column = 'bg1'
|
|
||||||
|
|
||||||
let mapleader=" "
|
|
||||||
let g:camelcasemotion_key = '<leader>'
|
|
||||||
|
|
||||||
" coc config
|
|
||||||
inoremap <silent><expr> <c-space> coc#refresh()
|
|
||||||
|
|
||||||
" omnisharp-vim config:
|
|
||||||
let g:OmniSharp_server_stdio = 1
|
|
||||||
let g:OmniSharp_server_path = '/home/felschr/.nix-profile/bin/omnisharp'
|
|
||||||
let g:OmniSharp_selector_ui = 'fzf'
|
|
||||||
let g:OmniSharp_highlight_types = 3
|
|
||||||
let g:ale_linters = {
|
|
||||||
\ 'cs': ['OmniSharp']
|
|
||||||
\}
|
|
||||||
|
|
||||||
" call nvim_lsp#setup("tsserver", {})
|
|
||||||
" call nvim_lsp#setup("ghcide", {})
|
|
||||||
|
|
||||||
set relativenumber
|
|
||||||
set wildmenu
|
|
||||||
set wildmode=longest,list,full
|
|
||||||
|
|
||||||
map ; :Files<CR>
|
|
||||||
map <C-o> :NERDTreeToggle<CR>
|
|
||||||
map <Leader> <Plug>(easymotion-prefix)
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue