mirror of
https://github.com/dcarrillo/dotfiles.git
synced 2025-07-06 22:09:26 +00:00
Compare commits
415 Commits
b010ffb1ed
...
master
Author | SHA1 | Date | |
---|---|---|---|
38df9487b6
|
|||
22263d4618
|
|||
1d673bd84b
|
|||
5954e722a4
|
|||
9240d26985
|
|||
b216a6fa98
|
|||
b17ddfc960
|
|||
50cb50b6d7
|
|||
070a7fceb4
|
|||
075e835025
|
|||
89de9ee42d
|
|||
436cdd76b2
|
|||
6408d33eea
|
|||
7d01253a29
|
|||
8e93236e49
|
|||
be77321037
|
|||
19e4045c5b
|
|||
757369a219
|
|||
b70377ebfa
|
|||
d411edcb92
|
|||
85eca71ca1
|
|||
846d522a7a
|
|||
cb37621f00
|
|||
40310a71e5
|
|||
5f595edeb1
|
|||
8d7675acf4
|
|||
b8fcf02379
|
|||
e6f9e2b916
|
|||
7972bb6ebb
|
|||
2059c85c13
|
|||
998d80ceb6
|
|||
af5cecec2d
|
|||
5fa2563ae1
|
|||
a5af2b4f2a
|
|||
d2322c41da
|
|||
3d5ae14006
|
|||
302db332f9
|
|||
b40fa30e54
|
|||
c6f899c9ac
|
|||
a2044ecd0e
|
|||
eeb1f485e8
|
|||
bbe971d799
|
|||
f94d9566df
|
|||
c23f469e05
|
|||
43abb65b09
|
|||
40afa2a707
|
|||
e8245a6677
|
|||
23bd734c9f
|
|||
722a32eb47
|
|||
6ba0c5d93a
|
|||
5c6af0d906
|
|||
e13b0eb7d6
|
|||
ba32c19ee4
|
|||
a231d514e3
|
|||
68c4e18c45
|
|||
80c642ca64
|
|||
7a484792f4
|
|||
2e46b594af
|
|||
28eeb2842c
|
|||
d401b13d5a
|
|||
402cd5365e
|
|||
d081f1b383
|
|||
fbd8604a03
|
|||
276644ae24
|
|||
b2f2fd39eb
|
|||
350e0db659
|
|||
bab0031f5e
|
|||
6c42fb1c09
|
|||
32417a0bce
|
|||
4dbd86b344
|
|||
691b7dd560
|
|||
4b74c72c75
|
|||
42e7fab6b9
|
|||
eeca05d1ce
|
|||
c3f5145f96
|
|||
7fae597d4d
|
|||
a27f333df7
|
|||
8503db94e1
|
|||
ed1719fec4
|
|||
de0a24ff85
|
|||
29a4fba578
|
|||
9343a1e579
|
|||
e3e411b629
|
|||
886f6f9e7b
|
|||
05a6ab00c7
|
|||
13c4ba65b2
|
|||
edd45b864f
|
|||
d959317c51
|
|||
960573ae4e
|
|||
42647db6d2
|
|||
25e8eaed6e
|
|||
9a556ca42e
|
|||
c76596f563
|
|||
bb50eda917
|
|||
29a97b4aa3
|
|||
db10008f9b
|
|||
c26fd3ebb3
|
|||
ec1df73ac2
|
|||
7f27d4f513 | |||
a77d107506
|
|||
14ba206729
|
|||
0b65ac5850
|
|||
f49ebe3281
|
|||
5e75a4e564
|
|||
92e128c6f4
|
|||
069882fcb8
|
|||
e7575a7c1f
|
|||
7aad945ee7
|
|||
9bd0a1bee1
|
|||
23c3d24af9
|
|||
d4a0ca209d
|
|||
747aec9253
|
|||
e113aa7cfb
|
|||
f29bfc1859
|
|||
cfa173dd69
|
|||
b04ef395f4
|
|||
4d58238b78
|
|||
97f17efb29
|
|||
65173c1664
|
|||
48a32697c9
|
|||
78b1ce547c
|
|||
c6c9440d60
|
|||
a4f1186c35
|
|||
e7bf2eb91d
|
|||
aceaa089f0
|
|||
4c930ccf31
|
|||
2ebf440c20
|
|||
cec9545d6e
|
|||
e6cf00d32d
|
|||
7cba66aa8e
|
|||
f23a2e895a
|
|||
5d6b68c0bd
|
|||
d1c002183f
|
|||
64cf03dcac
|
|||
81e4ec11d8
|
|||
0440ce8dac
|
|||
89233343c6
|
|||
b80f54b07c
|
|||
6bd5f85550
|
|||
daef32ffe8
|
|||
1499944349
|
|||
9088a43f22
|
|||
c5b60a99ca
|
|||
d24dfcdcbd
|
|||
6653d59450
|
|||
60dc8f5b45
|
|||
d1d27b8273
|
|||
771b464d7d
|
|||
3ca30002b4
|
|||
8d4f9cf213
|
|||
d3ee381b08
|
|||
b682fa7f26
|
|||
146bb26bf2
|
|||
e29afbd9aa
|
|||
a4cdf15790
|
|||
0d35b2858e
|
|||
4ff487f1e0
|
|||
8a3e2f6e9a
|
|||
8a7b28f1cb
|
|||
66a3e25a2b
|
|||
b7ba811d1f
|
|||
fb9748c38d
|
|||
d5c9273e44
|
|||
d05e572840
|
|||
6dee13061c
|
|||
4442e0afed
|
|||
dd2c521312
|
|||
bc6814d32e
|
|||
ef5524d858
|
|||
b2340e5ac8
|
|||
c1f3590bea
|
|||
78d7f98156
|
|||
6194432e9e
|
|||
f408f6a703
|
|||
3a65d5bdce
|
|||
d30dee3e24
|
|||
47f493b203
|
|||
81825f2610
|
|||
559db5cc5a
|
|||
47b946d65a
|
|||
f28515a1d3
|
|||
5bd86e84d1
|
|||
221a87cad1
|
|||
8fcb4267cc
|
|||
f7c1110ca3
|
|||
46799fd4af
|
|||
24f0db31b9
|
|||
b5e8ab9dbd
|
|||
3907b78f40
|
|||
febd607c46
|
|||
a3f634c84b
|
|||
16dc57cf7e
|
|||
22c11f1670
|
|||
e1f51b91cb
|
|||
8b6f663827
|
|||
f0810b2e32
|
|||
b5ffc202a4
|
|||
d24edce15e
|
|||
c6073a1060
|
|||
ebd669418d
|
|||
f5ceda97c2
|
|||
ed3e082f1c
|
|||
a735266834
|
|||
d6cb5708f8
|
|||
e7bc25f1dc
|
|||
a3fdef2a7e
|
|||
8ee1860a14
|
|||
46abddfc51
|
|||
ba898d7e5a
|
|||
905e697812
|
|||
ad1de3bdf5
|
|||
713a302bee
|
|||
83e533b928
|
|||
9a6d586be1
|
|||
2beb13dc95
|
|||
fdadc4df7d
|
|||
c490714638
|
|||
49b7a899aa
|
|||
a88d10dbca
|
|||
53668fe4ea
|
|||
3f298771a5
|
|||
a5f849c30e
|
|||
b748759365
|
|||
0f9d10ef4e
|
|||
3902d4f59a
|
|||
296f714e8d
|
|||
b88350b589
|
|||
037e530499
|
|||
12cb52c3e3
|
|||
e2462448f5
|
|||
abcbf20581
|
|||
828b1147fc
|
|||
a67d1337bb
|
|||
4321ddd3fc
|
|||
53f2862965
|
|||
ae6899ae2c
|
|||
155b470dd3
|
|||
84b32104ce
|
|||
7f1282053c
|
|||
36a6e89f25
|
|||
1ad0ab4b6a
|
|||
2b1f625c70
|
|||
2e6da3cddd
|
|||
13509b672e
|
|||
8af359f74f
|
|||
3bc880fdac
|
|||
4f56be8231
|
|||
a610f01038
|
|||
da8f88c3d1
|
|||
0bd51fe728
|
|||
c4c6bb973a
|
|||
7cefda3d5c
|
|||
bb342fc0ce
|
|||
fcd4ea34d0
|
|||
15ac6f5d36
|
|||
68c32af645
|
|||
ff52cc24f0
|
|||
6567e2daae
|
|||
cb0c751e4d
|
|||
c1d4762753
|
|||
22ec5176a5
|
|||
5f49f56c07
|
|||
ba770ea11a
|
|||
68b5317f89
|
|||
fee817f060
|
|||
f5b705b7c5
|
|||
256d06bc31
|
|||
47a9afae4b
|
|||
dd77a5e33b
|
|||
3d21628328
|
|||
4356b20801
|
|||
e6ddc6fd97
|
|||
800dfa25b2
|
|||
b6dd8032be
|
|||
21e220944f
|
|||
1c8b7dace1
|
|||
0cd65ba797
|
|||
bcf883c627
|
|||
8720db68c0
|
|||
5cd23310d3
|
|||
3403d072e2
|
|||
0a826bb358
|
|||
1ffb91a650
|
|||
299418f1d7
|
|||
ab58a12dba
|
|||
53b4e077e6
|
|||
ef96d82bc3
|
|||
5b26ee227f
|
|||
7d849cc9bd
|
|||
cdcd1cbf9f
|
|||
06032b6fd0
|
|||
adf1a593f2
|
|||
80d19db6d8
|
|||
c6c1b756c4
|
|||
acae08976d
|
|||
c2a954f6fb
|
|||
771b5b23f7
|
|||
95c0df0d69
|
|||
0f873e9693
|
|||
803f745102
|
|||
bc172e2e98
|
|||
62bcbad040
|
|||
3cf635cd67
|
|||
39b8720d2b
|
|||
e14f9eb51e
|
|||
aa9af7d3d9
|
|||
233267719a
|
|||
f8982f2b9b
|
|||
6ec86fbfc9
|
|||
f4209afb2a
|
|||
4bedf29a2d
|
|||
61f113d9d8
|
|||
6a49395208
|
|||
dbf5025fdb
|
|||
4d0abc2278
|
|||
7a47f64b8f
|
|||
310fa9c7d7
|
|||
5c058ecbd3
|
|||
fd3bcf90db
|
|||
90998e270e
|
|||
9729277222
|
|||
e04ec2d1b5
|
|||
2073c7e453
|
|||
c45cbb63a6
|
|||
2d91bee816
|
|||
a642c809af
|
|||
203e1c92c8
|
|||
ecb0ff1e18
|
|||
c7b31bf5f1
|
|||
b00b4f22f3
|
|||
fd62f58949
|
|||
9288a68403
|
|||
d92b959107
|
|||
f25a72ce2a
|
|||
418c42bda2
|
|||
94cc9ace87
|
|||
5a13d12e33
|
|||
6066f801c6
|
|||
1982c685d4
|
|||
ab26d5d62c
|
|||
b6ffc9c179
|
|||
02cf8d1e52
|
|||
62deef62ec
|
|||
fa60eca975
|
|||
81035e624c
|
|||
2c602ab1d3
|
|||
5a9d5c507b
|
|||
e2ac092a81
|
|||
7ae6819126
|
|||
8948fc6620
|
|||
a0a449b7a0
|
|||
2fc006ba85
|
|||
89f28aba90
|
|||
e6f3c13e25
|
|||
adefa851d7
|
|||
731ec1713c
|
|||
ae25771e56
|
|||
2a9ea0af68 | |||
705fcff7d9
|
|||
efbd6fe295
|
|||
017ba8baa2
|
|||
33790440f2
|
|||
e946d6a14b
|
|||
b8a07a3eba
|
|||
bc0ff82244
|
|||
e086949aaf
|
|||
73e4047c86
|
|||
f211112451
|
|||
1712274793
|
|||
893b6e0b7b
|
|||
1ebdd0846c
|
|||
fde23b9939
|
|||
3c444a1419
|
|||
ebde2479a2
|
|||
ea6d1e1b42
|
|||
be71e93f04
|
|||
360cff63a9
|
|||
847d1f9d71
|
|||
728fbdc355
|
|||
fb863f0359
|
|||
4b51f8d6cd
|
|||
5aecb9f369
|
|||
5ba5be3325
|
|||
4b791cb985
|
|||
b136026491
|
|||
d43545b427
|
|||
daebb9d33a
|
|||
e5ca1076d4
|
|||
aad77aa8d6
|
|||
f476ddbb88
|
|||
f092bfd890
|
|||
4cc13c5af8
|
|||
63cc6ed077
|
|||
53f31a42bc
|
|||
ac2a761fae
|
|||
555b911467
|
|||
0ca5da2a4f
|
|||
c7d46c88cd
|
|||
57cd694d61
|
|||
0fe15ee9fe
|
|||
1922117cc5
|
|||
14fd6d7461
|
|||
e2af60c2f4
|
|||
bcbf336712
|
|||
99d8ae50b0
|
|||
09bf8eb8fe
|
|||
3923cf9b1f
|
|||
3e5f0cfd1c
|
|||
2df2a9ec0e
|
|||
c76feb3e12
|
|||
12271fe6b9
|
|||
848cd57045
|
|||
603115af8e
|
|||
3286dc5f4d
|
|||
1e87c687f9
|
@ -1,64 +0,0 @@
|
||||
# Configuration for Alacritty, the GPU enhanced terminal emulator.
|
||||
|
||||
# Any items in the `env` entry below will be added as
|
||||
# environment variables. Some entries may override variables
|
||||
# set by alacritty itself.
|
||||
env:
|
||||
TERM: xterm-256color
|
||||
# LANG: "en_US.UTF-8"
|
||||
# LC_CTYPE: en_US.UTF-8
|
||||
|
||||
shell:
|
||||
program: /bin/zsh
|
||||
args:
|
||||
- -l
|
||||
- -c
|
||||
- "tmux attach || tmux"
|
||||
|
||||
window:
|
||||
dimensions:
|
||||
columns: 150
|
||||
lines: 35
|
||||
position:
|
||||
x: 1200
|
||||
y: 510
|
||||
scrolling:
|
||||
history: 50000
|
||||
|
||||
cursor:
|
||||
style: Underline
|
||||
|
||||
selection:
|
||||
semantic_escape_chars: ",│`|:\"' ()[]{}<>\t"
|
||||
|
||||
font:
|
||||
normal:
|
||||
family: "Roboto Mono"
|
||||
style: Regular
|
||||
size: 9.0
|
||||
use_thin_strokes: true
|
||||
|
||||
colors:
|
||||
primary:
|
||||
background: '#073642'
|
||||
foreground: '#BABABA'
|
||||
|
||||
normal:
|
||||
black: '#000000'
|
||||
red: '#E8341C'
|
||||
green: '#68C256'
|
||||
yellow: '#F2D42C'
|
||||
blue: '#1C98E8'
|
||||
magenta: '#8E69C9'
|
||||
cyan: '#1C98E8'
|
||||
white: '#BABABA'
|
||||
|
||||
bright:
|
||||
black: '#666666'
|
||||
red: '#E05A4F'
|
||||
green: '#77B869'
|
||||
yellow: '#EFD64B'
|
||||
blue: '#387CD3'
|
||||
magenta: '#957BBE'
|
||||
cyan: '#3D97E2'
|
||||
white: '#BABABA'
|
2
.config/glrnvim/config.yml
Normal file
2
.config/glrnvim/config.yml
Normal file
@ -0,0 +1,2 @@
|
||||
backend: kitty
|
||||
load_term_conf: true
|
42
.config/kitty/color_schemes/github_dimmed.conf
Normal file
42
.config/kitty/color_schemes/github_dimmed.conf
Normal file
@ -0,0 +1,42 @@
|
||||
# (Github Dark Dimmed) Colors for kitty
|
||||
# https://github.com/projekt0n/github-theme-contrib/blob/main/themes/kitty/github_dark_dimmed.conf
|
||||
|
||||
# Customized
|
||||
background #232136
|
||||
foreground #adbac7
|
||||
url_color #adbac7
|
||||
|
||||
cursor #adbac7
|
||||
cursor_text_color background
|
||||
|
||||
# Tabs
|
||||
active_tab_background #57ab5a
|
||||
# Customized
|
||||
active_tab_foreground #232136
|
||||
inactive_tab_background #253040
|
||||
inactive_tab_foreground #636e7b
|
||||
|
||||
# Windows Border
|
||||
active_border_color #539bf5
|
||||
inactive_border_color #333940
|
||||
|
||||
# normal
|
||||
color0 #545d68
|
||||
color1 #f47067
|
||||
color2 #57ab5a
|
||||
color3 #c69026
|
||||
color4 #539bf5
|
||||
# Customized color5
|
||||
color5 #fffacd
|
||||
color6 #39c5cf
|
||||
color7 #909dab
|
||||
|
||||
# bright
|
||||
color8 #636e7b
|
||||
color9 #ff938a
|
||||
color10 #6bc46d
|
||||
color11 #daaa3f
|
||||
color12 #6cb6ff
|
||||
color13 #dcbdfb
|
||||
color14 #56d4dd
|
||||
color15 #cdd9e5
|
55
.config/kitty/color_schemes/rose-pine-moon.conf
Normal file
55
.config/kitty/color_schemes/rose-pine-moon.conf
Normal file
@ -0,0 +1,55 @@
|
||||
## name: Rosé Pine Moon
|
||||
## author: mvllow
|
||||
## license: MIT
|
||||
## upstream: https://github.com/rose-pine/kitty/blob/main/dist/rose-pine-moon.conf
|
||||
## blurb: All natural pine, faux fur and a bit of soho vibes for the classy minimalist
|
||||
|
||||
foreground #e0def4
|
||||
background #232136
|
||||
selection_foreground #e0def4
|
||||
selection_background #44415a
|
||||
|
||||
cursor #56526e
|
||||
cursor_text_color #e0def4
|
||||
|
||||
url_color #c4a7e7
|
||||
|
||||
active_tab_foreground #e0def4
|
||||
active_tab_background #393552
|
||||
inactive_tab_foreground #6e6a86
|
||||
inactive_tab_background #232136
|
||||
|
||||
active_border_color #3e8fb0
|
||||
inactive_border_color #44415a
|
||||
|
||||
# black
|
||||
color0 #393552
|
||||
color8 #6e6a86
|
||||
|
||||
# red
|
||||
color1 #eb6f92
|
||||
color9 #eb6f92
|
||||
|
||||
# green
|
||||
color2 #3e8fb0
|
||||
color10 #3e8fb0
|
||||
|
||||
# yellow
|
||||
color3 #f6c177
|
||||
color11 #f6c177
|
||||
|
||||
# blue
|
||||
color4 #9ccfd8
|
||||
color12 #9ccfd8
|
||||
|
||||
# magenta
|
||||
color5 #c4a7e7
|
||||
color13 #c4a7e7
|
||||
|
||||
# cyan
|
||||
color6 #ea9a97
|
||||
color14 #ea9a97
|
||||
|
||||
# white
|
||||
color7 #e0def4
|
||||
color15 #e0def4
|
50
.config/kitty/color_schemes/tokyo_night_moon.conf
Normal file
50
.config/kitty/color_schemes/tokyo_night_moon.conf
Normal file
@ -0,0 +1,50 @@
|
||||
# vim:ft=kitty
|
||||
|
||||
## name: Tokyo Night Moon
|
||||
## license: MIT
|
||||
## author: Folke Lemaitre
|
||||
## upstream: https://github.com/folke/tokyonight.nvim/raw/main/extras/kitty/tokyonight_moon.conf
|
||||
|
||||
|
||||
background #222436
|
||||
foreground #c8d3f5
|
||||
selection_background #2d3f76
|
||||
selection_foreground #c8d3f5
|
||||
url_color #4fd6be
|
||||
cursor #c8d3f5
|
||||
cursor_text_color #222436
|
||||
|
||||
# Tabs
|
||||
active_tab_background #82aaff
|
||||
active_tab_foreground #1e2030
|
||||
inactive_tab_background #2f334d
|
||||
inactive_tab_foreground #545c7e
|
||||
#tab_bar_background #1b1d2b
|
||||
|
||||
# Windows
|
||||
active_border_color #82aaff
|
||||
inactive_border_color #2f334d
|
||||
|
||||
# normal
|
||||
color0 #1b1d2b
|
||||
color1 #ff757f
|
||||
color2 #c3e88d
|
||||
color3 #ffc777
|
||||
color4 #82aaff
|
||||
color5 #c099ff
|
||||
color6 #86e1fc
|
||||
color7 #828bb8
|
||||
|
||||
# bright
|
||||
color8 #444a73
|
||||
color9 #ff8d94
|
||||
color10 #c7fb6d
|
||||
color11 #ffd8ab
|
||||
color12 #9ab8ff
|
||||
color13 #caabff
|
||||
color14 #b2ebff
|
||||
color15 #c8d3f5
|
||||
|
||||
# extended colors
|
||||
color16 #ff966c
|
||||
color17 #c53b53
|
23
.config/kitty/diff.conf
Normal file
23
.config/kitty/diff.conf
Normal file
@ -0,0 +1,23 @@
|
||||
pygments_style nord
|
||||
|
||||
background #222436
|
||||
|
||||
title_bg #222436
|
||||
title_fg #82AAFF
|
||||
|
||||
filler_bg #222436
|
||||
|
||||
hunk_margin_bg #222436
|
||||
hunk_bg #222436
|
||||
|
||||
added_bg #273849
|
||||
removed_bg #3A273A
|
||||
|
||||
highlight_added_bg #305F6F
|
||||
highlight_removed_bg #6B2E43
|
||||
|
||||
margin_bg #222436
|
||||
added_margin_bg #273849
|
||||
removed_margin_bg #3A273A
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -10,10 +10,16 @@ import secretstorage
|
||||
|
||||
from kitty.boss import Boss
|
||||
|
||||
#
|
||||
# To add passwords to the Secret Service that can be retrieved for this kitten:
|
||||
# secret-tool store --label user1 description "Kitty password" id $(uuidgen)
|
||||
# secret-tool store --label user2 description "Kitty password" id $(uuidgen)
|
||||
# Add map to kitty.conf:
|
||||
# map ctrl+alt+p kitten secrets.py "description" "Kitty password"
|
||||
|
||||
def main(args: List[str]) -> Optional[str]:
|
||||
secrets = get_secret_names(args[1], args[2])
|
||||
entries = WordCompleter(secrets)
|
||||
entries = WordCompleter(list(secrets.keys()))
|
||||
session = PromptSession(completer=entries)
|
||||
try:
|
||||
entry = session.prompt('> ', pre_run=expand_prompt)
|
||||
@ -31,7 +37,7 @@ def expand_prompt() -> None:
|
||||
if buffer.complete_state:
|
||||
buffer.complete_next()
|
||||
else:
|
||||
buffer.start_completion(select_first=False)
|
||||
buffer.start_completion(select_first=True)
|
||||
|
||||
|
||||
def get_secret_names(attribute: str, value: str) -> Dict[str, str]:
|
||||
@ -48,7 +54,7 @@ def get_secret_names(attribute: str, value: str) -> Dict[str, str]:
|
||||
return secrets
|
||||
|
||||
|
||||
def handle_result(args: List[str], answer: str, target_window_id: int, boss: Boss) -> None:
|
||||
def handle_result(_: List[str], answer: str, target_window_id: int, boss: Boss) -> None:
|
||||
window = boss.window_id_map.get(target_window_id)
|
||||
if window is not None:
|
||||
window.paste(answer)
|
||||
|
19
.config/nvim/README.md
Normal file
19
.config/nvim/README.md
Normal file
@ -0,0 +1,19 @@
|
||||
# Neovim configuration files
|
||||
|
||||
Neovim conf heavily adapted to suit my needs, formerly based on LunarVim's [basic ide](https://github.com/LunarVim/nvim-basic-ide).
|
||||
|
||||
## Extra requeriments (Arch Linux package names)
|
||||
|
||||
* ripgrep
|
||||
* fd
|
||||
* git-delta
|
||||
* bat
|
||||
* prettier
|
||||
* stylua
|
||||
* python-cfn-lint
|
||||
* python-black
|
||||
* python-debugpy
|
||||
* hadolint
|
||||
* revive
|
||||
* tree-sitter-cli
|
||||
* Optional for copilotchat: `sudo luarocks install --lua-version 5.1 tiktoken_core`
|
2
.config/nvim/init.lua
Normal file
2
.config/nvim/init.lua
Normal file
@ -0,0 +1,2 @@
|
||||
require("core")
|
||||
require("plugins")
|
74
.config/nvim/lazy-lock.json
Normal file
74
.config/nvim/lazy-lock.json
Normal file
@ -0,0 +1,74 @@
|
||||
{
|
||||
"FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" },
|
||||
"auto-save.nvim": { "branch": "main", "commit": "4b59610e1318f8a89501cee9d47a0e8650f0a4d5" },
|
||||
"avante.nvim": { "branch": "main", "commit": "d3c93c0dabb4311d0af30940726fb0bff30a9676" },
|
||||
"b64.nvim": { "branch": "main", "commit": "e93d1a7e065f6eaf5d3bae9efb9bc2c30907f471" },
|
||||
"blink-copilot": { "branch": "main", "commit": "bdc45bbbed2ec252b3a29f4adecf031e157b5573" },
|
||||
"blink.cmp": { "branch": "main", "commit": "022521a8910a5543b0251b21c9e1a1e989745796" },
|
||||
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
|
||||
"conform.nvim": { "branch": "master", "commit": "0e93e0d12d2f7ebdea9e3e444dfaff0050cefbe6" },
|
||||
"copilot-lualine": { "branch": "main", "commit": "6bc29ba1fcf8f0f9ba1f0eacec2f178d9be49333" },
|
||||
"copilot.lua": { "branch": "master", "commit": "c1bb86abbed1a52a11ab3944ef00c8410520543d" },
|
||||
"copilotchat.nvim": { "branch": "main", "commit": "16d897fd43d07e3b54478ccdb2f8a16e4df4f45a" },
|
||||
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
|
||||
"dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" },
|
||||
"fzy-lua-native": { "branch": "master", "commit": "9d720745d5c2fb563c0d86c17d77612a3519c506" },
|
||||
"git-blame.nvim": { "branch": "master", "commit": "8503b199edf9a666fe7b1a989cf14e3c26b2eb03" },
|
||||
"github-nvim-theme": { "branch": "main", "commit": "c106c9472154d6b2c74b74565616b877ae8ed31d" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "d0f90ef51d4be86b824b012ec52ed715b5622e51" },
|
||||
"go.nvim": { "branch": "master", "commit": "a3455f48cff718a86275115523dcc735535a13aa" },
|
||||
"grug-far.nvim": { "branch": "main", "commit": "c36f5f9b53f12a60aa53d42282e8ae78aef72178" },
|
||||
"guihua.lua": { "branch": "master", "commit": "87bea7b98429405caf2a0ce4d029b027bb017c70" },
|
||||
"karen-yank.nvim": { "branch": "main", "commit": "817f50c9464ce557c8f7f8f4d4c8d2f7b81fc40c" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||
"leap.nvim": { "branch": "main", "commit": "9958013bd9c41e6f32af0202b9ea41055fe4667e" },
|
||||
"lspsaga.nvim": { "branch": "main", "commit": "920b1253e1a26732e53fac78412f6da7f674671d" },
|
||||
"lualine-lsp-progress": { "branch": "master", "commit": "56842d097245a08d77912edf5f2a69ba29f275d7" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "0c6cca9f2c63dadeb9225c45bc92bb95a151d4af" },
|
||||
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "bef29b653ba71d442816bf56286c2a686210be04" },
|
||||
"mason.nvim": { "branch": "main", "commit": "8024d64e1330b86044fed4c8494ef3dcd483a67c" },
|
||||
"mcphub.nvim": { "branch": "main", "commit": "7752efc63da929683c5d4812e7d0d066189ee68f" },
|
||||
"mini.comment": { "branch": "main", "commit": "fb867a9246f9b892cf51a8c84a3f8479cdf1558c" },
|
||||
"mini.pairs": { "branch": "main", "commit": "69864a2efb36c030877421634487fd90db1e4298" },
|
||||
"mini.surround": { "branch": "main", "commit": "5aab42fcdcf31fa010f012771eda5631c077840a" },
|
||||
"neotest": { "branch": "master", "commit": "ef492755730e59e1d8122c461abbd086bee4c76b" },
|
||||
"neotest-go": { "branch": "main", "commit": "92950ad7be2ca02a41abca5c6600ff6ffaf5b5d6" },
|
||||
"neotest-python": { "branch": "master", "commit": "34c9f6f3dc53fc462ea658b5071238037f95f7aa" },
|
||||
"neovim-project": { "branch": "main", "commit": "1205c8221b133c4291c1076ffeb3db244393f058" },
|
||||
"neovim-session-manager": { "branch": "master", "commit": "3409dc920d40bec4c901c0a122a80bee03d6d1e1" },
|
||||
"noice.nvim": { "branch": "main", "commit": "0427460c2d7f673ad60eb02b35f5e9926cf67c59" },
|
||||
"none-ls.nvim": { "branch": "main", "commit": "db2a48b79cfcdab8baa5d3f37f21c78b6705c62e" },
|
||||
"nui.nvim": { "branch": "main", "commit": "7cd18e73cfbd70e1546931b7268b3eebaeff9391" },
|
||||
"nvim-dap": { "branch": "master", "commit": "6a5bba0ddea5d419a783e170c20988046376090d" },
|
||||
"nvim-dap-python": { "branch": "master", "commit": "261ce649d05bc455a29f9636dc03f8cdaa7e0e2c" },
|
||||
"nvim-dap-ui": { "branch": "master", "commit": "f7d75cca202b52a60c520ec7b1ec3414d6e77b0f" },
|
||||
"nvim-dap-virtual-text": { "branch": "master", "commit": "fbdb48c2ed45f4a8293d0d483f7730d24467ccb6" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "a182334ba933e58240c2c45e6ae2d9c7ae313e00" },
|
||||
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||
"nvim-ts-context-commentstring": { "branch": "main", "commit": "1b212c2eee76d787bbea6aa5e92a2b534e7b4f8f" },
|
||||
"nvim-ufo": { "branch": "main", "commit": "3c7a3570e9c9dc198a2ad4491b0b0e51c4d4ba08" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "1fb58cca9aebbc4fd32b086cb413548ce132c127" },
|
||||
"outline.nvim": { "branch": "main", "commit": "321f89ef79f168a78685f70d70c52d0e7b563abb" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
||||
"promise-async": { "branch": "main", "commit": "119e8961014c9bfaf1487bf3c2a393d254f337e2" },
|
||||
"render-markdown": { "branch": "main", "commit": "2a9e0ab6043bfb4996ce6a6a35594ab357e5d299" },
|
||||
"rose-pine": { "branch": "main", "commit": "6b9840790cc7acdfadde07f308d34b62dd9cc675" },
|
||||
"snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" },
|
||||
"statuscol.nvim": { "branch": "main", "commit": "c46172d0911aa5d49ba5f39f4351d1bb7aa289cc" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },
|
||||
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
|
||||
"tokyonight.nvim": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" },
|
||||
"typescript-tools.nvim": { "branch": "master", "commit": "3c501d7c7f79457932a8750a2a1476a004c5c1a9" },
|
||||
"venv-selector.nvim": { "branch": "regexp", "commit": "c677caa1030808a9f90092e522de7cc20c1390dd" },
|
||||
"vim-bbye": { "branch": "master", "commit": "25ef93ac5a87526111f43e5110675032dbcacf56" },
|
||||
"vim-helm": { "branch": "master", "commit": "cc5ac22444332381f38084a6c7f023c25eef6201" },
|
||||
"vim-illuminate": { "branch": "master", "commit": "0d1e93684da00ab7c057410fecfc24f434698898" },
|
||||
"vim-kitty-navigator": { "branch": "master", "commit": "081c6f8f9eb17cddb4ff4cd1ad44db48aa76fe03" },
|
||||
"vim-markdown-toc": { "branch": "master", "commit": "aa9cc3b07791db5cbe5f29d661763bc0eb4fb7c1" },
|
||||
"vim-visual-multi": { "branch": "master", "commit": "a6975e7c1ee157615bbc80fc25e4392f71c344d4" },
|
||||
"yaml-companion.nvim": { "branch": "main", "commit": "131b0d67bd2e0f1a02e0daf2f3460482221ce3c0" }
|
||||
}
|
70
.config/nvim/lua/core/autocommands.lua
Normal file
70
.config/nvim/lua/core/autocommands.lua
Normal file
@ -0,0 +1,70 @@
|
||||
-- Highlight Yanked Text
|
||||
vim.api.nvim_create_autocmd("TextYankPost", {
|
||||
callback = function()
|
||||
(vim.hl or vim.highlight).on_yank()
|
||||
end,
|
||||
})
|
||||
|
||||
-- resize splits if window got resized
|
||||
vim.api.nvim_create_autocmd("VimResized", {
|
||||
callback = function()
|
||||
local current_tab = vim.fn.tabpagenr()
|
||||
vim.cmd("tabdo wincmd =")
|
||||
vim.cmd("tabnext " .. current_tab)
|
||||
end,
|
||||
})
|
||||
|
||||
-- Set expandtab=true in several file types
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = { "go", "makefile", "lua" },
|
||||
callback = function()
|
||||
vim.opt_local.expandtab = false
|
||||
end,
|
||||
})
|
||||
|
||||
-- Use 'q' to quit from common plugins
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = {
|
||||
"PlenaryTestPopup",
|
||||
"checkhealth",
|
||||
"dbout",
|
||||
"gitsigns-blame",
|
||||
"grug-far",
|
||||
"help",
|
||||
"lspinfo",
|
||||
"neotest-output",
|
||||
"neotest-output-panel",
|
||||
"neotest-summary",
|
||||
"notify",
|
||||
"qf",
|
||||
},
|
||||
callback = function(event)
|
||||
vim.bo[event.buf].buflisted = false
|
||||
vim.schedule(function()
|
||||
vim.keymap.set("n", "q", function()
|
||||
vim.cmd("close")
|
||||
pcall(vim.api.nvim_buf_delete, event.buf, { force = true })
|
||||
end, {
|
||||
buffer = event.buf,
|
||||
silent = true,
|
||||
desc = "Quit buffer",
|
||||
})
|
||||
end)
|
||||
end,
|
||||
})
|
||||
|
||||
-- Ensure terraform files use hcl LSP
|
||||
vim.api.nvim_create_autocmd({ "BufNewFile", "BufRead" }, {
|
||||
pattern = { "*.tf" },
|
||||
callback = function()
|
||||
vim.cmd([[
|
||||
set filetype=hcl
|
||||
]])
|
||||
end,
|
||||
})
|
||||
|
||||
-- Set hcl and helm indentation to 2
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = { "hcl", "helm" },
|
||||
command = "setlocal shiftwidth=2 tabstop=2",
|
||||
})
|
15
.config/nvim/lua/core/commands.lua
Normal file
15
.config/nvim/lua/core/commands.lua
Normal file
@ -0,0 +1,15 @@
|
||||
vim.api.nvim_create_user_command("CopyBufferPath", function()
|
||||
local path = vim.fn.expand("%:p")
|
||||
vim.fn.setreg("+", path)
|
||||
vim.notify('Copied "' .. path .. '" to the clipboard!')
|
||||
end, {})
|
||||
|
||||
vim.api.nvim_create_user_command("CopyDirectoryPath", function()
|
||||
local path = vim.fn.expand("%:p:h")
|
||||
vim.fn.setreg("+", path)
|
||||
vim.notify('Copied "' .. path .. '" to the clipboard!')
|
||||
end, {})
|
||||
|
||||
vim.api.nvim_create_user_command("RemoveTrailingSpaces", function()
|
||||
vim.cmd("% s/\\s\\+$//e")
|
||||
end, {})
|
5
.config/nvim/lua/core/init.lua
Normal file
5
.config/nvim/lua/core/init.lua
Normal file
@ -0,0 +1,5 @@
|
||||
require("core.options")
|
||||
require("core.keymaps")
|
||||
require("core.lazy")
|
||||
require("core.autocommands")
|
||||
require("core.commands")
|
317
.config/nvim/lua/core/keymaps.lua
Normal file
317
.config/nvim/lua/core/keymaps.lua
Normal file
@ -0,0 +1,317 @@
|
||||
-- Shorten function name
|
||||
local keymap = vim.keymap.set
|
||||
-- Silent keymap option
|
||||
local opts = { noremap = true, silent = true }
|
||||
|
||||
--Remap space as leader key
|
||||
keymap("", "<Space>", "<Nop>", opts)
|
||||
vim.g.mapleader = " "
|
||||
|
||||
-- Modes
|
||||
-- normal_mode = "n",
|
||||
-- insert_mode = "i",
|
||||
-- visual_mode = "v",
|
||||
-- visual_block_mode = "x",
|
||||
-- term_mode = "t",
|
||||
-- command_mode = "c",
|
||||
--
|
||||
|
||||
-- Apply q macro
|
||||
keymap("n", "<F9>", "@q", vim.tbl_extend("force", opts, { desc = "Run default macro" }))
|
||||
|
||||
-- Quit
|
||||
keymap(
|
||||
"n",
|
||||
"<leader>q",
|
||||
"<cmd>quit!<cr>",
|
||||
vim.tbl_extend("force", opts, { desc = "Quit current buffer, even if there's unsaved work" })
|
||||
)
|
||||
keymap(
|
||||
"n",
|
||||
"<leader>qa",
|
||||
"<cmd>quitall!<cr>",
|
||||
vim.tbl_extend("force", opts, { desc = "Quit all buffers, even those with unsaved work" })
|
||||
)
|
||||
|
||||
-- Kitty navigation
|
||||
vim.g.kitty_navigator_no_mappings = 1
|
||||
keymap("n", "<A-Left>", ":KittyNavigateLeft<cr>", vim.tbl_extend("force", opts, { desc = "Navigate left" }))
|
||||
keymap("n", "<A-Down>", ":KittyNavigateDown<cr>", vim.tbl_extend("force", opts, { desc = "Navigate down" }))
|
||||
keymap("n", "<A-Up>", ":KittyNavigateUp<cr>", vim.tbl_extend("force", opts, { desc = "Navigate up" }))
|
||||
keymap("n", "<A-Right>", ":KittyNavigateRight<cr>", vim.tbl_extend("force", opts, { desc = "Navigate right" }))
|
||||
|
||||
-- Resize with arrows
|
||||
keymap("n", "<C-Up>", ":resize -2<cr>", vim.tbl_extend("force", opts, { desc = "Window horizontal resize -2" }))
|
||||
keymap("n", "<C-Down>", ":resize +2<cr>", vim.tbl_extend("force", opts, { desc = "Window horizontal resize +2" }))
|
||||
keymap(
|
||||
"n",
|
||||
"<C-Left>",
|
||||
":vertical resize -2<cr>",
|
||||
vim.tbl_extend("force", opts, { desc = "Window vertical resize -2" })
|
||||
)
|
||||
keymap(
|
||||
"n",
|
||||
"<C-Right>",
|
||||
":vertical resize +2<cr>",
|
||||
vim.tbl_extend("force", opts, { desc = "Window vertical resize +2" })
|
||||
)
|
||||
|
||||
-- Navigate buffers
|
||||
keymap(
|
||||
"n",
|
||||
"<C-PageDown>",
|
||||
":bnext<cr>",
|
||||
vim.tbl_extend("force", opts, { desc = "Navigate to the next buffer on the right" })
|
||||
)
|
||||
keymap(
|
||||
"n",
|
||||
"<C-PageUp>",
|
||||
":bprevious<cr>",
|
||||
vim.tbl_extend("force", opts, { desc = "Navigate to the previous buffer on the left" })
|
||||
)
|
||||
|
||||
keymap("n", "<bs>", ":edit #<cr>", vim.tbl_extend("force", opts, { desc = "Back to previous file", silent = true }))
|
||||
|
||||
-- Clear highlights
|
||||
keymap("n", "<leader>h", "<cmd>nohlsearch<cr>", vim.tbl_extend("force", opts, { desc = "Clear search highlights" }))
|
||||
|
||||
-- Close buffers
|
||||
keymap("n", "<S-q>", "<cmd>Bdelete!<cr>", vim.tbl_extend("force", opts, { desc = "Close buffer" }))
|
||||
|
||||
-- LSP / Diagnostics
|
||||
keymap(
|
||||
"n",
|
||||
"<leader>xx",
|
||||
"<cmd>Trouble diagnostics toggle<cr>",
|
||||
vim.tbl_extend("force", opts, { desc = "Toggle trouble diganostics" })
|
||||
)
|
||||
keymap(
|
||||
"n",
|
||||
"<leader>xd",
|
||||
"<cmd>Trouble diagnostics toggle filter.buf=0<cr>",
|
||||
vim.tbl_extend("force", opts, { desc = "Toggle trouble buffer diganostics" })
|
||||
)
|
||||
keymap(
|
||||
"n",
|
||||
"K",
|
||||
"<cmd>Lspsaga hover_doc<cr>",
|
||||
vim.tbl_extend("force", opts, { desc = "Show a hover window with the documentation" })
|
||||
)
|
||||
keymap(
|
||||
"n",
|
||||
"E",
|
||||
"<cmd>Lspsaga show_line_diagnostics<cr>",
|
||||
vim.tbl_extend("force", opts, { desc = "Show a hover window with the diagnostics of the error" })
|
||||
)
|
||||
keymap(
|
||||
"n",
|
||||
"gd",
|
||||
"<cmd>Lspsaga finder<cr>",
|
||||
vim.tbl_extend("force", opts, { desc = "Show a hover window with the usage of the directive under the cursor" })
|
||||
)
|
||||
keymap(
|
||||
"n",
|
||||
"<leader>ld",
|
||||
"<cmd>Lspsaga goto_definition<cr>",
|
||||
vim.tbl_extend("force", opts, { desc = "Navigate to the definition of the directive under the cursor" })
|
||||
)
|
||||
keymap(
|
||||
"n",
|
||||
"<leader>la",
|
||||
"<cmd>Lspsaga code_action<cr>",
|
||||
vim.tbl_extend("force", opts, { desc = "Show available code actions for the line under the cursor" })
|
||||
)
|
||||
keymap(
|
||||
"n",
|
||||
"<leader>lj",
|
||||
"<cmd>Lspsaga diagnostic_jump_next<cr>",
|
||||
vim.tbl_extend("force", opts, { desc = "Navigate to the next diagnostic in the buffer" })
|
||||
)
|
||||
keymap(
|
||||
"n",
|
||||
"<leader>lk",
|
||||
"<cmd>Lspsaga diagnostic_jump_prev<cr>",
|
||||
vim.tbl_extend("force", opts, { desc = "Navigate to the previous diagnostic in the buffer" })
|
||||
)
|
||||
keymap(
|
||||
"n",
|
||||
"<leader>lr",
|
||||
"<cmd>Lspsaga rename mode=n<cr>",
|
||||
vim.tbl_extend("force", opts, { desc = "Open a dialog to rename a code element" })
|
||||
)
|
||||
keymap(
|
||||
"n",
|
||||
"<leader>lp",
|
||||
"<cmd>Lspsaga peek_definition<cr>",
|
||||
vim.tbl_extend("force", opts, { desc = "Peek the definition of the directive under the cursor" })
|
||||
)
|
||||
keymap(
|
||||
"n",
|
||||
"<leader>lt",
|
||||
"<cmd>Lspsaga peek_type_definition<cr>",
|
||||
vim.tbl_extend("force", opts, { desc = "Peek the type definition of the directive under the cursor" })
|
||||
)
|
||||
keymap({ "n", "v" }, "<leader>lf", function()
|
||||
require("conform").format({ async = true, lsp_fallback = true })
|
||||
end, vim.tbl_extend("force", opts, { desc = "Format the current buffer or selection" }))
|
||||
|
||||
keymap({ "n", "v" }, "<leader>o", "<cmd>Outline<CR>", vim.tbl_extend("force", opts, { desc = "Toogle Outline" }))
|
||||
|
||||
-- Neotest
|
||||
keymap(
|
||||
"n",
|
||||
"<leader>tr",
|
||||
"<cmd>RunTest<cr>",
|
||||
vim.tbl_extend("force", opts, { desc = "Run test on the current function" })
|
||||
)
|
||||
keymap(
|
||||
"n",
|
||||
"<leader>tf",
|
||||
"<cmd>RunTestFile<cr>",
|
||||
vim.tbl_extend("force", opts, { desc = "Run tests on the current file" })
|
||||
)
|
||||
|
||||
-- Copilot
|
||||
keymap({ "n", "v" }, "<leader>cop", function()
|
||||
local actions = require("CopilotChat.actions")
|
||||
require("CopilotChat.integrations.telescope").pick(actions.prompt_actions())
|
||||
end, vim.tbl_extend("force", opts, { desc = "CopilotChat - Prompt actions" }))
|
||||
keymap("n", "<leader>coq", function()
|
||||
local input = vim.fn.input("Quick Chat: ")
|
||||
if input ~= "" then
|
||||
require("CopilotChat").ask(input, { selection = require("CopilotChat.select").buffer })
|
||||
end
|
||||
end, vim.tbl_extend("force", opts, { desc = "CopilotChat - Quick chat" }))
|
||||
|
||||
-- Better paste
|
||||
keymap("v", "p", "P", vim.tbl_extend("force", opts, { desc = "Paste" }))
|
||||
|
||||
-- Press jk fast to exit insert mode
|
||||
keymap("i", "jk", "<ESC>", vim.tbl_extend("force", opts, { desc = "Exit insert mode" }))
|
||||
|
||||
-- Stay in indent mode
|
||||
keymap("v", "<", "<gv", opts)
|
||||
keymap("v", ">", ">gv", opts)
|
||||
|
||||
-- FileTree
|
||||
keymap("n", "<leader>e", function()
|
||||
Snacks.explorer()
|
||||
end, vim.tbl_extend("force", opts, { desc = "Toggle file explorer" }))
|
||||
|
||||
-- Telescope
|
||||
keymap(
|
||||
"n",
|
||||
"<leader>ff",
|
||||
":Telescope find_files<cr>",
|
||||
vim.tbl_extend("force", opts, { desc = "Open a Telescope prompt to search for files" })
|
||||
)
|
||||
keymap(
|
||||
"n",
|
||||
"<C-p>",
|
||||
":Telescope find_files<cr>",
|
||||
vim.tbl_extend("force", opts, { desc = "Open a Telescope prompt to search for files" })
|
||||
)
|
||||
keymap(
|
||||
"n",
|
||||
"<leader>fg",
|
||||
":Telescope live_grep<cr>",
|
||||
vim.tbl_extend("force", opts, { desc = "Open a Telescope prompt to search for text in all files" })
|
||||
)
|
||||
keymap(
|
||||
"n",
|
||||
"<leader>fk",
|
||||
":Telescope keymaps<cr>",
|
||||
vim.tbl_extend("force", opts, { desc = "Open a Telescope prompt to show all keymaps" })
|
||||
)
|
||||
keymap(
|
||||
"n",
|
||||
"<leader>fc",
|
||||
":Telescope commands<cr>",
|
||||
vim.tbl_extend("force", opts, { desc = "Open a Telescope prompt to show all commands" })
|
||||
)
|
||||
|
||||
-- Git
|
||||
keymap(
|
||||
"n",
|
||||
"<leader>df",
|
||||
":DiffviewFileHistory %<cr>",
|
||||
vim.tbl_extend("force", opts, { desc = "Open diff view file history for the current buffer" })
|
||||
)
|
||||
keymap("n", "<leader>dc", ":DiffviewClose<cr>", vim.tbl_extend("force", opts, { desc = "Close diff view" }))
|
||||
-- Git
|
||||
keymap({ "n", "v" }, "<leader>go", function()
|
||||
Snacks.gitbrowse()
|
||||
end, vim.tbl_extend("force", opts, { desc = "Git Browse" }))
|
||||
keymap("n", "<leader>gg", function()
|
||||
Snacks.picker.git_status()
|
||||
end, vim.tbl_extend("force", opts, { desc = "Git Status" }))
|
||||
|
||||
-- Projects
|
||||
keymap(
|
||||
"n",
|
||||
"<leader>fp",
|
||||
":Telescope neovim-project discover<cr>",
|
||||
vim.tbl_extend("force", opts, { desc = "Open a Telescope prompt to search for projects" })
|
||||
)
|
||||
|
||||
-- Base64
|
||||
keymap(
|
||||
"v",
|
||||
"<leader>64e",
|
||||
":<c-u>lua require'b64'.encode()<cr>",
|
||||
vim.tbl_extend("force", opts, { desc = "Encode the visual selected text to base64" })
|
||||
)
|
||||
keymap(
|
||||
"v",
|
||||
"<leader>64d",
|
||||
":<c-u>lua require'b64'.decode()<cr>",
|
||||
vim.tbl_extend("force", opts, { desc = "Decode the visual selected text from base64" })
|
||||
)
|
||||
|
||||
-- Illuminate
|
||||
keymap(
|
||||
"n",
|
||||
"<A-n>",
|
||||
"<cmd>lua require'illuminate'.next_reference{wrap=true}<cr>",
|
||||
vim.tbl_extend("force", opts, { desc = "Navigate to the next selected text by illuminate" })
|
||||
)
|
||||
keymap(
|
||||
"n",
|
||||
"<A-p>",
|
||||
"<cmd>lua require'illuminate'.next_reference{reverse=true,wrap=true}<cr>",
|
||||
vim.tbl_extend("force", opts, { desc = "Navigate to the previous selected text by illuminate" })
|
||||
)
|
||||
|
||||
-- Folding
|
||||
keymap(
|
||||
"n",
|
||||
"zR",
|
||||
"<cmd>lua require'ufo'.openAllFolds()<cr>",
|
||||
vim.tbl_extend("force", opts, { desc = "Open all folds" })
|
||||
)
|
||||
keymap(
|
||||
"n",
|
||||
"zM",
|
||||
"<cmd>lua require'ufo'.closeAllFolds()<cr>",
|
||||
vim.tbl_extend("force", opts, { desc = "Close all folds" })
|
||||
)
|
||||
keymap(
|
||||
"n",
|
||||
"zr",
|
||||
"<cmd>lua require'ufo'.openFoldsExceptKinds()<cr>",
|
||||
vim.tbl_extend("force", opts, { desc = "Fold less" })
|
||||
)
|
||||
keymap("n", "zm", "<cmd>lua require'ufo'.closeFoldsWith()<cr>", vim.tbl_extend("force", opts, { desc = "Fold more" }))
|
||||
keymap(
|
||||
"n",
|
||||
"zp",
|
||||
"<cmd>lua require'ufo'.peekFoldedLinesUnderCursor()<cr>",
|
||||
vim.tbl_extend("force", opts, { desc = "Peek fold" })
|
||||
)
|
||||
|
||||
keymap(
|
||||
"n",
|
||||
"<leader>m",
|
||||
":RenderMarkdown toggle<cr>",
|
||||
vim.tbl_extend("force", opts, { desc = "Toggle markdown rendering" })
|
||||
)
|
326
.config/nvim/lua/core/lazy.lua
Normal file
326
.config/nvim/lua/core/lazy.lua
Normal file
@ -0,0 +1,326 @@
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||
if vim.v.shell_error ~= 0 then
|
||||
vim.api.nvim_echo({
|
||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||
{ out, "WarningMsg" },
|
||||
{ "\nPress any key to exit..." },
|
||||
}, true, {})
|
||||
vim.fn.getchar()
|
||||
os.exit(1)
|
||||
end
|
||||
end
|
||||
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = " "
|
||||
|
||||
local lazy_opts = {
|
||||
ui = {
|
||||
border = "rounded",
|
||||
},
|
||||
}
|
||||
|
||||
require("lazy").setup({
|
||||
-- Colorschemes
|
||||
{
|
||||
"folke/tokyonight.nvim",
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
config = function()
|
||||
require("tokyonight").setup({
|
||||
style = "moon",
|
||||
styles = {
|
||||
sidebars = "normal",
|
||||
floats = "normal",
|
||||
},
|
||||
on_colors = function(colors)
|
||||
colors.error = "#ff966c"
|
||||
end,
|
||||
})
|
||||
vim.cmd("colorscheme tokyonight-moon")
|
||||
end,
|
||||
},
|
||||
{
|
||||
"projekt0n/github-nvim-theme",
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
config = function()
|
||||
local options = {
|
||||
darken = {
|
||||
floats = false,
|
||||
sidebars = {
|
||||
enable = false,
|
||||
},
|
||||
},
|
||||
styles = {
|
||||
comments = "italic",
|
||||
keywords = "italic",
|
||||
},
|
||||
}
|
||||
local specs = {
|
||||
github_dark_dimmed = {
|
||||
syntax = {
|
||||
builtin1 = "#96d0ff",
|
||||
},
|
||||
diagnostic = {
|
||||
error = "#dd6861",
|
||||
},
|
||||
},
|
||||
}
|
||||
require("github-theme").setup({ options = options, specs = specs })
|
||||
end,
|
||||
},
|
||||
{
|
||||
"rose-pine/neovim",
|
||||
name = "rose-pine",
|
||||
lazy = false,
|
||||
config = function()
|
||||
require("rose-pine").setup({
|
||||
palette = {
|
||||
moon = {
|
||||
gold = "#faf4ed",
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
-- Plugins
|
||||
{ "nvim-lua/plenary.nvim", lazy = true },
|
||||
{ "echasnovski/mini.comment", event = "VeryLazy", version = "*" },
|
||||
{ "echasnovski/mini.pairs", event = "VeryLazy", version = "*" },
|
||||
{ "echasnovski/mini.surround", event = "VeryLazy", version = "*" },
|
||||
{ "JoosepAlviste/nvim-ts-context-commentstring", lazy = true, opts = {
|
||||
enable_autocmd = false,
|
||||
} },
|
||||
{ "nvim-tree/nvim-web-devicons", lazy = true },
|
||||
{ "akinsho/bufferline.nvim", event = "VeryLazy", version = "v4.*" },
|
||||
{ "moll/vim-bbye" },
|
||||
{ "nvim-lualine/lualine.nvim", event = "VeryLazy" },
|
||||
{ "nvim-zh/auto-save.nvim", event = "BufReadPost" },
|
||||
{
|
||||
"folke/noice.nvim",
|
||||
event = "VeryLazy",
|
||||
dependencies = {
|
||||
"MunifTanjim/nui.nvim",
|
||||
},
|
||||
},
|
||||
{ "romgrk/fzy-lua-native" },
|
||||
{ "mg979/vim-visual-multi" },
|
||||
{
|
||||
"coffebar/neovim-project",
|
||||
dependencies = {
|
||||
{ "Shatur/neovim-session-manager" },
|
||||
},
|
||||
event = "VeryLazy",
|
||||
},
|
||||
{ "nvim-treesitter/nvim-treesitter", event = "BufReadPost" },
|
||||
{
|
||||
"folke/snacks.nvim",
|
||||
priority = 1000,
|
||||
lazy = false,
|
||||
},
|
||||
{ "taybart/b64.nvim", event = "VeryLazy" },
|
||||
{ "tenxsoydev/karen-yank.nvim", event = "VeryLazy", config = true },
|
||||
{
|
||||
"ggandor/leap.nvim",
|
||||
config = function()
|
||||
require("leap").add_default_mappings()
|
||||
vim.api.nvim_set_hl(0, "LeapBackdrop", { link = "Comment" })
|
||||
end,
|
||||
},
|
||||
{
|
||||
"knubie/vim-kitty-navigator",
|
||||
build = "cp ./*.py ~/.config/kitty/",
|
||||
},
|
||||
{
|
||||
"MagicDuck/grug-far.nvim",
|
||||
event = "VeryLazy",
|
||||
},
|
||||
|
||||
-- cmp plugins
|
||||
{
|
||||
"saghen/blink.cmp",
|
||||
version = "*",
|
||||
dependencies = {
|
||||
"fang2hou/blink-copilot",
|
||||
},
|
||||
},
|
||||
|
||||
-- LSP
|
||||
{ "neovim/nvim-lspconfig", event = "BufReadPre" },
|
||||
{ "williamboman/mason.nvim" },
|
||||
{ "williamboman/mason-lspconfig.nvim" },
|
||||
{ "nvimtools/none-ls.nvim", event = "BufReadPre" },
|
||||
{ "RRethy/vim-illuminate", event = "BufReadPost" },
|
||||
{ "folke/trouble.nvim" },
|
||||
{ "glepnir/lspsaga.nvim", event = "BufRead" },
|
||||
{ "arkav/lualine-lsp-progress" },
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
event = { "BufWritePre" },
|
||||
cmd = { "ConformInfo" },
|
||||
},
|
||||
{ "hedyhli/outline.nvim", opts = {} },
|
||||
|
||||
-- Telescope
|
||||
{ "nvim-telescope/telescope.nvim", cmd = "Telescope" },
|
||||
{ "nvim-telescope/telescope-ui-select.nvim" },
|
||||
{ "nvim-telescope/telescope-fzf-native.nvim", build = "make" },
|
||||
|
||||
-- Git
|
||||
{ "lewis6991/gitsigns.nvim", event = "BufReadPre" },
|
||||
{ "sindrets/diffview.nvim" },
|
||||
{ "f-person/git-blame.nvim" },
|
||||
|
||||
-- YAML
|
||||
{
|
||||
"someone-stole-my-name/yaml-companion.nvim",
|
||||
ft = { "yaml" },
|
||||
opts = {
|
||||
lspconfig = {
|
||||
settings = {
|
||||
redhat = {
|
||||
telemetry = {
|
||||
enabled = false,
|
||||
},
|
||||
},
|
||||
-- yaml = {
|
||||
-- schemas = {
|
||||
-- ["https://custom/github-workflow.json"] = "/.github/workflows/*",
|
||||
-- },
|
||||
-- },
|
||||
},
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
local cfg = require("yaml-companion").setup(opts)
|
||||
require("lspconfig")["yamlls"].setup(cfg)
|
||||
end,
|
||||
},
|
||||
|
||||
-- DAP
|
||||
{ "mfussenegger/nvim-dap", event = "VeryLazy", version = "0.*" },
|
||||
{ "rcarriga/nvim-dap-ui", event = "VeryLazy", version = "v4.*" },
|
||||
{ "theHamsta/nvim-dap-virtual-text", event = "VeryLazy" },
|
||||
{ "mfussenegger/nvim-dap-python" },
|
||||
|
||||
-- Python
|
||||
{
|
||||
"linux-cultist/venv-selector.nvim",
|
||||
lazy = false,
|
||||
branch = "regexp",
|
||||
config = function()
|
||||
require("venv-selector").setup({
|
||||
dap_enabled = true,
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
-- Go
|
||||
{
|
||||
"ray-x/go.nvim",
|
||||
dependencies = {
|
||||
"ray-x/guihua.lua",
|
||||
build = "cd lua/fzy && make",
|
||||
},
|
||||
event = { "CmdlineEnter" },
|
||||
ft = { "go", "gomod" },
|
||||
},
|
||||
|
||||
-- Testing
|
||||
{
|
||||
"nvim-neotest/neotest",
|
||||
dependencies = {
|
||||
"nvim-neotest/neotest-go",
|
||||
"nvim-neotest/neotest-python",
|
||||
"nvim-neotest/nvim-nio",
|
||||
"antoinemadec/FixCursorHold.nvim",
|
||||
},
|
||||
},
|
||||
|
||||
-- Typescript
|
||||
{
|
||||
"pmizio/typescript-tools.nvim",
|
||||
},
|
||||
|
||||
-- Markdown
|
||||
{
|
||||
"iamcco/markdown-preview.nvim",
|
||||
build = function()
|
||||
vim.fn["mkdp#util#install"]()
|
||||
end,
|
||||
init = function()
|
||||
vim.g.mkdp_filetypes = { "markdown" }
|
||||
end,
|
||||
ft = { "markdown" },
|
||||
},
|
||||
{
|
||||
"MeanderingProgrammer/markdown.nvim",
|
||||
name = "render-markdown",
|
||||
version = "v7",
|
||||
},
|
||||
{ "mzlogin/vim-markdown-toc" },
|
||||
|
||||
-- Copilot
|
||||
{
|
||||
"yetone/avante.nvim",
|
||||
event = "VeryLazy",
|
||||
lazy = false,
|
||||
version = false,
|
||||
build = "make",
|
||||
dependencies = {
|
||||
"stevearc/dressing.nvim",
|
||||
},
|
||||
},
|
||||
{
|
||||
"ravitemer/mcphub.nvim",
|
||||
-- cmd = "MCPHub", -- lazy load by default
|
||||
-- uncomment this if you don't want mcp-hub to be available globally or can't use -g
|
||||
build = "bundled_build.lua", -- Use this and set use_bundled_binary = true in opts (see Advanced configuration)
|
||||
},
|
||||
{
|
||||
"zbirenbaum/copilot.lua",
|
||||
cmd = "Copilot",
|
||||
event = "InsertEnter",
|
||||
},
|
||||
{ "AndreM222/copilot-lualine" },
|
||||
{
|
||||
"copilotc-nvim/copilotchat.nvim",
|
||||
branch = "main",
|
||||
build = "make tiktoken",
|
||||
event = "VeryLazy",
|
||||
},
|
||||
|
||||
-- Folding
|
||||
{
|
||||
"kevinhwang91/nvim-ufo",
|
||||
dependencies = {
|
||||
"kevinhwang91/promise-async",
|
||||
{
|
||||
"luukvbaal/statuscol.nvim",
|
||||
config = function()
|
||||
local builtin = require("statuscol.builtin")
|
||||
require("statuscol").setup({
|
||||
relculright = true,
|
||||
segments = {
|
||||
{
|
||||
text = {
|
||||
builtin.foldfunc,
|
||||
},
|
||||
click = "v:lua.ScFa",
|
||||
},
|
||||
{ text = { "%s" }, click = "v:lua.ScSa" },
|
||||
{ text = { builtin.lnumfunc, " " }, click = "v:lua.ScLa" },
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
{ "towolf/vim-helm", ft = "helm" },
|
||||
}, lazy_opts)
|
50
.config/nvim/lua/core/options.lua
Normal file
50
.config/nvim/lua/core/options.lua
Normal file
@ -0,0 +1,50 @@
|
||||
vim.opt.backup = false
|
||||
vim.opt.autowriteall = true
|
||||
vim.opt.clipboard = "unnamedplus"
|
||||
vim.opt.completeopt = { "menuone", "noselect" }
|
||||
vim.opt.conceallevel = 0
|
||||
vim.opt.fileencoding = "utf-8"
|
||||
vim.opt.hlsearch = true
|
||||
vim.opt.ignorecase = false
|
||||
vim.opt.mouse = "a"
|
||||
vim.opt.pumheight = 10
|
||||
vim.opt.showmode = false
|
||||
vim.opt.showtabline = 0
|
||||
vim.opt.smartcase = true
|
||||
vim.opt.smartindent = true
|
||||
vim.opt.splitbelow = true
|
||||
vim.opt.splitright = true
|
||||
vim.opt.swapfile = false
|
||||
vim.opt.termguicolors = true
|
||||
vim.opt.timeoutlen = 1000
|
||||
vim.opt.undofile = true
|
||||
vim.opt.updatetime = 300
|
||||
vim.opt.writebackup = false
|
||||
vim.opt.cursorline = true
|
||||
vim.opt.number = true
|
||||
vim.opt.laststatus = 3
|
||||
vim.opt.showcmd = false
|
||||
vim.opt.ruler = false
|
||||
vim.opt.listchars = "tab: ,trail:Ç"
|
||||
vim.opt.list = true
|
||||
vim.opt.expandtab = true
|
||||
vim.opt.shiftwidth = 4
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.signcolumn = "yes"
|
||||
vim.opt.wrap = false
|
||||
vim.opt.scrolloff = 4
|
||||
vim.opt.sidescrolloff = 8
|
||||
vim.opt.smoothscroll = true
|
||||
vim.opt.guifont = "monospace:h10"
|
||||
vim.opt.shortmess:append("c")
|
||||
vim.opt.whichwrap:append("<,>,[,],h,l")
|
||||
vim.opt.iskeyword:append("-")
|
||||
vim.opt.formatoptions:remove({ "c", "r", "o" })
|
||||
vim.opt.linebreak = true
|
||||
vim.opt.numberwidth = 1
|
||||
vim.opt.foldenable = true
|
||||
vim.opt.foldlevel = 99
|
||||
vim.opt.foldlevelstart = 99
|
||||
vim.opt.foldcolumn = "1"
|
||||
vim.opt.fillchars = [[eob: ,fold: ,foldopen:,foldsep: ,foldclose:,diff: ]]
|
||||
vim.opt.cmdheight = 0 -- Number of screen lines to use for the command-line
|
7
.config/nvim/lua/plugins/autosave.lua
Normal file
7
.config/nvim/lua/plugins/autosave.lua
Normal file
@ -0,0 +1,7 @@
|
||||
require("auto-save").setup({
|
||||
execution_message = {
|
||||
message = function()
|
||||
return ""
|
||||
end,
|
||||
},
|
||||
})
|
40
.config/nvim/lua/plugins/avante.lua
Normal file
40
.config/nvim/lua/plugins/avante.lua
Normal file
@ -0,0 +1,40 @@
|
||||
require("avante").setup({
|
||||
provider = "copilot",
|
||||
providers = {
|
||||
copilot = {
|
||||
model = "claude-3.7-sonnet",
|
||||
timeout = 120000,
|
||||
},
|
||||
},
|
||||
-- web_search_engine = {
|
||||
-- provider = "tavily",
|
||||
-- },
|
||||
hints = { enabled = false },
|
||||
behaviour = {
|
||||
enable_claude_text_editor_tool_mode = true,
|
||||
},
|
||||
|
||||
system_prompt = function()
|
||||
local hub = require("mcphub").get_hub_instance()
|
||||
return hub and hub:get_active_servers_prompt() or ""
|
||||
end,
|
||||
custom_tools = function()
|
||||
return {
|
||||
require("mcphub.extensions.avante").mcp_tool(),
|
||||
}
|
||||
end,
|
||||
|
||||
-- using the MCP server
|
||||
disabled_tools = {
|
||||
"list_files",
|
||||
"search_files",
|
||||
"read_file",
|
||||
"create_file",
|
||||
"rename_file",
|
||||
"delete_file",
|
||||
"create_dir",
|
||||
"rename_dir",
|
||||
"delete_dir",
|
||||
"bash",
|
||||
},
|
||||
})
|
65
.config/nvim/lua/plugins/blink.lua
Normal file
65
.config/nvim/lua/plugins/blink.lua
Normal file
@ -0,0 +1,65 @@
|
||||
require("blink.cmp").setup({
|
||||
-- disable completion for certain filetypes
|
||||
enabled = function()
|
||||
return not vim.tbl_contains({ "sagarename", "DressingInput", "AvanteInput" }, vim.bo.filetype)
|
||||
and vim.bo.buftype ~= "prompt"
|
||||
and vim.b.completion ~= false
|
||||
end,
|
||||
|
||||
appearance = {
|
||||
use_nvim_cmp_as_default = false,
|
||||
},
|
||||
completion = {
|
||||
accept = {
|
||||
auto_brackets = {
|
||||
enabled = true,
|
||||
},
|
||||
},
|
||||
documentation = {
|
||||
auto_show = true,
|
||||
auto_show_delay_ms = 200,
|
||||
window = { border = "single" },
|
||||
},
|
||||
menu = {
|
||||
-- don't show completion menu automatically when searching
|
||||
auto_show = function(ctx)
|
||||
return ctx.mode ~= "cmdline" or not vim.tbl_contains({ "/", "?" }, vim.fn.getcmdtype())
|
||||
end,
|
||||
|
||||
border = "single",
|
||||
draw = {
|
||||
treesitter = { "lsp" },
|
||||
columns = {
|
||||
{ "label", "label_description", gap = 1 },
|
||||
{ "kind_icon", "kind", gap = 1 },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
signature = {
|
||||
window = {
|
||||
border = "single",
|
||||
},
|
||||
},
|
||||
sources = {
|
||||
default = { "lsp", "path", "buffer", "copilot" },
|
||||
providers = {
|
||||
copilot = {
|
||||
name = "copilot",
|
||||
module = "blink-copilot",
|
||||
score_offset = 100,
|
||||
async = true,
|
||||
opts = {
|
||||
max_completions = 3,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
keymap = {
|
||||
preset = "enter",
|
||||
["<C-q>"] = { "hide", "fallback" },
|
||||
["<S-Tab>"] = { "select_prev", "fallback" },
|
||||
["<Tab>"] = { "select_next", "fallback" },
|
||||
},
|
||||
})
|
39
.config/nvim/lua/plugins/bufferline.lua
Normal file
39
.config/nvim/lua/plugins/bufferline.lua
Normal file
@ -0,0 +1,39 @@
|
||||
local bufferline = require("bufferline")
|
||||
|
||||
local function is_buffer_loaded(name)
|
||||
local bufs = vim.api.nvim_list_bufs()
|
||||
|
||||
for _, buffer in pairs(bufs) do
|
||||
if vim.fn.getbufvar(buffer, "&filetype") == name then
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
return false
|
||||
end
|
||||
|
||||
bufferline.setup({
|
||||
options = {
|
||||
close_command = "Bdelete! %d",
|
||||
right_mouse_command = "Bdelete! %d",
|
||||
offsets = {
|
||||
{ filetype = "snacks_picker_list", text = "", padding = 1 },
|
||||
{ filetype = "dapui_scopes", text = "", padding = 1 },
|
||||
},
|
||||
indicator = {
|
||||
style = "underline",
|
||||
},
|
||||
hover = {
|
||||
enabled = false,
|
||||
},
|
||||
separator_style = "slant",
|
||||
|
||||
custom_areas = {
|
||||
left = function()
|
||||
local text = " " .. string.gsub(vim.loop.cwd(), "^" .. os.getenv("HOME"), "~") .. " "
|
||||
|
||||
return { { text = text, fg = "#adbac7" } }
|
||||
end,
|
||||
},
|
||||
},
|
||||
})
|
49
.config/nvim/lua/plugins/copilot.lua
Normal file
49
.config/nvim/lua/plugins/copilot.lua
Normal file
@ -0,0 +1,49 @@
|
||||
require("copilot").setup({
|
||||
suggestion = { enabled = false },
|
||||
panel = { enabled = false },
|
||||
copilot_model = "claude-3.7-sonnet-thought",
|
||||
filetypes = {
|
||||
dockerfile = true,
|
||||
go = true,
|
||||
gothtmltmpl = true,
|
||||
gotexttmpl = true,
|
||||
hcl = true,
|
||||
helm = true,
|
||||
javascript = true,
|
||||
json = true,
|
||||
lua = true,
|
||||
make = true,
|
||||
markdown = true,
|
||||
python = true,
|
||||
sh = true,
|
||||
typescript = true,
|
||||
yaml = true,
|
||||
["*"] = false,
|
||||
},
|
||||
})
|
||||
|
||||
local prompts = {
|
||||
Spelling = {
|
||||
system_prompt = "You are a technical writer. You have a deep understanding of both the English and the Spanish languages. You can effectively communicate complex ideas and concepts in a way everyone easily understands. You have a keen eye for detail and can pick up on subtle nuances in language that others may miss. You are also skilled at translating written or spoken content from one language to another, ensuring that the meaning and tone of the original message are preserved.",
|
||||
prompt = "Correct any grammar and spelling errors in the following text. Respect the markdown format when provided",
|
||||
},
|
||||
}
|
||||
|
||||
require("CopilotChat").setup({
|
||||
highlight_headers = false,
|
||||
-- separator = "———",
|
||||
error_header = "> [!ERROR] Error",
|
||||
debug = false,
|
||||
show_user_selection = false,
|
||||
clear_chat_on_new_prompt = false,
|
||||
prompts = prompts,
|
||||
model = "claude-3.7-sonnet-thought",
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd("BufEnter", {
|
||||
pattern = "copilot-chat",
|
||||
callback = function()
|
||||
vim.opt_local.relativenumber = false
|
||||
vim.opt_local.number = false
|
||||
end,
|
||||
})
|
48
.config/nvim/lua/plugins/dap.lua
Normal file
48
.config/nvim/lua/plugins/dap.lua
Normal file
@ -0,0 +1,48 @@
|
||||
local dap = require("dap")
|
||||
local dapui = require("dapui")
|
||||
|
||||
local debugpyPythonPath = vim.fn.exepath("debugpy") .. "/venv/bin/python3"
|
||||
require("dap-python").setup(debugpyPythonPath, {})
|
||||
|
||||
dapui.setup({
|
||||
layouts = {
|
||||
{
|
||||
elements = {
|
||||
{ id = "scopes", size = 0.25 },
|
||||
"watches",
|
||||
"stacks",
|
||||
"breakpoints",
|
||||
},
|
||||
size = 50, -- columns
|
||||
position = "left",
|
||||
},
|
||||
{
|
||||
elements = {
|
||||
"repl",
|
||||
-- "console",
|
||||
},
|
||||
size = 0.25, -- 25% of total lines
|
||||
position = "bottom",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
vim.fn.sign_define("DapBreakpoint", { text = "", texthl = "DiagnosticSignError", linehl = "", numhl = "" })
|
||||
vim.fn.sign_define("DapStopped", { text = "", texthl = "DiagnosticSignWarn", linehl = "", numhl = "" })
|
||||
|
||||
dap.listeners.after.event_initialized.dapui_config = function()
|
||||
dapui.open()
|
||||
end
|
||||
|
||||
dap.listeners.before.attach.dapui_config = function()
|
||||
dapui.open()
|
||||
end
|
||||
dap.listeners.before.launch.dapui_config = function()
|
||||
dapui.open()
|
||||
end
|
||||
dap.listeners.before.event_terminated.dapui_config = function()
|
||||
dapui.close()
|
||||
end
|
||||
dap.listeners.before.event_exited.dapui_config = function()
|
||||
dapui.close()
|
||||
end
|
9
.config/nvim/lua/plugins/diffview.lua
Normal file
9
.config/nvim/lua/plugins/diffview.lua
Normal file
@ -0,0 +1,9 @@
|
||||
require("diffview").setup({
|
||||
view = {
|
||||
merge_tool = {
|
||||
layout = "diff3_mixed",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- vim.opt.fillchars = "diff: "
|
30
.config/nvim/lua/plugins/gitsigns.lua
Normal file
30
.config/nvim/lua/plugins/gitsigns.lua
Normal file
@ -0,0 +1,30 @@
|
||||
require("gitsigns").setup({
|
||||
signs = {
|
||||
add = { text = "│" },
|
||||
change = { text = "│" },
|
||||
delete = { text = "" },
|
||||
topdelete = { text = "" },
|
||||
changedelete = { text = "│" },
|
||||
untracked = { text = "┆" },
|
||||
},
|
||||
preview_config = {
|
||||
border = "rounded",
|
||||
},
|
||||
on_attach = function(bufnr)
|
||||
local gs = package.loaded.gitsigns
|
||||
|
||||
local function map(mode, l, r, opts)
|
||||
opts = opts or {}
|
||||
opts.buffer = bufnr
|
||||
vim.keymap.set(mode, l, r, opts)
|
||||
end
|
||||
|
||||
map({ "n", "v" }, "<leader>hs", ":Gitsigns stage_hunk<CR>")
|
||||
map({ "n", "v" }, "<leader>hr", ":Gitsigns reset_hunk<CR>")
|
||||
map("n", "<leader>hp", gs.preview_hunk)
|
||||
map("n", "<leader>hR", gs.reset_buffer)
|
||||
map("n", "<leader>hd", gs.diffthis)
|
||||
map("n", "<leader>hj", gs.next_hunk)
|
||||
map("n", "<leader>hk", gs.prev_hunk)
|
||||
end,
|
||||
})
|
10
.config/nvim/lua/plugins/go.lua
Normal file
10
.config/nvim/lua/plugins/go.lua
Normal file
@ -0,0 +1,10 @@
|
||||
require("go").setup({
|
||||
icons = { breakpoint = "", currentpos = "🏃" },
|
||||
fillstruct = "fillstruct",
|
||||
gofmt = "gofumpt",
|
||||
diagnostic = false,
|
||||
})
|
||||
|
||||
require("guihua.maps").setup({
|
||||
maps = { close_view = "<C-x>" },
|
||||
})
|
1
.config/nvim/lua/plugins/grug-far.lua
Normal file
1
.config/nvim/lua/plugins/grug-far.lua
Normal file
@ -0,0 +1 @@
|
||||
require("grug-far").setup({})
|
13
.config/nvim/lua/plugins/illuminate.lua
Normal file
13
.config/nvim/lua/plugins/illuminate.lua
Normal file
@ -0,0 +1,13 @@
|
||||
require("illuminate").configure({
|
||||
delay = 200,
|
||||
filetypes_denylist = {
|
||||
"TelescopePrompt",
|
||||
"Trouble",
|
||||
"avante",
|
||||
"lspsagafinder",
|
||||
"mason",
|
||||
"snacks_picker_list",
|
||||
"packer",
|
||||
"starter",
|
||||
},
|
||||
})
|
28
.config/nvim/lua/plugins/init.lua
Normal file
28
.config/nvim/lua/plugins/init.lua
Normal file
@ -0,0 +1,28 @@
|
||||
require("plugins.snacks")
|
||||
require("plugins.blink")
|
||||
require("plugins.copilot")
|
||||
require("plugins.mcphub")
|
||||
require("plugins.avante")
|
||||
require("plugins.telescope")
|
||||
require("plugins.mini-comment")
|
||||
require("plugins.mini-pairs")
|
||||
require("plugins.mini-surround")
|
||||
require("plugins.treesitter")
|
||||
require("plugins.gitsigns")
|
||||
require("plugins.illuminate")
|
||||
require("plugins.lsp")
|
||||
require("plugins.go")
|
||||
require("plugins.typescript")
|
||||
require("plugins.neotest")
|
||||
require("plugins.dap")
|
||||
require("plugins.noice")
|
||||
require("plugins.trouble")
|
||||
require("plugins.autosave")
|
||||
require("plugins.markdowntoc")
|
||||
require("plugins.render-markdown")
|
||||
require("plugins.diffview")
|
||||
require("plugins.ufo")
|
||||
require("plugins.bufferline")
|
||||
require("plugins.lualine")
|
||||
require("plugins.grug-far")
|
||||
require("plugins.neovim-project")
|
27
.config/nvim/lua/plugins/lsp/conform.lua
Normal file
27
.config/nvim/lua/plugins/lsp/conform.lua
Normal file
@ -0,0 +1,27 @@
|
||||
require("conform").setup({
|
||||
formatters_by_ft = {
|
||||
go = { "goimports", "gofumpt" },
|
||||
javascript = { "prettier" },
|
||||
json = { "prettier" },
|
||||
lua = { "stylua" },
|
||||
markdown = { "prettier" },
|
||||
python = { "isort", "black" },
|
||||
typescript = { "prettier" },
|
||||
yaml = { "prettier" },
|
||||
hcl = { "terraform_fmt" },
|
||||
},
|
||||
formatters = {
|
||||
{
|
||||
command = "black",
|
||||
args = { "--line-length", "100" },
|
||||
},
|
||||
},
|
||||
format_on_save = function(bufnr)
|
||||
local filetypes = { "go", "typescript", "lua", "hcl" }
|
||||
if not vim.tbl_contains(filetypes, vim.bo[bufnr].filetype) then
|
||||
return
|
||||
end
|
||||
|
||||
return { timeout_ms = 500, lsp_fallback = false }
|
||||
end,
|
||||
})
|
31
.config/nvim/lua/plugins/lsp/init.lua
Normal file
31
.config/nvim/lua/plugins/lsp/init.lua
Normal file
@ -0,0 +1,31 @@
|
||||
require("plugins.lsp.mason")
|
||||
require("plugins.lsp.none-ls")
|
||||
require("plugins.lsp.conform")
|
||||
require("plugins.lsp.lsp-saga")
|
||||
|
||||
local win = require("lspconfig.ui.windows")
|
||||
win.default_options.border = "rounded"
|
||||
|
||||
local config = {
|
||||
virtual_text = false,
|
||||
signs = {
|
||||
text = {
|
||||
[vim.diagnostic.severity.ERROR] = "",
|
||||
[vim.diagnostic.severity.WARN] = "",
|
||||
[vim.diagnostic.severity.INFO] = "",
|
||||
[vim.diagnostic.severity.HINT] = "",
|
||||
},
|
||||
},
|
||||
update_in_insert = true,
|
||||
underline = true,
|
||||
severity_sort = true,
|
||||
float = {
|
||||
focusable = true,
|
||||
style = "minimal",
|
||||
border = "rounded",
|
||||
source = "always",
|
||||
header = "",
|
||||
prefix = "",
|
||||
},
|
||||
}
|
||||
vim.diagnostic.config(config)
|
40
.config/nvim/lua/plugins/lsp/lsp-saga.lua
Normal file
40
.config/nvim/lua/plugins/lsp/lsp-saga.lua
Normal file
@ -0,0 +1,40 @@
|
||||
require("lspsaga").setup({
|
||||
ui = {
|
||||
border = "rounded",
|
||||
code_action_icon = "",
|
||||
},
|
||||
lightbulb = {
|
||||
sign = true,
|
||||
enable = false,
|
||||
},
|
||||
code_action = {
|
||||
show_server_name = true,
|
||||
extend_gitsigns = true,
|
||||
},
|
||||
rename = {
|
||||
auto_save = true,
|
||||
keys = {
|
||||
quit = "<ESC>",
|
||||
},
|
||||
},
|
||||
finder = {
|
||||
max_height = 0.5,
|
||||
min_width = 30,
|
||||
force_max_height = false,
|
||||
default = "tyd+ref+imp",
|
||||
keys = {
|
||||
toggle_or_open = "<CR>",
|
||||
},
|
||||
},
|
||||
preview = {
|
||||
lines_above = 6,
|
||||
},
|
||||
outline = {
|
||||
win_width = 55,
|
||||
auto_preview = false,
|
||||
},
|
||||
symbol_in_winbar = {
|
||||
enable = false,
|
||||
folder_level = 3,
|
||||
},
|
||||
})
|
54
.config/nvim/lua/plugins/lsp/mason.lua
Normal file
54
.config/nvim/lua/plugins/lsp/mason.lua
Normal file
@ -0,0 +1,54 @@
|
||||
local servers = {
|
||||
"ansiblels",
|
||||
"bashls",
|
||||
"gopls",
|
||||
"helm_ls",
|
||||
"html",
|
||||
-- "kotlin_language_server",
|
||||
"jdtls",
|
||||
"jsonls",
|
||||
"lua_ls",
|
||||
"marksman",
|
||||
"basedpyright",
|
||||
"ruff",
|
||||
"terraformls",
|
||||
"yamlls",
|
||||
}
|
||||
|
||||
local settings = {
|
||||
ui = {
|
||||
border = "rounded",
|
||||
icons = {
|
||||
package_installed = "◍",
|
||||
package_pending = "◍",
|
||||
package_uninstalled = "◍",
|
||||
},
|
||||
},
|
||||
log_level = vim.log.levels.INFO,
|
||||
max_concurrent_installers = 4,
|
||||
}
|
||||
|
||||
require("mason").setup(settings)
|
||||
require("mason-lspconfig").setup({
|
||||
ensure_installed = servers,
|
||||
automatic_installation = true,
|
||||
})
|
||||
|
||||
local lspconfig = require("lspconfig")
|
||||
for _, server in pairs(servers) do
|
||||
if server ~= "yamlls" then
|
||||
local opts = {
|
||||
capabilities = require("blink.cmp").get_lsp_capabilities(),
|
||||
}
|
||||
|
||||
server = vim.split(server, "@")[1]
|
||||
|
||||
-- https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
|
||||
local config_exists, conf_opts = pcall(require, "plugins.lsp.settings." .. server)
|
||||
if config_exists then
|
||||
opts = vim.tbl_deep_extend("force", conf_opts, opts)
|
||||
end
|
||||
|
||||
lspconfig[server].setup(opts)
|
||||
end
|
||||
end
|
21
.config/nvim/lua/plugins/lsp/none-ls.lua
Normal file
21
.config/nvim/lua/plugins/lsp/none-ls.lua
Normal file
@ -0,0 +1,21 @@
|
||||
local none_ls = require("null-ls")
|
||||
-- https://github.com/nvimtools/none-ls.nvim/tree/main/lua/null-ls/builtins/diagnostics
|
||||
local diagnostics = none_ls.builtins.diagnostics
|
||||
|
||||
local revive_conf = vim.fn.findfile(os.getenv("HOME") .. "/.revive.toml")
|
||||
local revive_args = { "-formatter", "json", "./..." }
|
||||
if revive_conf then
|
||||
revive_args = { "-formatter", "json", "-config", revive_conf, "./..." }
|
||||
end
|
||||
|
||||
none_ls.setup({
|
||||
debug = false,
|
||||
sources = {
|
||||
diagnostics.hadolint,
|
||||
diagnostics.markdownlint,
|
||||
diagnostics.revive.with({
|
||||
args = revive_args,
|
||||
}),
|
||||
diagnostics.cfn_lint,
|
||||
},
|
||||
})
|
20
.config/nvim/lua/plugins/lsp/settings/basedpyright.lua
Normal file
20
.config/nvim/lua/plugins/lsp/settings/basedpyright.lua
Normal file
@ -0,0 +1,20 @@
|
||||
return {
|
||||
settings = {
|
||||
basedpyright = {
|
||||
analysis = {
|
||||
autoSearchPaths = true,
|
||||
useLibraryCodeForTypes = true,
|
||||
autoImportCompletions = true,
|
||||
diagnosticsMode = "openFilesOnly", -- workspace, openFilesOnly
|
||||
typeCheckingMode = "standard", -- off, basic, standard, strict, all
|
||||
diagnosticSeverityOverrides = {
|
||||
-- reportAny = true
|
||||
reportOptionalIterable = "warning",
|
||||
reportArgumentType = "warning",
|
||||
reportAssignmentType = "warning",
|
||||
reportIndexIssue = "warning",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
13
.config/nvim/lua/plugins/lsp/settings/gopls.lua
Normal file
13
.config/nvim/lua/plugins/lsp/settings/gopls.lua
Normal file
@ -0,0 +1,13 @@
|
||||
return {
|
||||
settings = {
|
||||
gopls = {
|
||||
experimentalPostfixCompletions = true,
|
||||
analyses = {
|
||||
shadow = true,
|
||||
},
|
||||
staticcheck = true,
|
||||
directoryFilters = { "-.git" },
|
||||
semanticTokens = true,
|
||||
},
|
||||
},
|
||||
}
|
18
.config/nvim/lua/plugins/lsp/settings/lua_ls.lua
Normal file
18
.config/nvim/lua/plugins/lsp/settings/lua_ls.lua
Normal file
@ -0,0 +1,18 @@
|
||||
return {
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
globals = { "vim" },
|
||||
},
|
||||
workspace = {
|
||||
library = {
|
||||
[vim.fn.expand("$VIMRUNTIME/lua")] = true,
|
||||
[vim.fn.stdpath("config") .. "/lua"] = true,
|
||||
},
|
||||
},
|
||||
telemetry = {
|
||||
enable = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
142
.config/nvim/lua/plugins/lualine.lua
Normal file
142
.config/nvim/lua/plugins/lualine.lua
Normal file
@ -0,0 +1,142 @@
|
||||
local hide_in_width = function()
|
||||
return vim.fn.winwidth(0) > 80
|
||||
end
|
||||
|
||||
local diagnostics = {
|
||||
"diagnostics",
|
||||
sources = { "nvim_diagnostic" },
|
||||
sections = { "error", "warn" },
|
||||
symbols = { error = " ", warn = " " },
|
||||
colored = false,
|
||||
always_visible = true,
|
||||
}
|
||||
|
||||
local diff = {
|
||||
"diff",
|
||||
colored = false,
|
||||
symbols = { added = "+", modified = "", removed = "" },
|
||||
cond = hide_in_width,
|
||||
}
|
||||
|
||||
local lsp_progress = {
|
||||
"lsp_progress",
|
||||
display_components = { "spinner" },
|
||||
spinner_symbols = { "⣷", "⣯", "⣟", "⡿", "⢿", "⣻", "⣽", "⣾" },
|
||||
}
|
||||
|
||||
local spaces = function()
|
||||
local expandtab = vim.api.nvim_get_option_value("expandtab", { buf = 0 })
|
||||
|
||||
local title = "spaces: "
|
||||
if not expandtab then
|
||||
title = "tab: "
|
||||
end
|
||||
|
||||
return title .. vim.api.nvim_get_option_value("shiftwidth", { buf = 0 })
|
||||
end
|
||||
|
||||
local venv = function()
|
||||
local venv = os.getenv("VIRTUAL_ENV")
|
||||
if venv then
|
||||
return string.format(" %s", string.match(venv, "[^/]+$"))
|
||||
end
|
||||
|
||||
venv = require("venv-selector").get_active_venv()
|
||||
if venv then
|
||||
return string.format(" %s", string.match(venv, "[^/]+$"))
|
||||
end
|
||||
|
||||
return ""
|
||||
end
|
||||
|
||||
local get_filetype = function()
|
||||
local ft = vim.bo.filetype or ""
|
||||
|
||||
if ft == "yaml" then
|
||||
local schema = require("yaml-companion").get_buf_schema(0)
|
||||
if not schema or not schema.result or not schema.result[1].name then
|
||||
return ft
|
||||
end
|
||||
|
||||
return ft .. " (" .. schema.result[1].name .. ")"
|
||||
else
|
||||
return ft
|
||||
end
|
||||
end
|
||||
|
||||
local gitblame = require("gitblame")
|
||||
|
||||
vim.g.gitblame_date_format = "%r"
|
||||
vim.g.gitblame_display_virtual_text = 0
|
||||
vim.g.gitblame_message_template = "<author>, <date>"
|
||||
|
||||
require("lualine").setup({
|
||||
options = {
|
||||
globalstatus = true,
|
||||
},
|
||||
sections = {
|
||||
lualine_a = { "mode" },
|
||||
lualine_b = { "branch", venv },
|
||||
lualine_c = {
|
||||
diagnostics,
|
||||
{
|
||||
"filename",
|
||||
path = 1,
|
||||
cond = function()
|
||||
if
|
||||
vim.bo.filetype == "snacks_picker_list"
|
||||
or vim.bo.filetype == "mason"
|
||||
or vim.bo.filetype == "lazy"
|
||||
or vim.bo.filetype == "help"
|
||||
or vim.bo.filetype == "starter"
|
||||
or vim.bo.filetype == "TelescopePrompt"
|
||||
or vim.bo.filetype == "noice"
|
||||
then
|
||||
return false
|
||||
end
|
||||
|
||||
return true
|
||||
end,
|
||||
},
|
||||
{
|
||||
"copilot",
|
||||
symbols = {
|
||||
status = {
|
||||
icons = {
|
||||
enabled = " ",
|
||||
sleep = " ",
|
||||
disabled = " ",
|
||||
warning = " ",
|
||||
unknown = " ",
|
||||
},
|
||||
},
|
||||
spinners = require("copilot-lualine.spinners").dots,
|
||||
},
|
||||
},
|
||||
lsp_progress,
|
||||
{
|
||||
require("noice").api.statusline.mode.get,
|
||||
cond = require("noice").api.statusline.mode.has,
|
||||
color = { fg = "#ff9e64" },
|
||||
},
|
||||
{
|
||||
require("mcphub.extensions.lualine"),
|
||||
},
|
||||
{
|
||||
require("noice").api.status.search.get,
|
||||
cond = require("noice").api.status.search.has,
|
||||
color = { fg = "#c69026" },
|
||||
},
|
||||
},
|
||||
lualine_x = {
|
||||
{ gitblame.get_current_blame_text, cond = gitblame.is_blame_text_available },
|
||||
diff,
|
||||
spaces,
|
||||
"encoding",
|
||||
{ get_filetype, separator = "" },
|
||||
},
|
||||
lualine_y = { "progress" },
|
||||
lualine_z = { "location" },
|
||||
},
|
||||
extensions = { "lazy", "mason", "trouble" },
|
||||
})
|
3
.config/nvim/lua/plugins/markdowntoc.lua
Normal file
3
.config/nvim/lua/plugins/markdowntoc.lua
Normal file
@ -0,0 +1,3 @@
|
||||
vim.g.vmt_dont_insert_fence = true
|
||||
vim.g.vmt_list_item_char = "-"
|
||||
vim.g.vmt_include_headings_before = true
|
9
.config/nvim/lua/plugins/mcphub.lua
Normal file
9
.config/nvim/lua/plugins/mcphub.lua
Normal file
@ -0,0 +1,9 @@
|
||||
require("mcphub").setup({
|
||||
use_bundled_binary = true,
|
||||
auto_approve = true,
|
||||
extensions = {
|
||||
avante = {
|
||||
make_slash_commands = true,
|
||||
},
|
||||
},
|
||||
})
|
14
.config/nvim/lua/plugins/mini-comment.lua
Normal file
14
.config/nvim/lua/plugins/mini-comment.lua
Normal file
@ -0,0 +1,14 @@
|
||||
require("mini.comment").setup({
|
||||
options = {
|
||||
custom_commentstring = function()
|
||||
return require("ts_context_commentstring.internal").calculate_commentstring() or vim.bo.commentstring
|
||||
end,
|
||||
},
|
||||
|
||||
mappings = {
|
||||
comment = "<leader>/",
|
||||
comment_line = "<leader>/",
|
||||
comment_visual = "<leader>/",
|
||||
textobject = "<leader>/",
|
||||
},
|
||||
})
|
3
.config/nvim/lua/plugins/mini-pairs.lua
Normal file
3
.config/nvim/lua/plugins/mini-pairs.lua
Normal file
@ -0,0 +1,3 @@
|
||||
require("mini.pairs").setup({
|
||||
modes = { insert = true, command = true, terminal = false },
|
||||
})
|
10
.config/nvim/lua/plugins/mini-surround.lua
Normal file
10
.config/nvim/lua/plugins/mini-surround.lua
Normal file
@ -0,0 +1,10 @@
|
||||
require("mini.surround").setup({
|
||||
mappings = {
|
||||
add = "sa",
|
||||
delete = "sd",
|
||||
replace = "sr",
|
||||
update_n_lines = "",
|
||||
suffix_last = "", -- Suffix to search with "prev" method
|
||||
suffix_next = "", -- Suffix to search with "next" method
|
||||
},
|
||||
})
|
43
.config/nvim/lua/plugins/neotest.lua
Normal file
43
.config/nvim/lua/plugins/neotest.lua
Normal file
@ -0,0 +1,43 @@
|
||||
local neotest_ns = vim.api.nvim_create_namespace("neotest")
|
||||
|
||||
vim.diagnostic.config({
|
||||
virtual_text = {
|
||||
format = function(diagnostic)
|
||||
local message = diagnostic.message:gsub("\n", " "):gsub("\t", " "):gsub("%s+", " "):gsub("^%s+", "")
|
||||
return message
|
||||
end,
|
||||
},
|
||||
}, neotest_ns)
|
||||
|
||||
vim.api.nvim_create_user_command("CopyDirectoryPath", function()
|
||||
local path = vim.fn.expand("%:p:h")
|
||||
vim.fn.setreg("+", path)
|
||||
vim.notify('Copied "' .. path .. '" to the clipboard!')
|
||||
end, {})
|
||||
|
||||
local neotest = require("neotest")
|
||||
|
||||
neotest.setup({
|
||||
adapters = {
|
||||
require("neotest-go")({
|
||||
recursive_run = true,
|
||||
experimental = {
|
||||
test_table = true,
|
||||
},
|
||||
args = { "-count=1" },
|
||||
}),
|
||||
require("neotest-python")({}),
|
||||
},
|
||||
})
|
||||
|
||||
vim.api.nvim_create_user_command("RunTest", function()
|
||||
neotest.run.run()
|
||||
end, {})
|
||||
|
||||
vim.api.nvim_create_user_command("DebugTest", function()
|
||||
neotest.run.run({ strategy = "dap" })
|
||||
end, {})
|
||||
|
||||
vim.api.nvim_create_user_command("RunTestFile", function()
|
||||
neotest.run.run(vim.fn.expand("%"))
|
||||
end, {})
|
27
.config/nvim/lua/plugins/neovim-project.lua
Normal file
27
.config/nvim/lua/plugins/neovim-project.lua
Normal file
@ -0,0 +1,27 @@
|
||||
local projects = function()
|
||||
local projects_path = vim.fn.expand("~/.config/nvim/neovim-projects.json")
|
||||
local data = require("util.files").read(projects_path)
|
||||
|
||||
if data then
|
||||
local ok, decoded = pcall(vim.json.decode, data)
|
||||
return ok and decoded or {}
|
||||
end
|
||||
|
||||
return {}
|
||||
end
|
||||
|
||||
require("neovim-project").setup({
|
||||
projects = projects(),
|
||||
last_session_on_startup = false,
|
||||
dashboard_mode = false,
|
||||
filetype_autocmd_timeout = 0,
|
||||
session_manager_opts = {
|
||||
autosave_ignore_filetypes = {
|
||||
"snacks_picker_list",
|
||||
"trouble",
|
||||
"grug-far",
|
||||
"copilot-chat",
|
||||
"trouble",
|
||||
},
|
||||
},
|
||||
})
|
57
.config/nvim/lua/plugins/noice.lua
Normal file
57
.config/nvim/lua/plugins/noice.lua
Normal file
@ -0,0 +1,57 @@
|
||||
require("noice").setup({
|
||||
presets = {
|
||||
bottom_search = true,
|
||||
command_palette = false,
|
||||
},
|
||||
cmdline = {
|
||||
view = "cmdline",
|
||||
},
|
||||
views = {
|
||||
mini = {
|
||||
backend = "mini",
|
||||
align = "message-left",
|
||||
focusable = false,
|
||||
position = {
|
||||
row = "98%",
|
||||
col = "0%",
|
||||
},
|
||||
border = {
|
||||
style = "rounded",
|
||||
},
|
||||
},
|
||||
},
|
||||
messages = {
|
||||
view_search = false,
|
||||
},
|
||||
lsp = {
|
||||
override = {
|
||||
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
||||
["vim.lsp.util.stylize_markdown"] = true,
|
||||
["cmp.entry.get_documentation"] = true,
|
||||
},
|
||||
},
|
||||
routes = {
|
||||
{
|
||||
filter = {
|
||||
event = "lsp",
|
||||
find = "diagnostics",
|
||||
},
|
||||
opts = { skip = true },
|
||||
},
|
||||
{
|
||||
filter = {
|
||||
event = "msg_show",
|
||||
kind = "",
|
||||
find = "escrito", -- localized for "written"
|
||||
},
|
||||
opts = { skip = true },
|
||||
},
|
||||
{
|
||||
filter = {
|
||||
event = "notify",
|
||||
kind = "debug",
|
||||
},
|
||||
opts = { skip = true },
|
||||
},
|
||||
},
|
||||
})
|
3
.config/nvim/lua/plugins/render-markdown.lua
Normal file
3
.config/nvim/lua/plugins/render-markdown.lua
Normal file
@ -0,0 +1,3 @@
|
||||
require("render-markdown").setup({
|
||||
file_types = { "markdown", "copilot-chat", "Avante" },
|
||||
})
|
51
.config/nvim/lua/plugins/snacks.lua
Normal file
51
.config/nvim/lua/plugins/snacks.lua
Normal file
@ -0,0 +1,51 @@
|
||||
require("snacks").setup({
|
||||
animate = {},
|
||||
bigfile = {},
|
||||
explorer = {},
|
||||
picker = {
|
||||
sources = {
|
||||
explorer = {
|
||||
hidden = true,
|
||||
ignored = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
indent = {
|
||||
indent = { char = "▏" },
|
||||
scope = { char = "▏" },
|
||||
},
|
||||
scroll = {},
|
||||
gitbrowse = {},
|
||||
image = {},
|
||||
dashboard = {
|
||||
sections = {
|
||||
{ section = "header" },
|
||||
|
||||
{ icon = "", desc = "Projects", action = ":Telescope neovim-project", key = "p", padding = 1 },
|
||||
|
||||
{ icon = "", key = "n", desc = "New File", action = ":ene | startinsert" },
|
||||
{
|
||||
icon = "",
|
||||
desc = "Recent Files",
|
||||
action = ":lua Snacks.dashboard.pick('oldfiles')",
|
||||
key = "r",
|
||||
},
|
||||
{ icon = "", key = "q", desc = "Quit", action = ":qa", padding = 1 },
|
||||
|
||||
{ icon = "", title = "Config" },
|
||||
{
|
||||
icon = "",
|
||||
desc = "Lazy",
|
||||
action = ":Lazy",
|
||||
enabled = package.loaded.lazy ~= nil,
|
||||
key = "l",
|
||||
indent = 2,
|
||||
},
|
||||
{ icon = "", desc = "MCPHub", action = ":MCPHub", key = "h", indent = 2 },
|
||||
{ icon = "", desc = "Mason", action = ":Mason", key = "m", indent = 2 },
|
||||
{ icon = "", desc = "Tree-sitter", action = ":TSUpdate", key = "t", indent = 2, padding = 2 },
|
||||
|
||||
{ section = "startup" },
|
||||
},
|
||||
},
|
||||
})
|
42
.config/nvim/lua/plugins/telescope.lua
Normal file
42
.config/nvim/lua/plugins/telescope.lua
Normal file
@ -0,0 +1,42 @@
|
||||
local telescope = require("telescope")
|
||||
local actions = require("telescope.actions")
|
||||
|
||||
telescope.setup({
|
||||
defaults = {
|
||||
prompt_prefix = "> ",
|
||||
selection_caret = " ",
|
||||
path_display = { "smart" },
|
||||
file_ignore_patterns = { ".git/", "node_modules" },
|
||||
|
||||
mappings = {
|
||||
i = {
|
||||
["<C-j>"] = actions.cycle_history_next,
|
||||
["<C-k>"] = actions.cycle_history_prev,
|
||||
["<Down>"] = actions.move_selection_next,
|
||||
["<Up>"] = actions.move_selection_previous,
|
||||
},
|
||||
},
|
||||
},
|
||||
pickers = {
|
||||
find_files = {
|
||||
find_command = { "fd", "--hidden", "--type=file", "--exclude=.git" },
|
||||
},
|
||||
live_grep = {
|
||||
additional_args = function()
|
||||
return { "--hidden", "-g", "!.git/" }
|
||||
end,
|
||||
},
|
||||
},
|
||||
extensions = {
|
||||
["ui-select"] = {
|
||||
require("telescope.themes").get_dropdown({}),
|
||||
},
|
||||
fzf = {
|
||||
case_mode = "smart_case",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
telescope.load_extension("fzf")
|
||||
telescope.load_extension("ui-select")
|
||||
telescope.load_extension("yaml_schema")
|
40
.config/nvim/lua/plugins/treesitter.lua
Normal file
40
.config/nvim/lua/plugins/treesitter.lua
Normal file
@ -0,0 +1,40 @@
|
||||
require("nvim-treesitter.configs").setup({
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"comment",
|
||||
"diff",
|
||||
"go",
|
||||
"gomod",
|
||||
"gosum",
|
||||
"gowork",
|
||||
"helm",
|
||||
"java",
|
||||
"javascript",
|
||||
"json",
|
||||
"kotlin",
|
||||
"lua",
|
||||
"make",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"python",
|
||||
"regex",
|
||||
"sql",
|
||||
"terraform",
|
||||
"tsx",
|
||||
"typescript",
|
||||
"vim",
|
||||
"vimdoc",
|
||||
"yaml",
|
||||
},
|
||||
highlight = {
|
||||
enable = true,
|
||||
disable = { "css" },
|
||||
},
|
||||
autopairs = {
|
||||
enable = true,
|
||||
},
|
||||
indent = {
|
||||
enable = true,
|
||||
disable = { "python", "css" },
|
||||
},
|
||||
})
|
1
.config/nvim/lua/plugins/trouble.lua
Normal file
1
.config/nvim/lua/plugins/trouble.lua
Normal file
@ -0,0 +1 @@
|
||||
require("trouble").setup({})
|
5
.config/nvim/lua/plugins/typescript.lua
Normal file
5
.config/nvim/lua/plugins/typescript.lua
Normal file
@ -0,0 +1,5 @@
|
||||
require("typescript-tools").setup({
|
||||
settings = {
|
||||
complete_function_calls = true,
|
||||
},
|
||||
})
|
7
.config/nvim/lua/plugins/ufo.lua
Normal file
7
.config/nvim/lua/plugins/ufo.lua
Normal file
@ -0,0 +1,7 @@
|
||||
local ufo = require("ufo")
|
||||
|
||||
ufo.setup({
|
||||
provider_selector = function(bufnr, filetype, buftype)
|
||||
return { "treesitter", "indent" }
|
||||
end,
|
||||
})
|
10
.config/nvim/lua/util/files.lua
Normal file
10
.config/nvim/lua/util/files.lua
Normal file
@ -0,0 +1,10 @@
|
||||
local M = {}
|
||||
|
||||
M.read = function(file)
|
||||
local fd = assert(io.open(file, "r"))
|
||||
local data = fd:read("*a")
|
||||
fd:close()
|
||||
return data
|
||||
end
|
||||
|
||||
return M
|
8
.config/polybar/README.md
Normal file
8
.config/polybar/README.md
Normal file
@ -0,0 +1,8 @@
|
||||
# Polybar configuration
|
||||
|
||||
## Requeriments
|
||||
|
||||
- rofi
|
||||
- xdotool
|
||||
- xorg-xprop
|
||||
- wmctrl
|
@ -39,14 +39,6 @@ module-margin-right = 2
|
||||
separator =
|
||||
dim-value = 1.0
|
||||
locale = es_ES.UTF-8
|
||||
tray-position = right
|
||||
tray-detached = false
|
||||
tray-maxsize = 32
|
||||
tray-background = ${root.background}
|
||||
tray-offset-x = 0
|
||||
tray-offset-y = 0
|
||||
tray-padding = 10
|
||||
tray-scale = 1.0
|
||||
|
||||
width = 100%
|
||||
enable-ipc = true
|
||||
@ -58,18 +50,19 @@ fixed-center = true
|
||||
background = ${colors.background}
|
||||
foreground = ${colors.foreground}
|
||||
|
||||
font-0 = "RobotoMono-Regular:size=16:antialias=true;1"
|
||||
; https://www.nerdfonts.com/cheat-sheet
|
||||
font-0 = "RobotoMono Nerd Font Mono:style=Regular:size=16:antialias=true;4"
|
||||
; https://fontawesome.com/cheatsheet/free
|
||||
font-1 = "FontAwesome:size=16:antialias=true;2"
|
||||
font-1 = "FontAwesome:size=16:antialias=true;4"
|
||||
font-2 = "Material Icons:size=16:antialias=true;1"
|
||||
font-3 = "NotoSans-Regular:size=18:weight=bold:antialias=true;2"
|
||||
font-4 = "NotoSans-Regular:size=28:weight=bold:antialias=true;-12"
|
||||
font-3 = "NotoSans-Regular:size=18:weight=bold:antialias=true;6"
|
||||
font-4 = "NotoSans-Regular:size=28:weight=bold:antialias=true;-11
|
||||
font-5 = "FontAwesome:size=21:antialias=true;4"
|
||||
font-6 = "Font Awesome 5 Brands-Regular-400:size=32:antialias=true;1"
|
||||
font-6 = "Font Awesome 6 Brands-Regular-400:size=32:antialias=true;1"
|
||||
|
||||
modules-left = polywins
|
||||
modules-center = custom_date
|
||||
modules-right = updates cpu_bar memory_bar docker vpn network_status network_usage alsa_bar
|
||||
modules-right = updates cpu_bar memory_bar docker vpn network_status network_usage syncthing_status pulseaudio tray
|
||||
|
||||
cursor-click = pointer
|
||||
cursor-scroll = ns-resize
|
||||
|
@ -2,7 +2,8 @@
|
||||
|
||||
[ -f ~/.config/polybar/bar.env ] && . ~/.config/polybar/bar.env
|
||||
|
||||
export TERMINAL_CMD=${TERMINAL_CMD:-"tilix --profile orange --new-process -e"}
|
||||
export TERMINAL_CMD=${TERMINAL_CMD:-"kitty --class=info --override='foreground=#c69026' "}
|
||||
export BROWSER_CMD=${BROWSER_CMD:-"firefox"}
|
||||
export WM_CONTROL=${WM_CONTROL:-"~/.config/polybar/scripts/switch_window_state"}
|
||||
export ROFI_THEME=${ROFI_THEME:-orange}
|
||||
|
||||
@ -14,7 +15,7 @@ function wait_for_polybar
|
||||
fi
|
||||
|
||||
while [ "$(pgrep -u "$(id -u)" -x polybar >/dev/null)" = $condition ]; do
|
||||
sleep 0.2
|
||||
sleep 1
|
||||
done
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
[module/windows]
|
||||
type = custom/text
|
||||
content =" "
|
||||
label =" "
|
||||
click-left = rofi -modi window -show window -theme $ROFI_THEME -show-icons -location 1 -yoffset +45 -xoffset +20
|
||||
|
||||
[module/mpd]
|
||||
@ -20,14 +20,14 @@ label-song-ellipsis = true
|
||||
[module/cpu_bar]
|
||||
type = custom/script
|
||||
exec = ~/.config/polybar/scripts/cpu_usage.py
|
||||
format-prefix = "%{A1:$TERMINAL_CMD 'top -o %CPU' &:}CPU %{A-}"
|
||||
format-prefix = "%{A1:$TERMINAL_CMD btop &:}CPU %{A}"
|
||||
format-prefix-foreground = ${colors.foreground-alt}
|
||||
interval = 5
|
||||
|
||||
[module/memory_bar]
|
||||
type = internal/memory
|
||||
format = <bar-used>
|
||||
format-prefix = "%{A1:$TERMINAL_CMD 'top -o RES' &:} %{A-}"
|
||||
format-prefix = "%{A1:$TERMINAL_CMD btop &:}%{T2} %{T-}%{A}"
|
||||
format-prefix-foreground = ${colors.foreground-alt}
|
||||
|
||||
bar-used-width = 10
|
||||
@ -35,7 +35,7 @@ bar-used-gradient = false
|
||||
bar-used-indicator =
|
||||
bar-used-indicator-foreground = ${colors.foreground}
|
||||
bar-used-indicator-font = 0
|
||||
bar-used-fill = "%{A1:$TERMINAL_CMD 'top -o RES' &:}%{T5}_%{T-}%{A-}"
|
||||
bar-used-fill = "%{A1:$TERMINAL_CMD btop &:}%{T5}_%{T-}%{A}"
|
||||
bar-used-foreground-0 = ${colors.bn}
|
||||
bar-used-foreground-1 = ${colors.bn}
|
||||
bar-used-foreground-2 = ${colors.bn}
|
||||
@ -45,7 +45,7 @@ bar-used-foreground-5 = ${colors.bm}
|
||||
bar-used-foreground-6 = ${colors.bd}
|
||||
bar-used-foreground-7 = ${colors.bd}
|
||||
bar-used-foreground-8 = ${colors.bd}
|
||||
bar-used-empty = "%{A1:$TERMINAL_CMD 'top -o RES' &:}%{T5}_%{T-}%{A-}"
|
||||
bar-used-empty = "%{A1:$TERMINAL_CMD btop &:}%{T5}_%{T-}%{A}"
|
||||
bar-used-empty-foreground = ${colors.foreground-alt}
|
||||
|
||||
[module/wireless]
|
||||
@ -54,7 +54,7 @@ interface = wlp4s0
|
||||
interval = 3.0
|
||||
|
||||
format-connected = <ramp-signal> <label-connected>
|
||||
label-connected = "%{A1:/usr/bin/bash ~/.config/polybar/scripts/nmcli_manager:}%essid%%{A-}"
|
||||
label-connected = "%{A1:/usr/bin/bash ~/.config/polybar/scripts/nmcli_manager:}%essid%%{A}"
|
||||
format-disconnected =
|
||||
|
||||
ramp-signal-0 =
|
||||
@ -75,9 +75,9 @@ format-connected = <label-connected>
|
||||
format-connected-prefix = ""
|
||||
format-disconnected = <label-disconnected>
|
||||
|
||||
label-connected = "%{A1:/usr/bin/bash ~/.config/polybar/scripts/nmcli_manager:}%downspeed:8% %upspeed:8% %{A-}"
|
||||
label-connected = "%{A1:/usr/bin/bash ~/.config/polybar/scripts/nmcli_manager:}%downspeed:8% %upspeed:8% %{A}"
|
||||
# keep speed meter for other devices
|
||||
label-disconnected = "%{A1:/usr/bin/bash ~/.config/polybar/scripts/nmcli_manager:}%downspeed:8% %upspeed:8% %{A-}"
|
||||
label-disconnected = "%{A1:/usr/bin/bash ~/.config/polybar/scripts/nmcli_manager:}%downspeed:8% %upspeed:8% %{A}"
|
||||
|
||||
[module/network_usage]
|
||||
type = custom/script
|
||||
@ -90,7 +90,7 @@ tail = true
|
||||
[module/network_status]
|
||||
type = custom/script
|
||||
exec = ~/.config/polybar/scripts/network_status
|
||||
click-left = $TERMINAL_CMD "fping --elapsed --count 100 1.1.1.1"
|
||||
click-left = $TERMINAL_CMD fping --elapsed --count 100 1.0.0.1
|
||||
interval = 5
|
||||
|
||||
[module/vpn]
|
||||
@ -98,13 +98,6 @@ type = custom/script
|
||||
exec = ~/.config/polybar/scripts/check_vpn
|
||||
interval = 5
|
||||
|
||||
[module/spotify]
|
||||
type = custom/script
|
||||
exec = ~/.config/polybar/scripts/spotify.py
|
||||
interval = 5
|
||||
format-prefix = " "
|
||||
format-font = 1
|
||||
|
||||
[module/date]
|
||||
type = internal/date
|
||||
interval = 1
|
||||
@ -123,16 +116,13 @@ exec = ~/.config/polybar/scripts/custom_date
|
||||
interval = 1
|
||||
click-left = gnome-calendar
|
||||
|
||||
[module/alsa_bar]
|
||||
type = internal/alsa
|
||||
|
||||
[module/pulseaudio]
|
||||
type = internal/pulseaudio
|
||||
format-volume = <label-volume> <bar-volume>
|
||||
label-volume = "%{A3:$TERMINAL_CMD 'pulsemixer' &:}%{A-}"
|
||||
label-volume-foreground = ${root.foreground}
|
||||
|
||||
format-muted-prefix = ""
|
||||
format-muted-foreground = ${colors.foreground-alt}
|
||||
label-muted = sound muted
|
||||
label-volume = "%{A3:$TERMINAL_CMD pulsemixer &:}%{T4} %{T-}%{A}"
|
||||
label-muted = " muted"
|
||||
label-muted-foreground = ${colors.foreground-alt}
|
||||
|
||||
bar-volume-width = 10
|
||||
bar-volume-foreground-0 = ${colors.bn}
|
||||
@ -144,21 +134,18 @@ bar-volume-foreground-5 = ${colors.bn}
|
||||
bar-volume-foreground-6 = ${colors.bm}
|
||||
bar-volume-foreground-7 = ${colors.bm}
|
||||
|
||||
|
||||
bar-volume-gradient = false
|
||||
bar-volume-indicator =
|
||||
bar-volume-fill = "%{A3:$TERMINAL_CMD 'pulsemixer' &:}%{T5}_%{T-}%{A-}"
|
||||
bar-volume-empty = "%{A3:$TERMINAL_CMD 'pulsemixer' &:}%{T5}_%{T-}%{A-}"
|
||||
bar-volume-gradient = true
|
||||
bar-volume-indicator = ""
|
||||
bar-volume-fill = "%{A3:$TERMINAL_CMD pulsemixer &:}%{T5}─%{T-}%{A}"
|
||||
bar-volume-empty = "%{A3:$TERMINAL_CMD pulsemixer &:}%{T5}─%{T-}%{A}"
|
||||
bar-volume-empty-foreground = ${colors.foreground-alt}
|
||||
|
||||
click-right = $TERMINAL_CMD 'pulsemixer'
|
||||
|
||||
[module/updates]
|
||||
type = custom/script
|
||||
exec = ~/.config/polybar/scripts/check_updates
|
||||
tail = true
|
||||
interval = 5
|
||||
click-left = $TERMINAL_CMD "yay -Suy" &
|
||||
click-left = $TERMINAL_CMD yay -Suy &
|
||||
|
||||
[module/polywins]
|
||||
type = custom/script
|
||||
@ -168,6 +155,13 @@ label = "%output%"
|
||||
label-padding = 0
|
||||
tail = true
|
||||
|
||||
[module/syncthing_status]
|
||||
type = custom/script
|
||||
exec = ~/.config/polybar/scripts/syncthing_status
|
||||
interval = 10
|
||||
exec-if = syncthing cli show system > /dev/null
|
||||
click-left = $BROWSER_CMD $(syncthing cli show system | jq -r .guiAddressUsed)
|
||||
|
||||
[module/battery]
|
||||
type = internal/battery
|
||||
|
||||
@ -185,5 +179,11 @@ label-full =
|
||||
type = custom/script
|
||||
exec = ~/.config/polybar/scripts/docker
|
||||
exec-if = docker ps -q
|
||||
interval = 30
|
||||
label = "%output%"
|
||||
interval = 10
|
||||
label = "%{T2}%{T-}%output%"
|
||||
|
||||
[module/tray]
|
||||
type = internal/tray
|
||||
tray-maxsize = 40
|
||||
tray-background = ${root.background}
|
||||
tray-spacing = 7
|
||||
|
@ -3,6 +3,6 @@
|
||||
while true; do
|
||||
UPDATES=$(checkupdates 2>/dev/null | wc -l)
|
||||
|
||||
[ "$UPDATES" -gt 0 ] && echo " $UPDATES" && sleep 30
|
||||
[ "$UPDATES" -gt 0 ] && echo "%{T2} %{T-}$UPDATES" && sleep 30
|
||||
[ "$UPDATES" -eq 0 ] && echo "" && sleep 300
|
||||
done
|
||||
|
@ -1,11 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
OUTPUT=""
|
||||
openvpn_icon="%{T2}%{T-}"
|
||||
globalprotect_icon="%{T2}%{T-}"
|
||||
wireguard_icon="%{T2}%{T-}"
|
||||
|
||||
openvpn=$(pgrep -c openvpn$)
|
||||
[ "$openvpn" -gt 0 ] && OUTPUT=$(eval printf "%.0s" "{1..$openvpn}")
|
||||
output=""
|
||||
if pgrep openvpn >/dev/null; then
|
||||
output=${openvpn_icon}
|
||||
fi
|
||||
|
||||
openfortivpn=$(pgrep -c openfortivpn$)
|
||||
[ "$openfortivpn" -gt 0 ] && OUTPUT=${OUTPUT}$(eval printf '%.0s' "{1..$openfortivpn}")
|
||||
if pgrep gpclient >/dev/null; then
|
||||
output="${output} ${globalprotect_icon}"
|
||||
fi
|
||||
|
||||
echo "$OUTPUT" | sed -e 's/\(.\)/\1 /g'
|
||||
if ip route list | grep 'dev wg0 proto kernel scope link' >/dev/null; then
|
||||
output="${output} ${wireguard_icon}"
|
||||
fi
|
||||
|
||||
echo "%{F#43a047}$output%{F-}"
|
||||
|
@ -26,17 +26,17 @@ def show_cpu_usage():
|
||||
bar = ''
|
||||
global_count = 0
|
||||
for usage in cpu_usage.split(','):
|
||||
value, key = str.lstrip(usage).split(' ')
|
||||
count = round(float(value) / 10)
|
||||
if count > 0 and key != 'id':
|
||||
values = str.lstrip(usage).split(' ')
|
||||
count = round(float(values[0]) / 10)
|
||||
if count > 0 and values[1] != 'id':
|
||||
global_count += count
|
||||
bar += '%{F' + colors[key] + '}' + '_' * count + '%{F-}'
|
||||
bar += '%{F' + colors[values[1]] + '}' + '_' * count + '%{F-}'
|
||||
|
||||
padding = ''
|
||||
if global_count < 10:
|
||||
padding = '%{F' + colors['id'] + '}' + '_' * (10 - global_count) + '%{F-}'
|
||||
|
||||
print("%{A1:$TERMINAL_CMD 'top -o %CPU' &:}%{T5}" + bar + padding + "%{T-}%{A-}")
|
||||
print("%{A1:$TERMINAL_CMD btop &:}%{T5}" + bar + padding + "%{T-}%{A}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
@ -1,35 +1,43 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
URL=${1:-1.1.1.1}
|
||||
DEFAULT_HOST="1.0.0.1"
|
||||
PING_COUNT=5
|
||||
RED="#FF0000"
|
||||
ORANGE="#FFA500"
|
||||
YELLOW="#FFFF00"
|
||||
OUTAGE_SYMBOL=""
|
||||
LATENCY_SYMBOL=""
|
||||
|
||||
output=$(fping --quiet --outage --count=5 "$URL" 2>&1)
|
||||
outage_output=""
|
||||
outage_color="FFFFFF"
|
||||
avg_output=""
|
||||
avg_color="FFFFFF"
|
||||
format_output() {
|
||||
local color=$1
|
||||
local symbol=$2
|
||||
echo "%{F$color}%{T2}$symbol%{F-}%{T-}"
|
||||
}
|
||||
|
||||
avg=$(echo "$output" | cut -d "," -f 3 | cut -d "=" -f 2 | cut -d "/" -f 2 | cut -d "." -f 1)
|
||||
outage=$(echo "$output" | cut -d "," -f 2 | cut -d "=" -f 2 | tr -d " " | cut -d "." -f 1)
|
||||
get_ping_stats() {
|
||||
fping --quiet --stats --count="$PING_COUNT" "$1" 2>&1
|
||||
}
|
||||
|
||||
if [ "$outage" -eq 0 ] || [ -z "$outage" ]; then
|
||||
outage_output=""
|
||||
elif [ "$outage" -lt 30 ]; then
|
||||
outage_color=F5A70A
|
||||
host=${1:-$DEFAULT_HOST}
|
||||
stats=$(get_ping_stats "$host")
|
||||
output=""
|
||||
|
||||
unreachable=$(awk '/unreachable/ {print $1}' <<< "$stats")
|
||||
if [ "$unreachable" -eq 1 ]; then
|
||||
output=$(format_output "$RED" "$OUTAGE_SYMBOL")
|
||||
else
|
||||
outage_color=FF0000
|
||||
fi
|
||||
|
||||
if [ -z "$avg" ] || [ "$avg" -gt 60 ]; then
|
||||
avg_color=FF0000
|
||||
elif [ "$avg" -lt 40 ]; then
|
||||
avg_output=""
|
||||
else
|
||||
avg_color=F5A70A
|
||||
fi
|
||||
|
||||
if [ -n "$outage_output" ] || [ -n "$avg_output" ]; then
|
||||
echo "%{F#$outage_color}%{T5}${outage_output}%{F-}%{T-}%{F#$avg_color}%{T5} ${avg_output}%{F-}%{T-}"
|
||||
else
|
||||
echo ""
|
||||
avg=$(awk '/avg round/ {print $1}' <<< "$stats")
|
||||
avg=${avg%.*}
|
||||
|
||||
if [ "$avg" -gt 90 ]; then
|
||||
color=$RED
|
||||
elif [ "$avg" -gt 75 ]; then
|
||||
color=$ORANGE
|
||||
elif [ "$avg" -gt 60 ]; then
|
||||
color=$YELLOW
|
||||
fi
|
||||
|
||||
[ "$avg" -gt 60 ] && output=$(format_output "$color" "$LATENCY_SYMBOL")
|
||||
fi
|
||||
|
||||
echo "$output"
|
||||
|
@ -22,7 +22,7 @@ get_icon_by_device()
|
||||
;;
|
||||
esac
|
||||
|
||||
echo $icon
|
||||
echo "$icon"
|
||||
}
|
||||
|
||||
while true; do
|
||||
@ -58,9 +58,9 @@ while true; do
|
||||
output=" 0.01 0.01"
|
||||
fi
|
||||
|
||||
echo "$icon$output"
|
||||
echo "%{T2}$icon%{T-}$output"
|
||||
else
|
||||
echo "$icon-- --"
|
||||
echo "%{T2}$icon%{T-} -- --"
|
||||
fi
|
||||
|
||||
echo "$current_values">$COUNTER_FILE
|
||||
|
@ -48,32 +48,37 @@ get_icon_by_name()
|
||||
{
|
||||
name=$(echo "$1" | tr '[:upper:]' '[:lower:]')
|
||||
declare -A ICON_MAP=(
|
||||
[tilix]=
|
||||
[alacritty]=
|
||||
[kitty]=
|
||||
[code]=
|
||||
[brave-browser]=
|
||||
[firefox]=
|
||||
[10]=
|
||||
[brave-browser]=
|
||||
[chromium]=
|
||||
[tor]=
|
||||
[nextcloud]=
|
||||
[code]=
|
||||
[eog]=
|
||||
[evince]=
|
||||
[file-roller]=
|
||||
[firefox]=
|
||||
[glrnvim]=
|
||||
[gnome-calculator]=
|
||||
[gnome-calendar]=
|
||||
[gnome-control-center]=
|
||||
[gnome-terminal]=
|
||||
[gpaste-ui]=
|
||||
[eog]=
|
||||
[evince]=
|
||||
[10]=
|
||||
[nautilus]=
|
||||
[file-roller]=
|
||||
[mailspring]=
|
||||
[keepassxc]=
|
||||
[steam]=
|
||||
[info]=
|
||||
[kitty]=
|
||||
[nautilus]=
|
||||
[nextcloud]=
|
||||
[nuclear]=
|
||||
[nvim]=
|
||||
[seahorse]=
|
||||
[skype]=
|
||||
[slack]=
|
||||
[spotify]=
|
||||
[spotube]=
|
||||
[steam]=
|
||||
[telegramdesktop]=
|
||||
[thunderbird]=
|
||||
[vpn]=
|
||||
[tor]=
|
||||
[vivaldi-stable]=
|
||||
[xterm]=
|
||||
)
|
||||
|
||||
@ -90,9 +95,7 @@ raise_or_minimize() {
|
||||
if [ "$(get_active_wid)" = "$1" ]; then
|
||||
# wmctrl -ir "$1" -b toggle,hidden
|
||||
xdotool windowminimize "$(xdotool getactivewindow)"
|
||||
echo "minimize" >> /dev/shm/log
|
||||
else
|
||||
echo "positos" >> /dev/shm/log
|
||||
wmctrl -ia "$1"
|
||||
fi
|
||||
}
|
||||
@ -192,7 +195,7 @@ generate_window_list() {
|
||||
# Format each window name one by one
|
||||
# Space and . are both used as IFS,
|
||||
# because classname and class are separated by '.'
|
||||
while IFS=" " read -r wid ws cname host title; do
|
||||
while IFS=" " read -r wid ws cname _ title; do
|
||||
cname=${cname##*.}
|
||||
# Don't show the window if on another workspace (-1 = sticky)
|
||||
if [ "$ws" != "$active_workspace" ] && [ "$ws" != "-1" ]; then
|
||||
@ -215,7 +218,7 @@ generate_window_list() {
|
||||
case "$show" in
|
||||
"window_classname") w_name="$cname" ;;
|
||||
"window_title") w_name="$title" ;;
|
||||
"icon") w_name=$(get_icon_by_name "$cname")
|
||||
"icon") w_name=$(get_icon_by_name "$cname") ;;
|
||||
esac
|
||||
|
||||
# Use user-selected character case
|
||||
|
@ -1,35 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import dbus
|
||||
|
||||
bus_name = 'org.mpris.MediaPlayer2.spotify'
|
||||
|
||||
|
||||
def get_spotify_song():
|
||||
output = ''
|
||||
|
||||
try:
|
||||
session_bus = dbus.SessionBus()
|
||||
spotify_bus = session_bus.get_object(bus_name, '/org/mpris/MediaPlayer2')
|
||||
spotify_properties = dbus.Interface(spotify_bus, 'org.freedesktop.DBus.Properties')
|
||||
metadata = spotify_properties.Get("org.mpris.MediaPlayer2.Player", "Metadata")
|
||||
|
||||
artist = metadata['xesam:artist'][0]
|
||||
title = metadata['xesam:title']
|
||||
|
||||
window_title = artist + ' - ' + title
|
||||
|
||||
output = "%{A1:$WM_CONTROL '" + window_title + "' &:}" + window_title + "%{A-}"
|
||||
except dbus.DBusException as e:
|
||||
if (e.get_dbus_message() == f'The name {bus_name} was not provided by any .service files'):
|
||||
pass
|
||||
else:
|
||||
output = e.get_dbus_message()
|
||||
except Exception as e:
|
||||
output = str(e)
|
||||
|
||||
print(output)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
get_spotify_song()
|
19
.config/polybar/scripts/syncthing_status
Executable file
19
.config/polybar/scripts/syncthing_status
Executable file
@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
output=""
|
||||
while IFS="[ .]" read -r connected paused; do
|
||||
if [ "$paused" == "true" ]; then
|
||||
output="${output} "
|
||||
continue
|
||||
fi
|
||||
|
||||
if [ "$connected" == "false" ]; then
|
||||
output="${output} "
|
||||
else
|
||||
output="${output} "
|
||||
fi
|
||||
done <<-EOF
|
||||
$(syncthing cli show connections | jq -r '.connections[] | "\(.connected) \(.paused)"')
|
||||
EOF
|
||||
|
||||
printf "%s" "%{T2}${output%?}%{T-}"
|
@ -24,7 +24,7 @@ configuration {
|
||||
blackselect: #303030;
|
||||
darkgray: #848484;
|
||||
scrollbarcolor: #FFCB81;
|
||||
font: "Droid Sans Mono 16";
|
||||
font: "RobotoMono Nerd Font Mono 18";
|
||||
background-color: @blackdarkest;
|
||||
}
|
||||
|
||||
|
@ -1,56 +0,0 @@
|
||||
# remap bind key from 'Ctrl-b' to 'Ctrl-q'
|
||||
unbind C-b
|
||||
set-option -g prefix C-q
|
||||
bind-key C-q send-prefix
|
||||
|
||||
set -g mouse off
|
||||
set -g default-terminal "tmux-256color"
|
||||
set -ag terminal-overrides ",xterm-256color:RGB"
|
||||
|
||||
|
||||
# reload config
|
||||
bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded"
|
||||
|
||||
# start counting windows and panels from 1
|
||||
# set -g base-index 1
|
||||
# set-window-option -g pane-base-index 1
|
||||
# set-option -g allow-rename off
|
||||
|
||||
# split panes
|
||||
bind | split-window -h
|
||||
bind - split-window -v
|
||||
bind e split-window -h
|
||||
bind o split-window -v
|
||||
unbind '"'
|
||||
unbind %
|
||||
|
||||
# scroll up/down
|
||||
bind -n Pageup copy-mode -u
|
||||
bind -n S-Pageup copy-mode -u
|
||||
bind -n S-Pagedown send-keys Pagedown
|
||||
|
||||
# switch panes using Alt-arrow without prefix
|
||||
bind -n M-Left select-pane -L
|
||||
bind -n M-Right select-pane -R
|
||||
bind -n M-Up select-pane -U
|
||||
bind -n M-Down select-pane -D
|
||||
|
||||
# turn off all sounds
|
||||
set -g visual-activity off
|
||||
set -g visual-bell off
|
||||
set -g visual-silence off
|
||||
setw -g monitor-activity off
|
||||
set -g bell-action none
|
||||
|
||||
# statusbar
|
||||
# https://www.ditig.com/256-colors-cheat-sheet
|
||||
set -g status-position bottom
|
||||
set -g status-style 'bg=colour235 fg=colour255'
|
||||
set -g status-left-length 50
|
||||
set -g status-left " "
|
||||
set -g status-right ""
|
||||
|
||||
# pane
|
||||
set -g pane-border-style 'bg=default fg=colour8'
|
||||
set -g pane-active-border-style 'bg=default fg=colour8'
|
||||
set -g message-style 'fg=colour255 bg=colour62'
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,3 +1 @@
|
||||
.config/polybar/task_manager.ini
|
||||
.config/polybar/modules-left.ini
|
||||
.config/polybar/bar.env
|
||||
|
14
.markdownlintrc
Normal file
14
.markdownlintrc
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"default": true,
|
||||
"MD013": {
|
||||
"line_length": 480,
|
||||
"heading_line_length": 80,
|
||||
"code_block_line_length": 280,
|
||||
"code_blocks": true,
|
||||
"tables": true,
|
||||
"headings": true,
|
||||
"headers": true,
|
||||
"strict": false,
|
||||
"stern": false
|
||||
}
|
||||
}
|
186
.p10k.zsh
186
.p10k.zsh
@ -1,7 +1,7 @@
|
||||
# Generated by Powerlevel10k configuration wizard on 2021-06-17 at 17:17 CEST.
|
||||
# Based on romkatv/powerlevel10k/config/p10k-lean.zsh, checksum 19275.
|
||||
# Wizard options: awesome-fontconfig, large icons, unicode, lean, 1 line, compact,
|
||||
# few icons, concise, instant_prompt=verbose.
|
||||
# Generated by Powerlevel10k configuration wizard on 2024-01-20 at 14:41 CET.
|
||||
# Based on romkatv/powerlevel10k/config/p10k-lean.zsh, checksum 61526.
|
||||
# Wizard options: nerdfont-v3 + powerline, large icons, unicode, lean, 1 line, compact,
|
||||
# few icons, concise, instant_prompt=quiet.
|
||||
# Type `p10k configure` to generate another config.
|
||||
#
|
||||
# Config for Powerlevel10k with lean prompt style. Type `p10k configure` to generate
|
||||
@ -26,13 +26,15 @@
|
||||
unset -m '(POWERLEVEL9K_*|DEFAULT_USER)~POWERLEVEL9K_GITSTATUS_DIR'
|
||||
|
||||
# Zsh >= 5.1 is required.
|
||||
autoload -Uz is-at-least && is-at-least 5.1 || return
|
||||
[[ $ZSH_VERSION == (5.<1->*|<6->.*) ]] || return
|
||||
|
||||
# The list of segments shown on the left. Fill it with the most important segments.
|
||||
typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(
|
||||
# os_icon # os identifier
|
||||
dir # current directory
|
||||
# vpn_ip # virtual private network indicator
|
||||
kubecontext # current kubernetes context (https://kubernetes.io/)
|
||||
aws # aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html)
|
||||
prompt_char # prompt symbol
|
||||
)
|
||||
|
||||
@ -49,8 +51,8 @@
|
||||
# asdf # asdf version manager (https://github.com/asdf-vm/asdf)
|
||||
virtualenv # python virtual environment (https://docs.python.org/3/library/venv.html)
|
||||
# anaconda # conda environment (https://conda.io/)
|
||||
pyenv # python environment (https://github.com/pyenv/pyenv)
|
||||
goenv # go environment (https://github.com/syndbg/goenv)
|
||||
# pyenv # python environment (https://github.com/pyenv/pyenv)
|
||||
# goenv # go environment (https://github.com/syndbg/goenv)
|
||||
# nodenv # node.js version from nodenv (https://github.com/nodenv/nodenv)
|
||||
# nvm # node.js version from nvm (https://github.com/nvm-sh/nvm)
|
||||
# nodeenv # node.js environment (https://github.com/ekalinin/nodeenv)
|
||||
@ -71,9 +73,9 @@
|
||||
# phpenv # php version from phpenv (https://github.com/phpenv/phpenv)
|
||||
# scalaenv # scala version from scalaenv (https://github.com/scalaenv/scalaenv)
|
||||
# haskell_stack # haskell version from stack (https://haskellstack.org/)
|
||||
kubecontext # current kubernetes context (https://kubernetes.io/)
|
||||
# kubecontext # current kubernetes context (https://kubernetes.io/)
|
||||
# terraform # terraform workspace (https://www.terraform.io)
|
||||
aws # aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html)
|
||||
# aws # aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html)
|
||||
# aws_eb_env # aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/)
|
||||
# azure # azure account name (https://docs.microsoft.com/en-us/cli/azure)
|
||||
# gcloud # google cloud cli account and project (https://cloud.google.com/)
|
||||
@ -101,10 +103,11 @@
|
||||
# battery # internal battery
|
||||
# wifi # wifi speed
|
||||
# example # example user-defined segment (see prompt_example function below)
|
||||
# hcloud
|
||||
)
|
||||
|
||||
# Defines character set used by powerlevel10k. It's best to let `p10k configure` set it for you.
|
||||
typeset -g POWERLEVEL9K_MODE=awesome-fontconfig
|
||||
typeset -g POWERLEVEL9K_MODE=nerdfont-v3
|
||||
# When set to `moderate`, some icons will have an extra space after them. This is meant to avoid
|
||||
# icon overlap when using non-monospace fonts. When set to `none`, spaces are not added.
|
||||
typeset -g POWERLEVEL9K_ICON_PADDING=moderate
|
||||
@ -227,7 +230,7 @@
|
||||
.java-version
|
||||
.perl-version
|
||||
.php-version
|
||||
.tool-version
|
||||
.tool-versions
|
||||
.shorten_folder_marker
|
||||
.svn
|
||||
.terraform
|
||||
@ -333,7 +336,7 @@
|
||||
# typeset -g POWERLEVEL9K_DIR_PREFIX='%fin '
|
||||
|
||||
#####################################[ vcs: git status ]######################################
|
||||
# Branch icon. Set this parameter to '\uF126 ' for the popular Powerline branch icon.
|
||||
# Branch icon. Set this parameter to '\UE0A0 ' for the popular Powerline branch icon.
|
||||
typeset -g POWERLEVEL9K_VCS_BRANCH_ICON=
|
||||
|
||||
# Untracked files icon. It's really a question mark, your font isn't broken.
|
||||
@ -413,11 +416,17 @@
|
||||
res+=" ${modified}wip"
|
||||
fi
|
||||
|
||||
if (( VCS_STATUS_COMMITS_AHEAD || VCS_STATUS_COMMITS_BEHIND )); then
|
||||
# ⇣42 if behind the remote.
|
||||
(( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}"
|
||||
# ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42.
|
||||
(( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" "
|
||||
(( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}⇡${VCS_STATUS_COMMITS_AHEAD}"
|
||||
elif [[ -n $VCS_STATUS_REMOTE_BRANCH ]]; then
|
||||
# Tip: Uncomment the next line to display '=' if up to date with the remote.
|
||||
# res+=" ${clean}="
|
||||
fi
|
||||
|
||||
# ⇠42 if behind the push remote.
|
||||
(( VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" ${clean}⇠${VCS_STATUS_PUSH_COMMITS_BEHIND}"
|
||||
(( VCS_STATUS_PUSH_COMMITS_AHEAD && !VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" "
|
||||
@ -480,7 +489,7 @@
|
||||
|
||||
# Show status of repositories of these types. You can add svn and/or hg if you are
|
||||
# using them. If you do, your prompt may become slow even when your current directory
|
||||
# isn't in an svn or hg reposotiry.
|
||||
# isn't in an svn or hg repository.
|
||||
typeset -g POWERLEVEL9K_VCS_BACKENDS=(git)
|
||||
|
||||
# These settings are used for repositories other than Git or when gitstatusd fails and
|
||||
@ -714,6 +723,12 @@
|
||||
# Custom icon.
|
||||
# typeset -g POWERLEVEL9K_NNN_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
|
||||
######################[ lf: lf shell (https://github.com/gokcehan/lf) ]#######################
|
||||
# lf shell color.
|
||||
typeset -g POWERLEVEL9K_LF_FOREGROUND=72
|
||||
# Custom icon.
|
||||
# typeset -g POWERLEVEL9K_LF_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
|
||||
##################[ xplr: xplr shell (https://github.com/sayanarijit/xplr) ]##################
|
||||
# xplr shell color.
|
||||
typeset -g POWERLEVEL9K_XPLR_FOREGROUND=72
|
||||
@ -736,12 +751,21 @@
|
||||
# Nix shell color.
|
||||
typeset -g POWERLEVEL9K_NIX_SHELL_FOREGROUND=74
|
||||
|
||||
# Display the icon of nix_shell if PATH contains a subdirectory of /nix/store.
|
||||
# typeset -g POWERLEVEL9K_NIX_SHELL_INFER_FROM_PATH=false
|
||||
|
||||
# Tip: If you want to see just the icon without "pure" and "impure", uncomment the next line.
|
||||
# typeset -g POWERLEVEL9K_NIX_SHELL_CONTENT_EXPANSION=
|
||||
|
||||
# Custom icon.
|
||||
# typeset -g POWERLEVEL9K_NIX_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
|
||||
##################[ chezmoi_shell: chezmoi shell (https://www.chezmoi.io/) ]##################
|
||||
# chezmoi shell color.
|
||||
typeset -g POWERLEVEL9K_CHEZMOI_SHELL_FOREGROUND=33
|
||||
# Custom icon.
|
||||
# typeset -g POWERLEVEL9K_CHEZMOI_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
|
||||
##################################[ disk_usage: disk usage ]##################################
|
||||
# Colors for different levels of disk usage.
|
||||
typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_FOREGROUND=35
|
||||
@ -835,6 +859,30 @@
|
||||
# Custom icon.
|
||||
# typeset -g POWERLEVEL9K_TASKWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
|
||||
######[ per_directory_history: Oh My Zsh per-directory-history local/global indicator ]#######
|
||||
# Color when using local/global history.
|
||||
typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_FOREGROUND=135
|
||||
typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_FOREGROUND=130
|
||||
|
||||
# Tip: Uncomment the next two lines to hide "local"/"global" text and leave just the icon.
|
||||
# typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_CONTENT_EXPANSION=''
|
||||
# typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_CONTENT_EXPANSION=''
|
||||
|
||||
# Custom icon.
|
||||
# typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
# typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
|
||||
################################[ cpu_arch: CPU architecture ]################################
|
||||
# CPU architecture color.
|
||||
typeset -g POWERLEVEL9K_CPU_ARCH_FOREGROUND=172
|
||||
|
||||
# Hide the segment when on a specific CPU architecture.
|
||||
# typeset -g POWERLEVEL9K_CPU_ARCH_X86_64_CONTENT_EXPANSION=
|
||||
# typeset -g POWERLEVEL9K_CPU_ARCH_X86_64_VISUAL_IDENTIFIER_EXPANSION=
|
||||
|
||||
# Custom icon.
|
||||
# typeset -g POWERLEVEL9K_CPU_ARCH_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
|
||||
##################################[ context: user@hostname ]##################################
|
||||
# Context color when running with privileges.
|
||||
typeset -g POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND=178
|
||||
@ -960,6 +1008,11 @@
|
||||
##############[ nvm: node.js version from nvm (https://github.com/nvm-sh/nvm) ]###############
|
||||
# Nvm color.
|
||||
typeset -g POWERLEVEL9K_NVM_FOREGROUND=70
|
||||
# If set to false, hide node version if it's the same as default:
|
||||
# $(nvm version current) == $(nvm version default).
|
||||
typeset -g POWERLEVEL9K_NVM_PROMPT_ALWAYS_SHOW=false
|
||||
# If set to false, hide node version if it's equal to "system".
|
||||
typeset -g POWERLEVEL9K_NVM_SHOW_SYSTEM=true
|
||||
# Custom icon.
|
||||
# typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
|
||||
@ -1109,6 +1162,16 @@
|
||||
# Custom icon.
|
||||
# typeset -g POWERLEVEL9K_PLENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
|
||||
###########[ perlbrew: perl version from perlbrew (https://github.com/gugod/App-perlbrew) ]############
|
||||
# Perlbrew color.
|
||||
typeset -g POWERLEVEL9K_PERLBREW_FOREGROUND=67
|
||||
# Show perlbrew version only when in a perl project subdirectory.
|
||||
typeset -g POWERLEVEL9K_PERLBREW_PROJECT_ONLY=true
|
||||
# Don't show "perl-" at the front.
|
||||
typeset -g POWERLEVEL9K_PERLBREW_SHOW_PREFIX=false
|
||||
# Custom icon.
|
||||
# typeset -g POWERLEVEL9K_PERLBREW_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
|
||||
############[ phpenv: php version from phpenv (https://github.com/phpenv/phpenv) ]############
|
||||
# PHP color.
|
||||
typeset -g POWERLEVEL9K_PHPENV_FOREGROUND=99
|
||||
@ -1150,9 +1213,9 @@
|
||||
# typeset -g POWERLEVEL9K_HASKELL_STACK_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
|
||||
#############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]#############
|
||||
# Show kubecontext only when the the command you are typing invokes one of these tools.
|
||||
# Show kubecontext only when the command you are typing invokes one of these tools.
|
||||
# Tip: Remove the next line to always show kubecontext.
|
||||
typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|fluxctl|stern'
|
||||
typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold|kubent|kubecolor|cmctl|sparkctl'
|
||||
|
||||
# Kubernetes context classes for the purpose of using different colors, icons and expansions with
|
||||
# different contexts.
|
||||
@ -1181,8 +1244,8 @@
|
||||
typeset -g POWERLEVEL9K_KUBECONTEXT_PRE_FOREGROUND=069
|
||||
# typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <'
|
||||
typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=(
|
||||
'*-pro*' PRO
|
||||
'*-pre*' PRE
|
||||
'*-pro' PRO
|
||||
'*-pre' PRE
|
||||
'*' DEFAULT)
|
||||
typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_FOREGROUND=134
|
||||
# typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
@ -1231,7 +1294,8 @@
|
||||
# Show P9K_KUBECONTEXT_CLOUD_CLUSTER if it's not empty and fall back to P9K_KUBECONTEXT_NAME.
|
||||
POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${P9K_KUBECONTEXT_CLOUD_CLUSTER:-${P9K_KUBECONTEXT_NAME}}'
|
||||
# Append the current context's namespace if it's not "default".
|
||||
POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${${:-/$P9K_KUBECONTEXT_NAMESPACE}:#/default}'
|
||||
# POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${${:-/$P9K_KUBECONTEXT_NAMESPACE}:#/default}'
|
||||
POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='/${P9K_KUBECONTEXT_NAMESPACE}'
|
||||
|
||||
# Custom prefix.
|
||||
# typeset -g POWERLEVEL9K_KUBECONTEXT_PREFIX='%fat '
|
||||
@ -1269,10 +1333,16 @@
|
||||
typeset -g POWERLEVEL9K_TERRAFORM_OTHER_FOREGROUND=38
|
||||
# typeset -g POWERLEVEL9K_TERRAFORM_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
|
||||
#############[ terraform_version: terraform version (https://www.terraform.io) ]##############
|
||||
# Terraform version color.
|
||||
typeset -g POWERLEVEL9K_TERRAFORM_VERSION_FOREGROUND=38
|
||||
# Custom icon.
|
||||
# typeset -g POWERLEVEL9K_TERRAFORM_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
|
||||
#[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]#
|
||||
# Show aws only when the the command you are typing invokes one of these tools.
|
||||
# Show aws only when the command you are typing invokes one of these tools.
|
||||
# Tip: Remove the next line to always show aws.
|
||||
typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|terraform|pulumi|terragrunt|cdk'
|
||||
typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws*|terraform|tf*|pulumi|terragrunt|cdk'
|
||||
|
||||
# POWERLEVEL9K_AWS_CLASSES is an array with even number of elements. The first element
|
||||
# in each pair defines a pattern against which the current AWS profile gets matched.
|
||||
@ -1295,10 +1365,10 @@
|
||||
# You can define different colors, icons and content expansions for different classes:
|
||||
#
|
||||
typeset -g POWERLEVEL9K_AWS_PRO_FOREGROUND=196
|
||||
typeset -g POWERLEVEL9K_AWS_PRO_VISUAL_IDENTIFIER_EXPANSION=' '
|
||||
typeset -g POWERLEVEL9K_AWS_PRO_VISUAL_IDENTIFIER_EXPANSION=' '
|
||||
typeset -g POWERLEVEL9K_AWS_PRE_FOREGROUND=208
|
||||
typeset -g POWERLEVEL9K_AWS_PRE_VISUAL_IDENTIFIER_EXPANSION=' '
|
||||
typeset -g POWERLEVEL9K_AWS_DEFAULT_VISUAL_IDENTIFIER_EXPANSION=' '
|
||||
typeset -g POWERLEVEL9K_AWS_PRE_VISUAL_IDENTIFIER_EXPANSION=' '
|
||||
typeset -g POWERLEVEL9K_AWS_DEFAULT_VISUAL_IDENTIFIER_EXPANSION=' '
|
||||
#typeset -g POWERLEVEL9K_AWS_PRE_CONTENT_EXPANSION='> ${P9K_CONTENT} <'
|
||||
typeset -g POWERLEVEL9K_AWS_CLASSES=(
|
||||
'*-pro*' PRO
|
||||
@ -1320,18 +1390,47 @@
|
||||
# typeset -g POWERLEVEL9K_AWS_EB_ENV_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
|
||||
##########[ azure: azure account name (https://docs.microsoft.com/en-us/cli/azure) ]##########
|
||||
# Show azure only when the the command you are typing invokes one of these tools.
|
||||
# Show azure only when the command you are typing invokes one of these tools.
|
||||
# Tip: Remove the next line to always show azure.
|
||||
typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi|terragrunt'
|
||||
|
||||
# POWERLEVEL9K_AZURE_CLASSES is an array with even number of elements. The first element
|
||||
# in each pair defines a pattern against which the current azure account name gets matched.
|
||||
# More specifically, it's P9K_CONTENT prior to the application of context expansion (see below)
|
||||
# that gets matched. If you unset all POWERLEVEL9K_AZURE_*CONTENT_EXPANSION parameters,
|
||||
# you'll see this value in your prompt. The second element of each pair in
|
||||
# POWERLEVEL9K_AZURE_CLASSES defines the account class. Patterns are tried in order. The
|
||||
# first match wins.
|
||||
#
|
||||
# For example, given these settings:
|
||||
#
|
||||
# typeset -g POWERLEVEL9K_AZURE_CLASSES=(
|
||||
# '*prod*' PROD
|
||||
# '*test*' TEST
|
||||
# '*' OTHER)
|
||||
#
|
||||
# If your current azure account is "company_test", its class is TEST because "company_test"
|
||||
# doesn't match the pattern '*prod*' but does match '*test*'.
|
||||
#
|
||||
# You can define different colors, icons and content expansions for different classes:
|
||||
#
|
||||
# typeset -g POWERLEVEL9K_AZURE_TEST_FOREGROUND=28
|
||||
# typeset -g POWERLEVEL9K_AZURE_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
# typeset -g POWERLEVEL9K_AZURE_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <'
|
||||
typeset -g POWERLEVEL9K_AZURE_CLASSES=(
|
||||
# '*prod*' PROD # These values are examples that are unlikely
|
||||
# '*test*' TEST # to match your needs. Customize them as needed.
|
||||
'*' OTHER)
|
||||
|
||||
# Azure account name color.
|
||||
typeset -g POWERLEVEL9K_AZURE_FOREGROUND=32
|
||||
typeset -g POWERLEVEL9K_AZURE_OTHER_FOREGROUND=32
|
||||
# Custom icon.
|
||||
# typeset -g POWERLEVEL9K_AZURE_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
# typeset -g POWERLEVEL9K_AZURE_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
|
||||
##########[ gcloud: google cloud account and project (https://cloud.google.com/) ]###########
|
||||
# Show gcloud only when the the command you are typing invokes one of these tools.
|
||||
# Show gcloud only when the command you are typing invokes one of these tools.
|
||||
# Tip: Remove the next line to always show gcloud.
|
||||
typeset -g POWERLEVEL9K_GCLOUD_SHOW_ON_COMMAND='gcloud|gcs'
|
||||
typeset -g POWERLEVEL9K_GCLOUD_SHOW_ON_COMMAND='gcloud|gcs|gsutil'
|
||||
# Google cloud color.
|
||||
typeset -g POWERLEVEL9K_GCLOUD_FOREGROUND=32
|
||||
|
||||
@ -1370,7 +1469,7 @@
|
||||
# typeset -g POWERLEVEL9K_GCLOUD_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
|
||||
#[ google_app_cred: google application credentials (https://cloud.google.com/docs/authentication/production) ]#
|
||||
# Show google_app_cred only when the the command you are typing invokes one of these tools.
|
||||
# Show google_app_cred only when the command you are typing invokes one of these tools.
|
||||
# Tip: Remove the next line to always show google_app_cred.
|
||||
typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_SHOW_ON_COMMAND='terraform|pulumi|terragrunt'
|
||||
|
||||
@ -1423,6 +1522,16 @@
|
||||
# Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced by '%%'.
|
||||
typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_CONTENT_EXPANSION='${P9K_GOOGLE_APP_CRED_PROJECT_ID//\%/%%}'
|
||||
|
||||
##############[ toolbox: toolbox name (https://github.com/containers/toolbox) ]###############
|
||||
# Toolbox color.
|
||||
typeset -g POWERLEVEL9K_TOOLBOX_FOREGROUND=178
|
||||
# Don't display the name of the toolbox if it matches fedora-toolbox-*.
|
||||
typeset -g POWERLEVEL9K_TOOLBOX_CONTENT_EXPANSION='${P9K_TOOLBOX_NAME:#fedora-toolbox-*}'
|
||||
# Custom icon.
|
||||
# typeset -g POWERLEVEL9K_TOOLBOX_VISUAL_IDENTIFIER_EXPANSION='⭐'
|
||||
# Custom prefix.
|
||||
# typeset -g POWERLEVEL9K_TOOLBOX_PREFIX='%fin '
|
||||
|
||||
###############################[ public_ip: public IP address ]###############################
|
||||
# Public IP color.
|
||||
typeset -g POWERLEVEL9K_PUBLIC_IP_FOREGROUND=94
|
||||
@ -1437,7 +1546,7 @@
|
||||
typeset -g POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION=
|
||||
# Regular expression for the VPN network interface. Run `ifconfig` or `ip -4 a show` while on VPN
|
||||
# to see the name of the interface.
|
||||
typeset -g POWERLEVEL9K_VPN_IP_INTERFACE='(gpd|wg|(.*tun)|tailscale)[0-9]*'
|
||||
typeset -g POWERLEVEL9K_VPN_IP_INTERFACE='(gpd|wg|(.*tun)|tailscale)[0-9]*|(zt.*)'
|
||||
# If set to true, show one segment per matching network interface. If set to false, show only
|
||||
# one segment corresponding to the first matching network interface.
|
||||
# Tip: If you set it to true, you'll probably want to unset POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION.
|
||||
@ -1482,7 +1591,7 @@
|
||||
# Show battery in yellow when it's discharging.
|
||||
typeset -g POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND=178
|
||||
# Battery pictograms going from low to high level of charge.
|
||||
typeset -g POWERLEVEL9K_BATTERY_STAGES=('%K{232}▁' '%K{232}▂' '%K{232}▃' '%K{232}▄' '%K{232}▅' '%K{232}▆' '%K{232}▇' '%K{232}█')
|
||||
typeset -g POWERLEVEL9K_BATTERY_STAGES='\UF008E\UF007A\UF007B\UF007C\UF007D\UF007E\UF007F\UF0080\UF0081\UF0082\UF0079'
|
||||
# Don't show the remaining time to charge/discharge.
|
||||
typeset -g POWERLEVEL9K_BATTERY_VERBOSE=false
|
||||
|
||||
@ -1526,6 +1635,19 @@
|
||||
# Custom prefix.
|
||||
# typeset -g POWERLEVEL9K_TIME_PREFIX='%fat '
|
||||
|
||||
typeset -g POWERLEVEL9K_HCLOUD_SHOW_ON_COMMAND='hcloud'
|
||||
typeset -g POWERLEVEL9K_HCLOUD_FOREGROUND=214
|
||||
function prompt_hcloud() {
|
||||
hcloud_file="$HOME/.config/hcloud/cli.toml"
|
||||
if [ -f $hcloud_file ] ; then
|
||||
context=$(fgrep active_context $hcloud_file | cut -f 2 -d "=" | tr -d " \"")
|
||||
p10k segment -f 208 -i '' -t "$context"
|
||||
fi
|
||||
}
|
||||
function instant_prompt_hcloud() {
|
||||
prompt_hcloud
|
||||
}
|
||||
|
||||
# Example of a user-defined prompt segment. Function prompt_example will be called on every
|
||||
# prompt if `example` prompt segment is added to POWERLEVEL9K_LEFT_PROMPT_ELEMENTS or
|
||||
# POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS. It displays an icon and orange text greeting the user.
|
||||
@ -1577,7 +1699,7 @@
|
||||
# - verbose: Enable instant prompt and print a warning when detecting console output during
|
||||
# zsh initialization. Choose this if you've never tried instant prompt, haven't
|
||||
# seen the warning, or if you are unsure what this all means.
|
||||
typeset -g POWERLEVEL9K_INSTANT_PROMPT=verbose
|
||||
typeset -g POWERLEVEL9K_INSTANT_PROMPT=quiet
|
||||
|
||||
# Hot reload allows you to change POWERLEVEL9K options after Powerlevel10k has been initialized.
|
||||
# For example, you can type POWERLEVEL9K_BACKGROUND=red and see your prompt turn red. Hot reload
|
||||
|
32
.revive.toml
Normal file
32
.revive.toml
Normal file
@ -0,0 +1,32 @@
|
||||
ignoreGeneratedHeader = false
|
||||
severity = "warning"
|
||||
confidence = 0.8
|
||||
errorCode = 0
|
||||
warningCode = 0
|
||||
|
||||
[rule.blank-imports]
|
||||
[rule.context-as-argument]
|
||||
[rule.context-keys-type]
|
||||
[rule.dot-imports]
|
||||
[rule.empty-block]
|
||||
[rule.error-naming]
|
||||
[rule.error-return]
|
||||
[rule.error-strings]
|
||||
[rule.errorf]
|
||||
[rule.exported]
|
||||
Disabled = true
|
||||
[rule.if-return]
|
||||
[rule.increment-decrement]
|
||||
[rule.indent-error-flow]
|
||||
[rule.package-comments]
|
||||
Disabled = true
|
||||
[rule.range]
|
||||
[rule.receiver-naming]
|
||||
[rule.redefines-builtin-id]
|
||||
[rule.superfluous-else]
|
||||
[rule.time-naming]
|
||||
[rule.unexported-return]
|
||||
[rule.unreachable-code]
|
||||
[rule.unused-parameter]
|
||||
[rule.var-declaration]
|
||||
[rule.var-naming]
|
14
.vimrc
14
.vimrc
@ -1,14 +0,0 @@
|
||||
" Allow saving of files as sudo when I forgot to start vim using sudo.
|
||||
cmap w!! w !sudo tee > /dev/null %
|
||||
|
||||
syntax on
|
||||
|
||||
" Use four spaces for indentation
|
||||
set tabstop=4
|
||||
set shiftwidth=4
|
||||
set expandtab
|
||||
|
||||
" Disable visual mode
|
||||
set mouse-=a
|
||||
|
||||
let mapleader=","
|
136
.zpreztorc
136
.zpreztorc
@ -26,7 +26,6 @@ zstyle ':prezto:*:*' color 'yes'
|
||||
zstyle ':prezto:load' pmodule \
|
||||
'environment' \
|
||||
'editor' \
|
||||
'history' \
|
||||
'directory' \
|
||||
'spectrum' \
|
||||
'utility' \
|
||||
@ -36,160 +35,55 @@ zstyle ':prezto:load' pmodule \
|
||||
'syntax-highlighting' \
|
||||
'python' \
|
||||
'git' \
|
||||
'aws'
|
||||
|
||||
#
|
||||
# Autosuggestions
|
||||
#
|
||||
|
||||
# Set the query found color.
|
||||
# zstyle ':prezto:module:autosuggestions:color' found ''
|
||||
'ssh' \
|
||||
'aws' \
|
||||
'fzf-tab' \
|
||||
'zsh-z'
|
||||
|
||||
#
|
||||
# Editor
|
||||
#
|
||||
|
||||
# Set the key mapping style to 'emacs' or 'vi'.
|
||||
zstyle ':prezto:module:editor' key-bindings 'emacs'
|
||||
|
||||
# Auto convert .... to ../..
|
||||
# zstyle ':prezto:module:editor' dot-expansion 'yes'
|
||||
|
||||
# Allow the zsh prompt context to be shown.
|
||||
#zstyle ':prezto:module:editor' ps-context 'yes'
|
||||
|
||||
#
|
||||
# Git
|
||||
# History
|
||||
#
|
||||
|
||||
# Ignore submodules when they are 'dirty', 'untracked', 'all', or 'none'.
|
||||
# zstyle ':prezto:module:git:status:ignore' submodules 'all'
|
||||
|
||||
#
|
||||
# GNU Utility
|
||||
#
|
||||
|
||||
# Set the command prefix on non-GNU systems.
|
||||
# zstyle ':prezto:module:gnu-utility' prefix 'g'
|
||||
|
||||
#
|
||||
# History Substring Search
|
||||
#
|
||||
|
||||
# Set the query found color.
|
||||
# zstyle ':prezto:module:history-substring-search:color' found ''
|
||||
|
||||
# Set the query not found color.
|
||||
# zstyle ':prezto:module:history-substring-search:color' not-found ''
|
||||
|
||||
# Set the search globbing flags.
|
||||
# zstyle ':prezto:module:history-substring-search' globbing-flags ''
|
||||
|
||||
#
|
||||
# Pacman
|
||||
#
|
||||
|
||||
# Set the Pacman frontend.
|
||||
# zstyle ':prezto:module:pacman' frontend 'yaourt'
|
||||
# zstyle ':prezto:module:history' histfile "~/.zsh_history"
|
||||
# zstyle ':prezto:module:history' histsize "100000"
|
||||
# zstyle ':prezto:module:history' histignorespace "true"
|
||||
|
||||
#
|
||||
# Prompt
|
||||
#
|
||||
|
||||
# Set the prompt theme to load.
|
||||
# Setting it to 'random' loads a random theme.
|
||||
# Auto set to 'off' on dumb terminals.
|
||||
zstyle ':prezto:module:prompt' theme 'powerlevel10k'
|
||||
|
||||
# Set how themes that use promptpwd function display the pwd, can be 'short', 'long', or 'full'
|
||||
# zstyle ':prezto:module:prompt' pwd-length 'short'
|
||||
|
||||
#
|
||||
# Ruby
|
||||
#
|
||||
|
||||
# Auto switch the Ruby version on directory change.
|
||||
# zstyle ':prezto:module:ruby:chruby' auto-switch 'yes'
|
||||
|
||||
#
|
||||
# Python
|
||||
#
|
||||
|
||||
# Auto switch the Python virtualenv on directory change.
|
||||
zstyle ':prezto:module:python:virtualenv' auto-switch 'yes'
|
||||
|
||||
#
|
||||
# Screen
|
||||
#
|
||||
|
||||
# Auto start a session when Zsh is launched in a local terminal.
|
||||
# zstyle ':prezto:module:screen:auto-start' local 'yes'
|
||||
|
||||
# Auto start a session when Zsh is launched in a SSH connection.
|
||||
# zstyle ':prezto:module:screen:auto-start' remote 'yes'
|
||||
|
||||
#
|
||||
# SSH
|
||||
#
|
||||
|
||||
# Set the SSH identities to load into the agent.
|
||||
# zstyle ':prezto:module:ssh:load' identities 'id_rsa' 'id_rsa2' 'id_github'
|
||||
|
||||
#
|
||||
# Syntax Highlighting
|
||||
#
|
||||
|
||||
# Set syntax highlighters.
|
||||
# By default, only the main highlighter is enabled.
|
||||
zstyle ':prezto:module:syntax-highlighting' highlighters \
|
||||
'main' \
|
||||
'brackets' \
|
||||
'pattern' \
|
||||
'line' \
|
||||
'root'
|
||||
#
|
||||
# Set syntax highlighting styles.
|
||||
# zstyle ':prezto:module:syntax-highlighting' styles \
|
||||
# 'builtin' 'bg=blue' \
|
||||
# 'command' 'bg=blue' \
|
||||
# 'function' 'bg=blue'
|
||||
#
|
||||
# Set syntax pattern styles.
|
||||
# zstyle ':prezto:module:syntax-highlighting' pattern \
|
||||
# 'rm*-rf*' 'fg=white,bold,bg=red'
|
||||
|
||||
#
|
||||
# Terminal
|
||||
#
|
||||
|
||||
# Auto set the tab and window titles.
|
||||
zstyle ':prezto:module:terminal' auto-title 'yes'
|
||||
|
||||
# Set the window title format.
|
||||
# zstyle ':prezto:module:terminal:window-title' format '%n@%m: %s'
|
||||
|
||||
# Set the tab title format.
|
||||
zstyle ':prezto:module:terminal:tab-title' format '%m: %s'
|
||||
|
||||
# Set the terminal multiplexer title format.
|
||||
# zstyle ':prezto:module:terminal:multiplexer-title' format '%s'
|
||||
|
||||
#
|
||||
# Tmux
|
||||
#
|
||||
|
||||
# Auto start a session when Zsh is launched in a local terminal.
|
||||
# zstyle ':prezto:module:tmux:auto-start' local 'yes'
|
||||
|
||||
# Auto start a session when Zsh is launched in a SSH connection.
|
||||
# zstyle ':prezto:module:tmux:auto-start' remote 'yes'
|
||||
|
||||
# Integrate with iTerm2.
|
||||
# zstyle ':prezto:module:tmux:iterm' integrate 'yes'
|
||||
|
||||
# Set the default session name:
|
||||
# zstyle ':prezto:module:tmux:session' name 'YOUR DEFAULT SESSION NAME'
|
||||
|
||||
#
|
||||
# AWS
|
||||
#
|
||||
@ -197,3 +91,17 @@ zstyle ':prezto:module:terminal:tab-title' format '%m: %s'
|
||||
zstyle ':prezto:module:aws' output 'table'
|
||||
zstyle ':prezto:module:aws' profile 'default'
|
||||
zstyle ':prezto:module:aws' show_region 'true'
|
||||
zstyle ':prezto:module:aws' sso 'true'
|
||||
|
||||
#
|
||||
# fzf-tab
|
||||
#
|
||||
|
||||
# disable sort when completing `git checkout`
|
||||
zstyle ':completion:*:git-checkout:*' sort false
|
||||
# set descriptions format to enable group support
|
||||
zstyle ':completion:*:descriptions' format '[%d]'
|
||||
# set list-colors to enable filename colorizing
|
||||
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
|
||||
# switch group using `,` and `.`
|
||||
zstyle ':fzf-tab:*' switch-group ',' '.'
|
||||
|
154
.zshrc
154
.zshrc
@ -1,3 +1,5 @@
|
||||
#zmodload zsh/zprof
|
||||
|
||||
# Enable Powerlevel10k instant prompt.uld stay close to the top of ~/.zshrc.
|
||||
# Initialization code that may require console input (password prompts, [y/n]
|
||||
# confirmations, etc.) must go above this block; everything else may go below.
|
||||
@ -12,14 +14,15 @@ fi
|
||||
|
||||
# ZSH customs
|
||||
|
||||
export PATH=$PATH:~/bin
|
||||
export PATH="${PATH}:${HOME}/bin:${HOME}/.krew/bin:${HOME}/go/bin:${HOME}/.local/bin"
|
||||
|
||||
setopt clobber
|
||||
zstyle ':completion:*' rehash true
|
||||
zstyle ':completion:*' special-dirs true
|
||||
|
||||
export HISTFILE=~/.zsh_history
|
||||
export HISTFILESIZE=100000
|
||||
export HISTSIZE=100000
|
||||
# export HISTFILE=~/.zsh_history
|
||||
# export HISTFILESIZE=100000
|
||||
# export HISTSIZE=100000
|
||||
|
||||
unsetopt correct
|
||||
unsetopt correctall
|
||||
@ -28,51 +31,38 @@ PROMPT_EOL_MARK=''
|
||||
|
||||
##### aliases ######
|
||||
|
||||
alias ccat="pygmentize -O style=native -g "
|
||||
alias atuin_delete='atuin search --delete --search-mode=full-text'
|
||||
alias atuin_search='atuin search --search-mode=full-text'
|
||||
alias bat='bat --style=plain --paging=never --theme=Nord'
|
||||
alias batdiff='bat --style=changes --paging=never --theme=Nord'
|
||||
alias bkpwd='rm -rf ${PWD}.bak ; cp -a $PWD{,.bak}'
|
||||
alias chromium-socks='chromium --proxy-server=socks://localhost:3000'
|
||||
alias curlmobile='curl -A "Mozilla/5.0 (Linux; Android 9; AR 4G) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Mobile Safari/537.36"'
|
||||
alias curlr='curl -o /dev/null -w "\n\nCode: \t%{http_code}\n\nDNS: \t%{time_namelookup}\nConnect:\t%{time_connect}\nStartTransfer:\t%{time_starttransfer} (PreTransfer:%{time_pretransfer})\nTotal: \t%{time_total}\n\n"'
|
||||
alias curlh='curl -sD - -o /dev/null'
|
||||
alias duh='du -sch .[!.]* *'
|
||||
alias gb="git checkout \$(git branch -avv | fzf +m | awk '{print \$1}')"
|
||||
alias open='xdg-open'
|
||||
alias yayU='yay -Suy --noconfirm'
|
||||
alias mknamedvenv='mkvirtualenv $(basename $PWD) -r requirements.txt'
|
||||
alias curlr='curl -o /dev/null -w "\n\nCode: \t%{http_code}\n\nDNS: \t%{time_namelookup}\nConnect:\t%{time_connect}\nStartTransfer:\t%{time_starttransfer} (PreTransfer:%{time_pretransfer})\nTotal: \t%{time_total}\n\n"'
|
||||
alias disable-hl='ZSH_HIGHLIGHT_MAXLENGTH=0'
|
||||
alias dkillall='docker rm -f $(docker ps -qa)'
|
||||
alias duh='du -sch .[!.]* *'
|
||||
alias export_sso_creds='eval $(aws-export-credentials --env-export)'
|
||||
alias fdh='fd --hidden --no-ignore --exclude .git'
|
||||
alias gb="git checkout \$(git branch -avv | fzf +m | awk '{print \$1}')"
|
||||
alias icat='kitten icat --align=left'
|
||||
alias idiff='kitten diff'
|
||||
alias issh='kitten ssh'
|
||||
alias k=kubectl
|
||||
alias kconfig='echo "$(kubectl config current-context) ($(kubectl config view --minify --output "jsonpath={..namespace}"))"'
|
||||
alias icat="kitty +kitten icat --align=left"
|
||||
alias idiff="kitty +kitten diff"
|
||||
alias kgy='kubectl get -o yaml'
|
||||
alias kready='kubectl get --raw="/readyz?verbose"'
|
||||
alias ls='ls --group-directories-first --color=auto --hyperlink=auto'
|
||||
alias mknamedvenv='mkvirtualenv $(basename $PWD) -r requirements.txt'
|
||||
alias neovim=nvim
|
||||
alias open='xdg-open'
|
||||
alias rgh="rg --hidden --glob '!.git/' --no-ignore-vcs"
|
||||
alias tf=terraform
|
||||
alias tfa='terraform apply -auto-approve'
|
||||
alias tfp='terraform plan'
|
||||
alias vim=nvim
|
||||
alias yayU='yay -Suy --noconfirm'
|
||||
|
||||
##### tilix #####
|
||||
|
||||
if [ $TILIX_ID ] || [ $VTE_VERSION ] ; then
|
||||
source /etc/profile.d/vte.sh
|
||||
fi
|
||||
|
||||
##### default apps #####
|
||||
|
||||
export EDITOR='vim'
|
||||
export VISUAL='vim'
|
||||
export PAGER='less'
|
||||
export BROWSER='/usr/bin/brave'
|
||||
|
||||
##### venvs ######
|
||||
|
||||
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python
|
||||
export VIRTUALENVWRAPPER_VIRTUALENV=/usr/bin/virtualenv
|
||||
export WORKON_HOME=~/.virtualenvs
|
||||
source /usr/bin/virtualenvwrapper.sh
|
||||
alias workondir='workon $(basename $(pwd))'
|
||||
|
||||
##### fzf #####
|
||||
|
||||
source /usr/share/fzf/key-bindings.zsh
|
||||
source /usr/share/fzf/completion.zsh
|
||||
|
||||
fzf-file-widget-hidden () {
|
||||
fd --type f --hidden -I --follow --exclude .git --exclude .cache | fzf
|
||||
}
|
||||
##### Functions to be used from command line #####
|
||||
|
||||
dexec () {
|
||||
local cid
|
||||
@ -100,8 +90,65 @@ kexec () {
|
||||
[ -n "$cid" ] && kubectl exec -ti "$cid" -- "${cmd[@]}"
|
||||
}
|
||||
|
||||
export FZF_DEFAULT_COMMAND="fd --type f --follow -I"
|
||||
export FZF_DEFAULT_OPTS="-m --reverse --bind 'ctrl-o:execute(xdg-open {})+abort,ctrl-e:execute({})+abort,ctrl-y:execute(echo {} | xclip -selection clipboard -in)+abort'"
|
||||
knodes () {
|
||||
{
|
||||
echo -e "Name\tType\tNodePool\tNodeClass\tCapacity\tRegistered\tInitialized\tCreationTime\tImage"
|
||||
kubectl get node -o json \
|
||||
| jq -r '.items[] | {
|
||||
name:.metadata.name,
|
||||
type:.metadata.labels."beta.kubernetes.io/instance-type",
|
||||
karpenter:.metadata.labels."karpenter.sh/nodepool",
|
||||
nodeclass:.metadata.labels."eks.amazonaws.com/nodeclass",
|
||||
capacity:.metadata.labels."karpenter.sh/capacity-type",
|
||||
registered:.metadata.labels."karpenter.sh/registered",
|
||||
initialized:.metadata.labels."karpenter.sh/initialized",
|
||||
creationTimestamp:.metadata.creationTimestamp,
|
||||
image:.status.nodeInfo.osImage,
|
||||
} | [.name,.type,.karpenter,.nodeclass,.capacity,.registered,.initialized,.creationTimestamp,.image] | @tsv'
|
||||
} | column -t
|
||||
}
|
||||
|
||||
kpretty () {
|
||||
kubectl get -o yaml $* | kubectl neat | bat --language=yaml
|
||||
}
|
||||
|
||||
siteinfo () {
|
||||
local url=$(echo "$1" | sed 's#^https\?://##')
|
||||
local ip="$(dig +short "$url" | tail -1)"
|
||||
|
||||
whois "$ip"
|
||||
echo "Technology detected for $url with IP $ip"
|
||||
httpx-toolkit -silent -json -follow-redirects -ip -tech-detect -target "$url" | jq -rc '.tech'
|
||||
}
|
||||
|
||||
##### default apps #####
|
||||
|
||||
export EDITOR='nvim'
|
||||
export VISUAL='nvim'
|
||||
export PAGER='less'
|
||||
|
||||
##### venvs ######
|
||||
|
||||
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python
|
||||
export VIRTUALENVWRAPPER_VIRTUALENV=/usr/bin/virtualenv
|
||||
export WORKON_HOME=~/.virtualenvs
|
||||
source /usr/bin/virtualenvwrapper_lazy.sh
|
||||
alias workondir='workon $(basename $(pwd))'
|
||||
|
||||
##### fzf #####
|
||||
|
||||
source /usr/share/fzf/key-bindings.zsh
|
||||
source /usr/share/fzf/completion.zsh
|
||||
|
||||
fzf-file-widget-hidden () {
|
||||
fd --type f --hidden --follow --exclude .git --exclude .cache | fzf
|
||||
}
|
||||
|
||||
export FZF_DEFAULT_COMMAND="fd --type file --follow"
|
||||
export FZF_DEFAULT_OPTS="-m --reverse \
|
||||
--color 'info:#00AAFF,prompt:#FFFFFF,pointer:#00AAFF,hl:#1AE51A,hl+:#1AE51A' \
|
||||
--tabstop=4"
|
||||
# --bind 'ctrl-o:execute(xdg-open {})+abort,ctrl-e:execute({})+abort,ctrl-y:execute(echo {} | xclip -selection clipboard -in)+abort'"
|
||||
export FZF_CTRL_T_OPTS="--no-height --preview '[[ \$(file --mime {}) =~ binary ]] && echo {} is a binary file || pygmentize {} 2> /dev/null | head -500'"
|
||||
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
|
||||
|
||||
@ -109,15 +156,16 @@ bindkey '^P' fzf-file-widget
|
||||
zle -N fzf-file-widget-hidden
|
||||
bindkey '^H' fzf-file-widget-hidden
|
||||
|
||||
## SSH agent
|
||||
## direnv
|
||||
|
||||
if [ -z $SSH_AUTH_SOCK ] && [ -S "${XDG_RUNTIME_DIR}/ssh-agent.socket" ]; then
|
||||
export SSH_AUTH_SOCK="${XDG_RUNTIME_DIR}/ssh-agent.socket"
|
||||
fi
|
||||
eval "$(direnv hook zsh)"
|
||||
|
||||
# Autocompletion
|
||||
# Atuin zsh history
|
||||
|
||||
autoload -U compinit && compinit
|
||||
eval "$(atuin init zsh)"
|
||||
|
||||
# aws cli zsh autocomplete
|
||||
source /usr/bin/aws_zsh_completer.sh
|
||||
|
||||
# custom device
|
||||
|
||||
@ -125,3 +173,5 @@ source ~/.zshrc_custom
|
||||
|
||||
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||
|
||||
#zprof
|
||||
|
12
README.md
Normal file
12
README.md
Normal file
@ -0,0 +1,12 @@
|
||||
# Dot Files
|
||||
|
||||
My dotfiles, including:
|
||||
|
||||
- [neovim](.config/nvim/README.md) (needs neovim >= v0.10.1)
|
||||
- kitty
|
||||
- polybar
|
||||
- zsh
|
||||
- prezto conf for my [prezto fork](https://github.com/dcarrillo/prezto)
|
||||
- p10k
|
||||
|
||||
In addition to the dotfiles, some Gnome shell extension confs are included to make polybar and cli great again on Gnome.
|
11
config.sh
11
config.sh
@ -7,11 +7,10 @@ copy_dotfiles()
|
||||
echo "[INFO] Installing dot files..."
|
||||
|
||||
rsync --exclude "dconf/" \
|
||||
--exclude ".vscode/" \
|
||||
--exclude ".git*" \
|
||||
--exclude "$(basename "$0")" \
|
||||
--exclude "LICENSE" \
|
||||
--exclude "README.md" \
|
||||
--exclude "README.md" "$@" \
|
||||
-hlav --no-perms . ~
|
||||
|
||||
echo ""
|
||||
@ -63,11 +62,13 @@ main()
|
||||
dconf_dumper
|
||||
;;
|
||||
--install)
|
||||
copy_dotfiles
|
||||
shift
|
||||
copy_dotfiles "$@"
|
||||
dconf_loader
|
||||
;;
|
||||
--install-dotfiles)
|
||||
copy_dotfiles
|
||||
shift
|
||||
copy_dotfiles "$@"
|
||||
;;
|
||||
--install-dconf)
|
||||
dconf_loader
|
||||
@ -80,5 +81,5 @@ main()
|
||||
cd - > /dev/null
|
||||
}
|
||||
|
||||
main "$1"
|
||||
main "$@"
|
||||
|
||||
|
@ -1,13 +0,0 @@
|
||||
# dconf-path=/org/gnome/shell/extensions/clipboard-indicator/
|
||||
|
||||
[/]
|
||||
clear-history=@as []
|
||||
history-size=150
|
||||
move-item-first=true
|
||||
next-entry=@as []
|
||||
notify-on-copy=false
|
||||
prev-entry=@as []
|
||||
preview-size=50
|
||||
strip-text=false
|
||||
toggle-menu=['<Primary><Alt>h']
|
||||
topbar-preview-size=50
|
12
dconf/gpaste.ini
Normal file
12
dconf/gpaste.ini
Normal file
@ -0,0 +1,12 @@
|
||||
# dconf-path=/org/gnome/GPaste/
|
||||
|
||||
[/]
|
||||
history-name='history'
|
||||
images-support=false
|
||||
max-displayed-history-size=uint64 30
|
||||
max-history-size=uint64 500
|
||||
max-memory-usage=uint64 50
|
||||
save-history=false
|
||||
sync-clipboard-to-primary=''
|
||||
sync-primary-to-clipboard=''
|
||||
track-changes=true
|
@ -4,6 +4,7 @@
|
||||
animation-time-overview=0.40000000000000002
|
||||
enable-active-window=false
|
||||
enable-intellihide=false
|
||||
hot-corner=true
|
||||
mouse-sensitive=false
|
||||
mouse-sensitive-fullscreen-window=false
|
||||
shortcut-delay=0.40000000000000002
|
||||
|
106
dconf/tilix.ini
106
dconf/tilix.ini
@ -1,106 +0,0 @@
|
||||
# dconf-path=/com/gexperts/Tilix/
|
||||
|
||||
[/]
|
||||
enable-wide-handle=true
|
||||
prompt-on-close=true
|
||||
prompt-on-close-process=false
|
||||
prompt-on-delete-profile=true
|
||||
quake-hide-lose-focus=true
|
||||
quake-specific-monitor=0
|
||||
recent-session-files=['/home/dani/temp/Por defecto.json']
|
||||
sidebar-on-right=false
|
||||
terminal-title-show-when-single=false
|
||||
terminal-title-style='none'
|
||||
theme-variant='light'
|
||||
unsafe-paste-alert=false
|
||||
use-overlay-scrollbar=true
|
||||
warn-vte-config-issue=false
|
||||
window-style='disable-csd-hide-toolbar'
|
||||
|
||||
[keybindings]
|
||||
session-add-down='<Primary><Shift>o'
|
||||
session-add-right='<Primary><Shift>e'
|
||||
session-open='disabled'
|
||||
session-synchronize-input='<Primary><Alt>r'
|
||||
terminal-insert-password='<Primary><Alt>p'
|
||||
|
||||
[profiles]
|
||||
list=['2b7c4080-0ddd-46c5-8f23-563fd3ba789d', '61be1191-edef-4f84-b2f5-0dfadcc5ad61']
|
||||
|
||||
[profiles/2b7c4080-0ddd-46c5-8f23-563fd3ba789d]
|
||||
background-color='#073642'
|
||||
background-transparency-percent=0
|
||||
badge-color='#AC7EA8'
|
||||
badge-color-set=true
|
||||
bold-color-set=false
|
||||
cursor-blink-mode='on'
|
||||
cursor-colors-set=false
|
||||
cursor-shape='underline'
|
||||
dim-transparency-percent=0
|
||||
font='Roboto Mono 9'
|
||||
foreground-color='#BABABDBDB6B6'
|
||||
highlight-colors-set=false
|
||||
palette=['#073642', '#CC0000', '#4D9A05', '#C3A000', '#3464A3', '#754F7B', '#05979A', '#D3D6CF', '#000000', '#EF2828', '#89E234', '#FBE84F', '#729ECF', '#AC7EA8', '#34E2E2', '#EDEDEB']
|
||||
scrollback-unlimited=true
|
||||
terminal-bell='none'
|
||||
use-system-font=false
|
||||
use-theme-colors=false
|
||||
visible-name='Por defecto'
|
||||
|
||||
[profiles/61be1191-edef-4f84-b2f5-0dfadcc5ad61]
|
||||
allow-bold=true
|
||||
automatic-switch=@as []
|
||||
background-color='#002B36'
|
||||
background-transparency-percent=25
|
||||
backspace-binding='ascii-delete'
|
||||
badge-color='#ffffff'
|
||||
badge-color-set=false
|
||||
badge-font='Monospace 12'
|
||||
badge-position='northeast'
|
||||
badge-text=''
|
||||
badge-use-system-font=true
|
||||
bold-color='#ffffff'
|
||||
bold-color-set=false
|
||||
bold-is-bright=true
|
||||
cell-height-scale=1.0
|
||||
cell-width-scale=1.0
|
||||
cjk-utf8-ambiguous-width='narrow'
|
||||
cursor-background-color='#000000'
|
||||
cursor-blink-mode='on'
|
||||
cursor-colors-set=false
|
||||
cursor-foreground-color='#ffffff'
|
||||
cursor-shape='underline'
|
||||
custom-command=''
|
||||
custom-hyperlinks=@as []
|
||||
default-size-columns=80
|
||||
default-size-rows=24
|
||||
delete-binding='delete-sequence'
|
||||
dim-transparency-percent=19
|
||||
draw-margin=80
|
||||
encoding='UTF-8'
|
||||
exit-action='close'
|
||||
font='Roboto Mono 9'
|
||||
foreground-color='#FCFCAFAF3E3E'
|
||||
highlight-background-color='#000000'
|
||||
highlight-colors-set=false
|
||||
highlight-foreground-color='#ffffff'
|
||||
login-shell=false
|
||||
notify-silence-enabled=false
|
||||
notify-silence-threshold=0
|
||||
palette=['#073642', '#DC322F', '#4E4E9A9A0606', '#F5F579790000', '#26268B8BD2D2', '#D33682', '#2AA198', '#EEE8D5', '#002B36', '#CB4B16', '#586E75', '#657B83', '#34346565A4A4', '#6C71C4', '#F5F579790000', '#FDF6E3']
|
||||
rewrap-on-resize=true
|
||||
scroll-on-keystroke=true
|
||||
scroll-on-output=false
|
||||
scrollback-lines=8192
|
||||
scrollback-unlimited=true
|
||||
select-by-word-chars='-,./?%&#:_'
|
||||
shortcut='disabled'
|
||||
show-scrollbar=true
|
||||
terminal-bell='none'
|
||||
terminal-title='${id}: ${title}'
|
||||
text-blink-mode='always'
|
||||
triggers=@as []
|
||||
use-custom-command=false
|
||||
use-system-font=false
|
||||
use-theme-colors=false
|
||||
visible-name='orange'
|
@ -1,4 +1,4 @@
|
||||
# dconf-path=/org/gnome/shell/extensions/user-theme/
|
||||
|
||||
[/]
|
||||
name='Adapta-Orange-Nokto-Eta'
|
||||
name=''
|
||||
|
Reference in New Issue
Block a user