aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkshay <[email protected]>2020-10-04 10:11:10 +0100
committerAkshay <[email protected]>2020-10-04 10:11:10 +0100
commit93b9d17c6b2c8f63b1d05205c6ec696d998f904c (patch)
tree9bbf987a94754646c6ffc4360af86acd3cafbbf3
parent2ea85d463a7be88b18571277c25056037e07e830 (diff)
migrate to home-manager
-rw-r--r--bash/.bash_aliases2
-rw-r--r--bash/.bash_profile4
-rwxr-xr-xbash/.bash_prompt20
-rw-r--r--bash/.bashrc6
-rw-r--r--nvim/.config/nvim/coc-settings.json26
-rw-r--r--nvim/.config/nvim/ftplugin/wiki.vim1
-rw-r--r--nvim/.config/nvim/init.vim6
7 files changed, 51 insertions, 14 deletions
diff --git a/bash/.bash_aliases b/bash/.bash_aliases
index efecd71..60c1d93 100644
--- a/bash/.bash_aliases
+++ b/bash/.bash_aliases
@@ -23,3 +23,5 @@ alias ggp='git push'
23alias gl='git log -p --abbrev-commit --pretty=medium' 23alias gl='git log -p --abbrev-commit --pretty=medium'
24alias glo='git log --pretty=oneline --abbrev-commit' 24alias glo='git log --pretty=oneline --abbrev-commit'
25alias gst='git status --short' 25alias gst='git status --short'
26
27alias pfetch='pfetch | sed -r "s/\x1B\[([0-9]{1,3}(;[0-9]{1,2})?)?[mGK]//g"'
diff --git a/bash/.bash_profile b/bash/.bash_profile
index d7df6a9..6d8c25b 100644
--- a/bash/.bash_profile
+++ b/bash/.bash_profile
@@ -2,7 +2,3 @@
2 2
3# Get the aliases and functions 3# Get the aliases and functions
4[ -f $HOME/.bashrc ] && . $HOME/.bashrc 4[ -f $HOME/.bashrc ] && . $HOME/.bashrc
5
6
7
8export PATH="$HOME/.poetry/bin:$PATH"
diff --git a/bash/.bash_prompt b/bash/.bash_prompt
index ca47d1d..eaeecb6 100755
--- a/bash/.bash_prompt
+++ b/bash/.bash_prompt
@@ -15,10 +15,10 @@ git_branch() {
15 15
16 if [[ $git_status =~ $on_branch ]]; then 16 if [[ $git_status =~ $on_branch ]]; then
17 local branch=${BASH_REMATCH[1]} 17 local branch=${BASH_REMATCH[1]}
18 echo -ne "\001${cyn}\002 $branch\001${rst}\002" 18 echo -ne "\001${cyn}\002$branch\001${rst}\002"
19 elif [[ $git_status =~ $on_commit ]]; then 19 elif [[ $git_status =~ $on_commit ]]; then
20 local commit=${BASH_REMATCH[1]} 20 local commit=${BASH_REMATCH[1]}
21 echo -ne "\001${prp}\002 $commit\001${rst}\002" 21 echo -ne "\001${prp}\002$commit\001${rst}\002"
22 fi 22 fi
23} 23}
24 24
@@ -29,7 +29,7 @@ prompt_pwd() {
29 echo "/" 29 echo "/"
30 else 30 else
31 path="$(echo $PWD | sed -e "s-$HOME/--g")" 31 path="$(echo $PWD | sed -e "s-$HOME/--g")"
32 echo -ne " \001${gry}\002$path/\001${rst}\002" 32 echo -ne "\001${gry}\002$path/\001${rst}\002"
33 fi 33 fi
34} 34}
35 35
@@ -37,7 +37,7 @@ rootornot() {
37 if [[ "$(id -u)" -eq 0 ]]; then 37 if [[ "$(id -u)" -eq 0 ]]; then
38 echo -ne "\001${red}\002#\001${rst}\002" 38 echo -ne "\001${red}\002#\001${rst}\002"
39 else 39 else
40 echo -ne "$" 40 echo -ne "λ"
41 fi 41 fi
42} 42}
43 43
@@ -47,7 +47,19 @@ host() {
47 fi 47 fi
48} 48}
49 49
50in_nix() {
51 if [ "$IN_NIX_SHELL" == "impure" ]; then
52 echo -ne "\001${red}\002(nix)\001${rst}\002"
53 elif [ "$IN_NIX_SHELL" == "pure" ]; then
54 echo -ne "\001${grn}\002(nix)\001${rst}\002"
55 else
56 echo -ne ""
57 fi
58
59}
60
50 61
62# export PS1='\n$(prompt_pwd) $(git_branch)\n$(rootornot) '
51export PS1='\n$(pista)' 63export PS1='\n$(pista)'
52 64
53export PS2=" > " 65export PS2=" > "
diff --git a/bash/.bashrc b/bash/.bashrc
index 656978a..279a81a 100644
--- a/bash/.bashrc
+++ b/bash/.bashrc
@@ -2,11 +2,10 @@ export PATH=$PATH":$HOME/scripts"
2 2
3export TERM=xterm-256color-italic 3export TERM=xterm-256color-italic
4export EDITOR="/run/current-system/sw/bin/nvim" 4export EDITOR="/run/current-system/sw/bin/nvim"
5export MANPAGER="less" 5export MANPAGER="nvim +Man!"
6export BROWSER="/run/current-system/sw/bin/nvim" 6export BROWSER="/run/current-system/sw/bin/nvim"
7export GPG_TTY=$(tty) 7export GPG_TTY=$(tty)
8export TZ='Asia/Kolkata' 8export TZ='Asia/Kolkata'
9export FZF_DEFAULT_OPTS='--height 40% --layout=reverse --color=bw'
10 9
11export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' 10export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
12 11
@@ -53,7 +52,7 @@ fi
53 52
54[ -f $HOME/.github ] && . $HOME/.github 53[ -f $HOME/.github ] && . $HOME/.github
55[ -f ~/.bash_aliases ] && . ~/.bash_aliases 54[ -f ~/.bash_aliases ] && . ~/.bash_aliases
56[ -f ~/.bash_prompt ] && . ~/.bash_prompt 55# [ -f ~/.bash_prompt ] && . ~/.bash_prompt
57[ -f ~/.fzf.bash ] && source ~/.fzf.bash 56[ -f ~/.fzf.bash ] && source ~/.fzf.bash
58 57
59eval "$(stack --bash-completion-script stack)" 58eval "$(stack --bash-completion-script stack)"
@@ -110,3 +109,4 @@ export BRANCH_COLOR="bright black"
110# if HEAD ref peels to a commit (detached state) 109# if HEAD ref peels to a commit (detached state)
111export COMMIT_COLOR="green" 110export COMMIT_COLOR="green"
112 111
112eval "$(direnv hook bash)"
diff --git a/nvim/.config/nvim/coc-settings.json b/nvim/.config/nvim/coc-settings.json
index f211585..8515224 100644
--- a/nvim/.config/nvim/coc-settings.json
+++ b/nvim/.config/nvim/coc-settings.json
@@ -2,7 +2,7 @@
2 "suggest.timeout": 500, 2 "suggest.timeout": 500,
3 "coc.source.vimtex.enable": true, 3 "coc.source.vimtex.enable": true,
4 "coc.preferences.formatOnSaveFiletypes": [ 4 "coc.preferences.formatOnSaveFiletypes": [
5 "dart", 5 "rust",
6 "python" 6 "python"
7 ], 7 ],
8 "coc.preferences.hoverTarget": "preview", 8 "coc.preferences.hoverTarget": "preview",
@@ -13,6 +13,18 @@
13 "filetypes": ["sh"], 13 "filetypes": ["sh"],
14 "ignoredRootPaths": ["~"] 14 "ignoredRootPaths": ["~"]
15 }, 15 },
16 "nix": {
17 "command": "rnix-lsp",
18 "filetypes": ["nix"]
19 },
20 "elmLS": {
21 "command": "elm-language-server",
22 "filetypes": ["elm"],
23 "rootPatterns": ["elm.json"],
24 "initializationOptions": {
25 "elmAnalyseTrigger": "never"
26 }
27 },
16 "ccls": { 28 "ccls": {
17 "command": "ccls", 29 "command": "ccls",
18 "filetypes": ["c", "cpp", "objc", "objcpp"], 30 "filetypes": ["c", "cpp", "objc", "objcpp"],
@@ -25,7 +37,7 @@
25 } 37 }
26 }, 38 },
27 "haskell": { 39 "haskell": {
28 "command": "hie-wrapper", 40 "command": "hie",
29 "args": ["--lsp"], 41 "args": ["--lsp"],
30 "rootPatterns": [ 42 "rootPatterns": [
31 "stack.yaml", 43 "stack.yaml",
@@ -52,11 +64,19 @@
52 "messageTarget": "float", 64 "messageTarget": "float",
53 "messageDelay": 150 65 "messageDelay": 150
54 }, 66 },
67 "python.pythonPath": "./env/python",
55 "python.formatting.provider": "black", 68 "python.formatting.provider": "black",
69 "python.formatting.blackPath": "./env/black",
70 "python.linting.mypyEnabled": true,
71 "python.linting.mypyPath": "./env/mypy",
72 "python.linting.pylintEnabled": false,
73 "python.linting.pylamaEnabled": true,
74 "python.linting.pylamaPath": "./env/pylama",
75 "python.sortImports.path": "./env/isort",
56 "python.jediEnabled": true, 76 "python.jediEnabled": true,
57 "rust-analyzer": { 77 "rust-analyzer": {
58 "serverPath": "/home/np/.nix-profile/bin/rust-analyzer", 78 "serverPath": "/home/np/.nix-profile/bin/rust-analyzer",
59 "inlayHints.chainingHints": true, 79 "inlayHints.chainingHints": false,
60 "procMacro.enable": true, 80 "procMacro.enable": true,
61 "lruCapacity": 12 81 "lruCapacity": 12
62 } 82 }
diff --git a/nvim/.config/nvim/ftplugin/wiki.vim b/nvim/.config/nvim/ftplugin/wiki.vim
new file mode 100644
index 0000000..88a5339
--- /dev/null
+++ b/nvim/.config/nvim/ftplugin/wiki.vim
@@ -0,0 +1 @@
set textwidth=72
diff --git a/nvim/.config/nvim/init.vim b/nvim/.config/nvim/init.vim
index 3d72490..d46bf88 100644
--- a/nvim/.config/nvim/init.vim
+++ b/nvim/.config/nvim/init.vim
@@ -13,6 +13,7 @@ Plug 'mattn/emmet-vim', {'for': ['javascript.jsx', 'html', 'css']}
13Plug 'neoclide/coc.nvim', {'do': { -> coc#util#install()}, 'branch': 'release'} 13Plug 'neoclide/coc.nvim', {'do': { -> coc#util#install()}, 'branch': 'release'}
14Plug 'wellle/targets.vim' 14Plug 'wellle/targets.vim'
15Plug 'editorconfig/editorconfig-vim' 15Plug 'editorconfig/editorconfig-vim'
16Plug 'vimwiki/vimwiki'
16 17
17" tpope 18" tpope
18Plug 'tpope/vim-repeat' 19Plug 'tpope/vim-repeat'
@@ -24,6 +25,7 @@ Plug 'tpope/vim-fugitive'
24Plug 'rust-lang/rust.vim', {'for': 'rust'} 25Plug 'rust-lang/rust.vim', {'for': 'rust'}
25Plug 'lervag/vimtex', {'for': 'tex'} 26Plug 'lervag/vimtex', {'for': 'tex'}
26Plug 'neovimhaskell/haskell-vim', {'for': 'haskell'} 27Plug 'neovimhaskell/haskell-vim', {'for': 'haskell'}
28Plug 'elmcast/elm-vim'
27Plug 'LnL7/vim-nix' 29Plug 'LnL7/vim-nix'
28 30
29" colorschemes 31" colorschemes
@@ -188,3 +190,7 @@ hi CocInfoFloat ctermfg=7
188hi CocHintFloat ctermfg=7 190hi CocHintFloat ctermfg=7
189 191
190hi CocRustChainingHint ctermfg=8 192hi CocRustChainingHint ctermfg=8
193
194" elm-vim
195let g:elm_setup_keybindings = 0
196