mirror of
https://github.com/halfdan/dotfiles.git
synced 2025-09-10 19:56:24 +00:00
Compare commits
47 Commits
703f2cb966
...
main
Author | SHA1 | Date | |
---|---|---|---|
|
b8c42f92c7 | ||
|
c30a121b99 | ||
|
bbece9eade | ||
|
e735b5a167 | ||
|
784a956cf8 | ||
|
d36811ef6f | ||
|
6c380f3a94 | ||
|
49caa17eef | ||
|
5782602a20 | ||
|
814000d6e8 | ||
|
43c2d9f3cd | ||
|
3d575cd47a | ||
|
6085f0ffb8 | ||
|
33031165b5 | ||
|
aa9c3bd488 | ||
|
2b3c42121a | ||
|
949811bf94 | ||
|
f5a7947005 | ||
|
eb17f0ab25 | ||
|
04eac8f2b6 | ||
|
183d7b6a57 | ||
0df2a6918c | |||
d6beadefaa | |||
4e52b17959 | |||
|
71027962d3 | ||
|
b82bec612d | ||
|
1a965cc580 | ||
c676e8e7dd | |||
9019997d59 | |||
cc3e659086 | |||
57f32cb47a | |||
ab6ddb63aa | |||
2f168f25fa | |||
c7aade9b4d | |||
4a7bbc6746 | |||
d5b28f9bea | |||
|
c08658eccc | ||
ca4e37f042 | |||
559bcb4642 | |||
c4861e2774 | |||
38ac37d737 | |||
5dd8ae6223 | |||
31c617f1e4 | |||
1304cd5e1c | |||
6481f0a355 | |||
e9710b7a33 | |||
989102b5ec |
62
.config/alacritty/alacritty.yml
Normal file
62
.config/alacritty/alacritty.yml
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
env:
|
||||||
|
TERM: screen-256color
|
||||||
|
|
||||||
|
# Font
|
||||||
|
font:
|
||||||
|
normal:
|
||||||
|
family: FiraCode Nerd Font Mono
|
||||||
|
style: Regular
|
||||||
|
|
||||||
|
bold:
|
||||||
|
family: FiraCode Nerd Font Mono
|
||||||
|
style: Bold
|
||||||
|
|
||||||
|
italic:
|
||||||
|
family: FiraCode Nerd Font Mono
|
||||||
|
style: Italic
|
||||||
|
|
||||||
|
bold_italic:
|
||||||
|
family: FiraCode Nerd Font Mono
|
||||||
|
style: Bold Italic
|
||||||
|
|
||||||
|
size: 18
|
||||||
|
ligatures: true
|
||||||
|
|
||||||
|
# Gruvbox
|
||||||
|
colors:
|
||||||
|
primary:
|
||||||
|
background: '#282828'
|
||||||
|
foreground: '#ebdbb2'
|
||||||
|
|
||||||
|
# Normal colors
|
||||||
|
normal:
|
||||||
|
black: '#282828'
|
||||||
|
red: '#cc241d'
|
||||||
|
green: '#98971a'
|
||||||
|
yellow: '#d79921'
|
||||||
|
blue: '#458588'
|
||||||
|
magenta: '#b16286'
|
||||||
|
cyan: '#689d6a'
|
||||||
|
white: '#a89984'
|
||||||
|
|
||||||
|
# Bright colors
|
||||||
|
bright:
|
||||||
|
black: '#928374'
|
||||||
|
red: '#fb4934'
|
||||||
|
green: '#b8bb26'
|
||||||
|
yellow: '#fabd2f'
|
||||||
|
blue: '#83a598'
|
||||||
|
magenta: '#d3869b'
|
||||||
|
cyan: '#8ec07c'
|
||||||
|
white: '#ebdbb2'
|
||||||
|
|
||||||
|
window:
|
||||||
|
opacity: 0.95
|
||||||
|
decorations: none
|
||||||
|
|
||||||
|
key_bindings:
|
||||||
|
- { key: Right, mods: Alt, chars: "\x1BF" }
|
||||||
|
- { key: Left, mods: Alt, chars: "\x1BB" }
|
||||||
|
- { key: Key6, mods: Control, chars: "\x1e" }
|
||||||
|
|
||||||
|
alt_send_esc: true
|
22
.config/efm-langserver/config.yaml
Normal file
22
.config/efm-langserver/config.yaml
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
version: 2
|
||||||
|
|
||||||
|
tools:
|
||||||
|
mix_credo: &mix_credo
|
||||||
|
lint-command: "MIX_ENV=test mix credo suggest --format=flycheck --read-from-stdin ${INPUT}"
|
||||||
|
lint-stdin: true
|
||||||
|
lint-formats:
|
||||||
|
- '%f:%l:%c: %t: %m'
|
||||||
|
- '%f:%l: %t: %m'
|
||||||
|
lint-ignore-exit-code: true
|
||||||
|
lint-category-map:
|
||||||
|
R: N
|
||||||
|
D: I
|
||||||
|
F: E
|
||||||
|
W: W
|
||||||
|
root-markers:
|
||||||
|
- mix.lock
|
||||||
|
- mix.exs
|
||||||
|
|
||||||
|
languages:
|
||||||
|
elixir:
|
||||||
|
- <<: *mix_credo
|
35
.config/fish/config.fish
Normal file
35
.config/fish/config.fish
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
if status is-interactive
|
||||||
|
# Commands to run in interactive sessions can go here
|
||||||
|
# atuin init fish | source
|
||||||
|
end
|
||||||
|
function multicd
|
||||||
|
echo cd (string repeat -n (math (string length -- $argv[1]) - 1) ../)
|
||||||
|
end
|
||||||
|
abbr --add dotdot --regex '^\.\.+$' --function multicd
|
||||||
|
abbr -a -- gst 'git status'
|
||||||
|
abbr -a -- gca 'git commit --amend'
|
||||||
|
abbr -a -- gpf 'git push -f'
|
||||||
|
abbr -a -- gp 'git push'
|
||||||
|
abbr -a -- gl 'git pull'
|
||||||
|
abbr -a -- gl 'git rebase develop'
|
||||||
|
abbr -a -- gcd 'git checkout develop'
|
||||||
|
abbr -a -- gc- 'git checkout -'
|
||||||
|
abbr -a -- gc 'git checkout'
|
||||||
|
|
||||||
|
abbr -a -- api 'kubectl get pods -n backend | fzf | awk \'{print $1}\' | xargs -o -I {} kubectl exec -i -t -n backend {} --container api -- /opt/app/api/bin/api remote'
|
||||||
|
|
||||||
|
|
||||||
|
function preview_shell
|
||||||
|
set PR $(gh pr status --json number | jq '.currentBranch.number')
|
||||||
|
|
||||||
|
kubectl get pods -n backend | awk '{print $1}' | grep "$PR-api" | head -1 | xargs -o -I {} kubectl exec -i -t -n backend {} --container api -- /opt/app/api/bin/api remote
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function preview_db
|
||||||
|
gh pr status --json number | jq '.currentBranch.number' | xargs -o -I {} devops db connect frameio-pr-{}-cluster
|
||||||
|
end
|
||||||
|
|
||||||
|
function mix_test_changed
|
||||||
|
git status -s | awk '{print $2}' | grep '_test.exs' | xargs mix test
|
||||||
|
end
|
43
.config/fish/fish_variables
Normal file
43
.config/fish/fish_variables
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
# This file contains fish universal variable definitions.
|
||||||
|
# VERSION: 3.0
|
||||||
|
SETUVAR __fish_initialized:3400
|
||||||
|
SETUVAR fish_color_autosuggestion:969896
|
||||||
|
SETUVAR fish_color_cancel:\x2d\x2dreverse
|
||||||
|
SETUVAR fish_color_command:b294bb
|
||||||
|
SETUVAR fish_color_comment:f0c674
|
||||||
|
SETUVAR fish_color_cwd:green
|
||||||
|
SETUVAR fish_color_cwd_root:red
|
||||||
|
SETUVAR fish_color_end:b294bb
|
||||||
|
SETUVAR fish_color_error:cc6666
|
||||||
|
SETUVAR fish_color_escape:00a6b2
|
||||||
|
SETUVAR fish_color_history_current:\x2d\x2dbold
|
||||||
|
SETUVAR fish_color_host:normal
|
||||||
|
SETUVAR fish_color_host_remote:\x1d
|
||||||
|
SETUVAR fish_color_keyword:\x1d
|
||||||
|
SETUVAR fish_color_match:\x2d\x2dbackground\x3dbrblue
|
||||||
|
SETUVAR fish_color_normal:normal
|
||||||
|
SETUVAR fish_color_operator:00a6b2
|
||||||
|
SETUVAR fish_color_option:\x1d
|
||||||
|
SETUVAR fish_color_param:81a2be
|
||||||
|
SETUVAR fish_color_quote:b5bd68
|
||||||
|
SETUVAR fish_color_redirection:8abeb7
|
||||||
|
SETUVAR fish_color_search_match:bryellow\x1e\x2d\x2dbackground\x3dbrblack
|
||||||
|
SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack
|
||||||
|
SETUVAR fish_color_status:red
|
||||||
|
SETUVAR fish_color_user:brgreen
|
||||||
|
SETUVAR fish_color_valid_path:\x2d\x2dunderline
|
||||||
|
SETUVAR fish_key_bindings:fish_default_key_bindings
|
||||||
|
SETUVAR fish_pager_color_background:\x1d
|
||||||
|
SETUVAR fish_pager_color_completion:normal
|
||||||
|
SETUVAR fish_pager_color_description:B3A06D
|
||||||
|
SETUVAR fish_pager_color_prefix:normal\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
|
||||||
|
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
|
||||||
|
SETUVAR fish_pager_color_secondary_background:\x1d
|
||||||
|
SETUVAR fish_pager_color_secondary_completion:\x1d
|
||||||
|
SETUVAR fish_pager_color_secondary_description:\x1d
|
||||||
|
SETUVAR fish_pager_color_secondary_prefix:\x1d
|
||||||
|
SETUVAR fish_pager_color_selected_background:\x2d\x2dbackground\x3dbrblack
|
||||||
|
SETUVAR fish_pager_color_selected_completion:\x1d
|
||||||
|
SETUVAR fish_pager_color_selected_description:\x1d
|
||||||
|
SETUVAR fish_pager_color_selected_prefix:\x1d
|
||||||
|
SETUVAR fish_user_paths:/opt/homebrew/bin
|
51
.config/fish/functions/fish_prompt.fish
Normal file
51
.config/fish/functions/fish_prompt.fish
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
function fish_prompt --description 'Write out the prompt'
|
||||||
|
set -l laststatus $status
|
||||||
|
|
||||||
|
set -l git_info
|
||||||
|
if set -l git_branch (command git symbolic-ref HEAD 2>/dev/null | string replace refs/heads/ '')
|
||||||
|
set git_branch (set_color -o blue)"$git_branch"
|
||||||
|
set -l git_status
|
||||||
|
if not command git diff-index --quiet HEAD --
|
||||||
|
if set -l count (command git rev-list --count --left-right $upstream...HEAD 2>/dev/null)
|
||||||
|
echo $count | read -l ahead behind
|
||||||
|
if test "$ahead" -gt 0
|
||||||
|
set git_status "$git_status"(set_color red)⬆
|
||||||
|
end
|
||||||
|
if test "$behind" -gt 0
|
||||||
|
set git_status "$git_status"(set_color red)⬇
|
||||||
|
end
|
||||||
|
end
|
||||||
|
for i in (git status --porcelain | string sub -l 2 | sort | uniq)
|
||||||
|
switch $i
|
||||||
|
case "."
|
||||||
|
set git_status "$git_status"(set_color green)✚
|
||||||
|
case " D"
|
||||||
|
set git_status "$git_status"(set_color red)✖
|
||||||
|
case "*M*"
|
||||||
|
set git_status "$git_status"(set_color green)✱
|
||||||
|
case "*R*"
|
||||||
|
set git_status "$git_status"(set_color purple)➜
|
||||||
|
case "*U*"
|
||||||
|
set git_status "$git_status"(set_color brown)═
|
||||||
|
case "??"
|
||||||
|
set git_status "$git_status"(set_color red)≠
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
set git_status (set_color green):
|
||||||
|
end
|
||||||
|
set git_info "(git$git_status$git_branch"(set_color white)")"
|
||||||
|
end
|
||||||
|
|
||||||
|
# Disable PWD shortening by default.
|
||||||
|
set -q fish_prompt_pwd_dir_length
|
||||||
|
or set -lx fish_prompt_pwd_dir_length 0
|
||||||
|
|
||||||
|
set_color -b black
|
||||||
|
printf '%s%s%s%s%s%s%s%s%s%s%s%s%s' (set_color -o white) '❰' (set_color green) $USER (set_color white) '❙' (set_color yellow) (prompt_pwd) (set_color white) $git_info (set_color white) '❱' (set_color white)
|
||||||
|
if test $laststatus -eq 0
|
||||||
|
printf "%s✔%s≻%s " (set_color -o green) (set_color white) (set_color normal)
|
||||||
|
else
|
||||||
|
printf "%s✘%s≻%s " (set_color -o red) (set_color white) (set_color normal)
|
||||||
|
end
|
||||||
|
end
|
46
.config/i3status/config
Normal file
46
.config/i3status/config
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
# i3status configuration file.
|
||||||
|
# see "man i3status" for documentation.
|
||||||
|
|
||||||
|
# It is important that this file is edited as UTF-8.
|
||||||
|
# The following line should contain a sharp s:
|
||||||
|
# ß
|
||||||
|
# If the above line is not correctly displayed, fix your editor first!
|
||||||
|
|
||||||
|
general {
|
||||||
|
colors = true
|
||||||
|
interval = 5
|
||||||
|
}
|
||||||
|
|
||||||
|
order += "disk /"
|
||||||
|
order += "ethernet eth0"
|
||||||
|
order += "memory"
|
||||||
|
order += "load"
|
||||||
|
order += "tztime local"
|
||||||
|
|
||||||
|
ethernet eth0 {
|
||||||
|
format_up = "E: %ip (%speed)"
|
||||||
|
format_down = "E: down"
|
||||||
|
}
|
||||||
|
|
||||||
|
memory {
|
||||||
|
format = "%used"
|
||||||
|
threshold_degraded = "10%"
|
||||||
|
format_degraded = "MEMORY: %free"
|
||||||
|
}
|
||||||
|
|
||||||
|
battery all {
|
||||||
|
format = "%status %percentage %remaining"
|
||||||
|
}
|
||||||
|
|
||||||
|
tztime local {
|
||||||
|
format = "%Y-%m-%d %H:%M:%S"
|
||||||
|
}
|
||||||
|
|
||||||
|
load {
|
||||||
|
format = "%1min"
|
||||||
|
}
|
||||||
|
|
||||||
|
disk "/" {
|
||||||
|
format = "%avail"
|
||||||
|
}
|
||||||
|
|
9
.config/k9s/aliases.yaml
Normal file
9
.config/k9s/aliases.yaml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
aliases:
|
||||||
|
dp: deployments
|
||||||
|
sec: v1/secrets
|
||||||
|
jo: jobs
|
||||||
|
cr: clusterroles
|
||||||
|
crb: clusterrolebindings
|
||||||
|
ro: roles
|
||||||
|
rb: rolebindings
|
||||||
|
np: networkpolicies
|
@@ -0,0 +1,4 @@
|
|||||||
|
benchmarks:
|
||||||
|
defaults:
|
||||||
|
concurrency: 2
|
||||||
|
requests: 200
|
@@ -0,0 +1,13 @@
|
|||||||
|
k9s:
|
||||||
|
cluster: teleport.sharedservices.frame.io
|
||||||
|
namespace:
|
||||||
|
active: backend
|
||||||
|
lockFavorites: false
|
||||||
|
favorites:
|
||||||
|
- backend
|
||||||
|
- default
|
||||||
|
view:
|
||||||
|
active: po
|
||||||
|
featureGates:
|
||||||
|
nodeShell: false
|
||||||
|
portForwardAddress: localhost
|
8
.config/k9s/config.yaml
Normal file
8
.config/k9s/config.yaml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
k9s:
|
||||||
|
liveViewAutoRefresh: false
|
||||||
|
|
||||||
|
ui:
|
||||||
|
headless: false
|
||||||
|
logoless: true
|
||||||
|
crumbsless: true
|
||||||
|
|
49
.config/kitty/keymap.conf
Normal file
49
.config/kitty/keymap.conf
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
# Window
|
||||||
|
map ctrl+\ new_window_with_cwd
|
||||||
|
|
||||||
|
# Tab
|
||||||
|
map ctrl+1 goto_tab 1
|
||||||
|
map ctrl+2 goto_tab 2
|
||||||
|
map ctrl+3 goto_tab 3
|
||||||
|
map ctrl+4 goto_tab 4
|
||||||
|
map ctrl+t new_tab
|
||||||
|
map ctrl+w close_tab
|
||||||
|
|
||||||
|
# Supper power keys
|
||||||
|
map ctrl+; kitten toggle_term.py
|
||||||
|
|
||||||
|
# kitty-scrollback.nvim Kitten alias
|
||||||
|
# action_alias kitty_scrollback_nvim kitten /home/tieu/.local/share/nvim/lazy/kitty-scrollback.nvim/python/kitty_scrollback_nvim.py
|
||||||
|
|
||||||
|
# Browse scrollback buffer in nvim
|
||||||
|
map kitty_mod+h kitty_scrollback_nvim
|
||||||
|
# Browse output of the last shell command in nvim
|
||||||
|
map kitty_mod+g kitty_scrollback_nvim --config ksb_builtin_last_cmd_output
|
||||||
|
# Show clicked command output in nvim
|
||||||
|
# mouse_map ctrl+shift+right press ungrabbed combine : mouse_select_command_output : kitty_scrollback_nvim --config ksb_builtin_last_visited_cmd_output
|
||||||
|
|
||||||
|
# ----------
|
||||||
|
# smart-split
|
||||||
|
map ctrl+j neighboring_window down
|
||||||
|
map ctrl+k neighboring_window up
|
||||||
|
map ctrl+h neighboring_window left
|
||||||
|
map ctrl+l neighboring_window right
|
||||||
|
|
||||||
|
# Unset the mapping to pass the keys to neovim
|
||||||
|
map --when-focus-on var:IS_NVIM ctrl+j
|
||||||
|
map --when-focus-on var:IS_NVIM ctrl+k
|
||||||
|
map --when-focus-on var:IS_NVIM ctrl+h
|
||||||
|
map --when-focus-on var:IS_NVIM ctrl+l
|
||||||
|
|
||||||
|
# the 3 here is the resize amount, adjust as needed
|
||||||
|
map alt+j kitten relative_resize.py down 3
|
||||||
|
map alt+k kitten relative_resize.py up 3
|
||||||
|
map alt+h kitten relative_resize.py left 3
|
||||||
|
map alt+l kitten relative_resize.py right 3
|
||||||
|
|
||||||
|
map --when-focus-on var:IS_NVIM alt+j
|
||||||
|
map --when-focus-on var:IS_NVIM alt+k
|
||||||
|
map --when-focus-on var:IS_NVIM alt+h
|
||||||
|
map --when-focus-on var:IS_NVIM alt+l
|
||||||
|
|
||||||
|
map f1 launch_tab nvim
|
21
.config/kitty/kitty.conf
Normal file
21
.config/kitty/kitty.conf
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
font_size 15
|
||||||
|
window_padding_width 1
|
||||||
|
background_opacity 1
|
||||||
|
|
||||||
|
font_family JetBrainsMono Nerd Font Mono
|
||||||
|
|
||||||
|
tab_bar_edge top
|
||||||
|
tab_bar_style separator
|
||||||
|
tab_separator " "
|
||||||
|
tab_title_template " {index} {title[-20:]} {bell_symbol}"
|
||||||
|
|
||||||
|
remember_window_size yes
|
||||||
|
|
||||||
|
allow_remote_control yes
|
||||||
|
listen_on unix:@mykitty
|
||||||
|
|
||||||
|
#include theme.conf
|
||||||
|
include rose_pine.conf
|
||||||
|
include keymap.conf
|
||||||
|
|
||||||
|
shell_integration enabled
|
53
.config/kitty/rose_pine.conf
Normal file
53
.config/kitty/rose_pine.conf
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
## name: Rosé Pine
|
||||||
|
## author: mvllow
|
||||||
|
## license: MIT
|
||||||
|
## upstream: https://github.com/rose-pine/kitty/blob/main/dist/rose-pine.conf
|
||||||
|
## blurb: All natural pine, faux fur and a bit of soho vibes for the classy minimalist
|
||||||
|
|
||||||
|
foreground #e0def4
|
||||||
|
background #191724
|
||||||
|
selection_foreground #e0def4
|
||||||
|
selection_background #403d52
|
||||||
|
|
||||||
|
cursor #524f67
|
||||||
|
cursor_text_color #e0def4
|
||||||
|
|
||||||
|
url_color #c4a7e7
|
||||||
|
|
||||||
|
active_tab_foreground #e0def4
|
||||||
|
active_tab_background #26233a
|
||||||
|
inactive_tab_foreground #6e6a86
|
||||||
|
inactive_tab_background #191724
|
||||||
|
|
||||||
|
# black
|
||||||
|
color0 #26233a
|
||||||
|
color8 #6e6a86
|
||||||
|
|
||||||
|
# red
|
||||||
|
color1 #eb6f92
|
||||||
|
color9 #eb6f92
|
||||||
|
|
||||||
|
# green
|
||||||
|
color2 #31748f
|
||||||
|
color10 #31748f
|
||||||
|
|
||||||
|
# yellow
|
||||||
|
color3 #f6c177
|
||||||
|
color11 #f6c177
|
||||||
|
|
||||||
|
# blue
|
||||||
|
color4 #9ccfd8
|
||||||
|
color12 #9ccfd8
|
||||||
|
|
||||||
|
# magenta
|
||||||
|
color5 #c4a7e7
|
||||||
|
color13 #c4a7e7
|
||||||
|
|
||||||
|
# cyan
|
||||||
|
color6 #ebbcba
|
||||||
|
color14 #ebbcba
|
||||||
|
|
||||||
|
# white
|
||||||
|
color7 #e0def4
|
||||||
|
color15 #e0def4
|
||||||
|
|
49
.config/kitty/theme.conf
Normal file
49
.config/kitty/theme.conf
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
# gruvbox dark by morhetz, https://github.com/morhetz/gruvbox
|
||||||
|
# This work is licensed under the terms of the MIT license.
|
||||||
|
# For a copy, see https://opensource.org/licenses/MIT.
|
||||||
|
|
||||||
|
background #282828
|
||||||
|
foreground #ebdbb2
|
||||||
|
|
||||||
|
cursor #928374
|
||||||
|
|
||||||
|
selection_foreground #928374
|
||||||
|
selection_background #3c3836
|
||||||
|
|
||||||
|
color0 #282828
|
||||||
|
color8 #928374
|
||||||
|
|
||||||
|
# red
|
||||||
|
color1 #cc241d
|
||||||
|
# light red
|
||||||
|
color9 #fb4934
|
||||||
|
|
||||||
|
# green
|
||||||
|
color2 #98971a
|
||||||
|
# light green
|
||||||
|
color10 #b8bb26
|
||||||
|
|
||||||
|
# yellow
|
||||||
|
color3 #d79921
|
||||||
|
# light yellow
|
||||||
|
color11 #fabd2d
|
||||||
|
|
||||||
|
# blue
|
||||||
|
color4 #458588
|
||||||
|
# light blue
|
||||||
|
color12 #83a598
|
||||||
|
|
||||||
|
# magenta
|
||||||
|
color5 #b16286
|
||||||
|
# light magenta
|
||||||
|
color13 #d3869b
|
||||||
|
|
||||||
|
# cyan
|
||||||
|
color6 #689d6a
|
||||||
|
# lighy cyan
|
||||||
|
color14 #8ec07c
|
||||||
|
|
||||||
|
# light gray
|
||||||
|
color7 #a89984
|
||||||
|
# dark gray
|
||||||
|
color15 #928374
|
33
.config/kitty/toggle_term.py
Normal file
33
.config/kitty/toggle_term.py
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
from kittens.tui.handler import result_handler
|
||||||
|
|
||||||
|
|
||||||
|
def main(args):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
def toggle_term(boss):
|
||||||
|
tab = boss.active_tab
|
||||||
|
|
||||||
|
all_another_wins = tab.all_window_ids_except_active_window
|
||||||
|
have_only_one = len(all_another_wins) == 0
|
||||||
|
|
||||||
|
if have_only_one:
|
||||||
|
boss.launch('--cwd=current', '--location=hsplit')
|
||||||
|
tab.neighboring_window("bottom")
|
||||||
|
else:
|
||||||
|
if tab.current_layout.name == 'stack':
|
||||||
|
tab.last_used_layout()
|
||||||
|
tab.neighboring_window("bottom")
|
||||||
|
else:
|
||||||
|
tab.neighboring_window("top")
|
||||||
|
tab.goto_layout('stack')
|
||||||
|
|
||||||
|
|
||||||
|
@result_handler(no_ui=True)
|
||||||
|
def handle_result(args, result, target_window_id, boss):
|
||||||
|
window = boss.window_id_map.get(target_window_id)
|
||||||
|
|
||||||
|
if window is None:
|
||||||
|
return
|
||||||
|
|
||||||
|
toggle_term(boss)
|
0
.config/nvim/after/plugin/init.lua
Normal file
0
.config/nvim/after/plugin/init.lua
Normal file
139
.config/nvim/after/plugin/keymappings.lua
Normal file
139
.config/nvim/after/plugin/keymappings.lua
Normal file
@@ -0,0 +1,139 @@
|
|||||||
|
|
||||||
|
local Remap = require("halfdan.keymap")
|
||||||
|
local nnoremap = Remap.nnoremap
|
||||||
|
local vnoremap = Remap.vnoremap
|
||||||
|
local inoremap = Remap.inoremap
|
||||||
|
local tnoremap = Remap.tnoremap
|
||||||
|
local xnoremap = Remap.xnoremap
|
||||||
|
local nmap = Remap.nmap
|
||||||
|
|
||||||
|
-- Yank until end of line
|
||||||
|
nnoremap('Y', 'yg$')
|
||||||
|
-- Next item, but center line
|
||||||
|
nnoremap('n', 'nzzzv')
|
||||||
|
nnoremap('N', 'Nzzzv')
|
||||||
|
-- Join line but keep cursor intact
|
||||||
|
nnoremap('J', 'mzJ`z')
|
||||||
|
|
||||||
|
-- Move selected line / block of text in visual mode
|
||||||
|
xnoremap('J', ':move \'>+1<CR>gv-gv')
|
||||||
|
xnoremap('K', ':move \'<-2<CR>gv-gv')
|
||||||
|
|
||||||
|
nnoremap('Q', '<Nop>')
|
||||||
|
|
||||||
|
-- better indenting
|
||||||
|
vnoremap('<', '<gv')
|
||||||
|
vnoremap('>', '>gv')
|
||||||
|
|
||||||
|
-- improved keyboard support for navigation (especially terminal)
|
||||||
|
nnoremap('<leader>h', '<C-w>h')
|
||||||
|
nnoremap('<leader>j', '<C-w>j')
|
||||||
|
nnoremap('<leader>k', '<C-w>k')
|
||||||
|
nnoremap('<leader>l', '<C-w>l')
|
||||||
|
nnoremap('<A-h>', '<C-w>h')
|
||||||
|
nnoremap('<A-j>', '<C-w>j')
|
||||||
|
nnoremap('<A-k>', '<C-w>k')
|
||||||
|
nnoremap('<A-l>', '<C-w>l')
|
||||||
|
|
||||||
|
-- Change 2 split windows from vert to horiz or horiz to vert
|
||||||
|
nnoremap('<leader>th', '<C-w>t<C-w>H')
|
||||||
|
nnoremap('<leader>tk', '<C-w>t<C-w>K')
|
||||||
|
|
||||||
|
nnoremap("<leader>\\", ":vsplit<CR>")
|
||||||
|
nnoremap("<leader>/", ":split<CR>")
|
||||||
|
|
||||||
|
-- Keybindings below this are neovim cli only
|
||||||
|
if vim.g.vscode then
|
||||||
|
-- Toggle Comment
|
||||||
|
vim.keymap.set('x', 'gc', '<Plug>VSCodeCommentary', {})
|
||||||
|
vim.keymap.set('n', 'gc', '<Plug>VSCodeCommentary', {})
|
||||||
|
vim.keymap.set('o', 'gc', '<Plug>VSCodeCommentary', {})
|
||||||
|
vim.keymap.set('n', 'gcc', '<Plug>VSCodeCommentaryLine', {})
|
||||||
|
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
tnoremap('<ESC>', '<C-\\><C-n>')
|
||||||
|
|
||||||
|
nnoremap('<C-B>', ':Neotree right toggle<CR>')
|
||||||
|
-- resize with arrows
|
||||||
|
nnoremap('<C-Up>', ':resize -2<CR>')
|
||||||
|
nnoremap('<C-Down>', ':resize +2<CR>')
|
||||||
|
nnoremap('<C-Left>', ':vertical resize -2<CR>')
|
||||||
|
nnoremap('<C-Right>', ':vertical resize +2<CR>')
|
||||||
|
|
||||||
|
-- Make adjusting split sizes a bit more friendly
|
||||||
|
vim.cmd([[
|
||||||
|
noremap <silent> <C-Left> :vertical resize +3<CR>
|
||||||
|
noremap <silent> <C-Right> :vertical resize -3<CR>
|
||||||
|
noremap <silent> <C-Up> :resize +3<CR>
|
||||||
|
noremap <silent> <C-Down> :resize -3<CR>
|
||||||
|
]])
|
||||||
|
|
||||||
|
-- Tab switch buffer
|
||||||
|
nnoremap('<TAB>', ':bnext<CR>')
|
||||||
|
nnoremap('<S-TAB>', ':bprevious<CR>')
|
||||||
|
|
||||||
|
-- Quickfix list
|
||||||
|
nnoremap('[q', ':cprev<CR>')
|
||||||
|
nnoremap(']q', ':cnext<CR>')
|
||||||
|
|
||||||
|
-- no arrow keys
|
||||||
|
nnoremap("<up>", "<nop>")
|
||||||
|
nnoremap("<down>", "<nop>")
|
||||||
|
nnoremap("<left>", "<nop>")
|
||||||
|
nnoremap("<right>", "<nop>")
|
||||||
|
|
||||||
|
inoremap("<up>", "<nop>")
|
||||||
|
inoremap("<down>", "<nop>")
|
||||||
|
inoremap("<left>", "<nop>")
|
||||||
|
inoremap("<right>", "<nop>")
|
||||||
|
|
||||||
|
-- Tagbar
|
||||||
|
nnoremap('<Leader>hl', ':nohl<CR>')
|
||||||
|
|
||||||
|
-- Vim Test
|
||||||
|
nnoremap('<leader>tt', ':TestNearest<CR>')
|
||||||
|
nnoremap('<leader>tT', ':TestFile<CR>')
|
||||||
|
nnoremap('<leader>ta', ':TestSuite<CR>')
|
||||||
|
nnoremap('<leader>tl', ':TestLast<CR>')
|
||||||
|
nnoremap('<leader>tg', ':TestVisit<CR>')
|
||||||
|
|
||||||
|
-- Vim Projectionist
|
||||||
|
nnoremap('<leader>a', ':A<CR>')
|
||||||
|
|
||||||
|
-- Reload init.lua
|
||||||
|
nnoremap('<leader>sv', ':source $MYVIMRC<CR>')
|
||||||
|
|
||||||
|
local builtin = require("telescope.builtin")
|
||||||
|
|
||||||
|
nnoremap("<leader>gg", function()
|
||||||
|
-- builtin.live_grep()
|
||||||
|
require "telescope".extensions.egrepify.egrepify { sorting_strategy = 'ascending' }
|
||||||
|
end)
|
||||||
|
|
||||||
|
nnoremap("<C-p>", function()
|
||||||
|
builtin.find_files()
|
||||||
|
end)
|
||||||
|
|
||||||
|
nnoremap("<Leader>ff", function()
|
||||||
|
require('telescope').extensions.smart_open.smart_open({cwd_only = true})
|
||||||
|
end)
|
||||||
|
|
||||||
|
nnoremap("<Leader>fh", function()
|
||||||
|
builtin.find_files{cwd=vim.fn.expand('%:p:h')}
|
||||||
|
end)
|
||||||
|
|
||||||
|
nnoremap("<leader>gw", function()
|
||||||
|
builtin.grep_string { search = vim.fn.expand("<cword>") }
|
||||||
|
end)
|
||||||
|
|
||||||
|
nnoremap("<leader>fb", function()
|
||||||
|
builtin.buffers()
|
||||||
|
end)
|
||||||
|
|
||||||
|
nnoremap("<leader>gc", function()
|
||||||
|
builtin.git_branches()
|
||||||
|
end)
|
||||||
|
|
||||||
|
|
184
.config/nvim/after/plugin/lsp.lua
Normal file
184
.config/nvim/after/plugin/lsp.lua
Normal file
@@ -0,0 +1,184 @@
|
|||||||
|
if vim.g.vscode then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local Remap = require("halfdan.keymap")
|
||||||
|
local nnoremap = Remap.nnoremap
|
||||||
|
local inoremap = Remap.inoremap
|
||||||
|
|
||||||
|
vim.diagnostic.config({
|
||||||
|
signs = {
|
||||||
|
text = {
|
||||||
|
[vim.diagnostic.severity.ERROR] = "",
|
||||||
|
[vim.diagnostic.severity.WARN] = "",
|
||||||
|
[vim.diagnostic.severity.INFO] = "",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
-- Set Default Prefix.
|
||||||
|
-- Note: You can set a prefix per lsp server in the lv-globals.lua file
|
||||||
|
vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(
|
||||||
|
vim.lsp.diagnostic.on_publish_diagnostics, {
|
||||||
|
signs = true,
|
||||||
|
underline = true,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
-- Setup for nvim-notify
|
||||||
|
vim.lsp.set_log_level(2)
|
||||||
|
|
||||||
|
local convert_lsp_log_level_to_neovim_log_level = function(lsp_log_level)
|
||||||
|
if lsp_log_level == 1 then
|
||||||
|
return 4
|
||||||
|
elseif lsp_log_level == 2 then
|
||||||
|
return 3
|
||||||
|
elseif lsp_log_level == 3 then
|
||||||
|
return 2
|
||||||
|
elseif lsp_log_level == 4 then
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local levels = {
|
||||||
|
"ERROR",
|
||||||
|
"WARN",
|
||||||
|
"INFO",
|
||||||
|
"DEBUG",
|
||||||
|
[0] = "TRACE",
|
||||||
|
}
|
||||||
|
---@diagnostic disable-next-line: unused-vararg
|
||||||
|
vim.lsp.handlers["window/showMessage"] = function(_, result, ...)
|
||||||
|
if require("vim.lsp.log").should_log(convert_lsp_log_level_to_neovim_log_level(result.type)) then
|
||||||
|
vim.notify(result.message, levels[result.type])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- symbols for autocomplete
|
||||||
|
vim.lsp.protocol.CompletionItemKind = {
|
||||||
|
" (Text) ",
|
||||||
|
" (Method)",
|
||||||
|
" (Function)",
|
||||||
|
" (Constructor)",
|
||||||
|
" ﴲ (Field)",
|
||||||
|
"[] (Variable)",
|
||||||
|
" (Class)",
|
||||||
|
" ﰮ (Interface)",
|
||||||
|
" (Module)",
|
||||||
|
" 襁 (Property)",
|
||||||
|
" (Unit)",
|
||||||
|
" (Value)",
|
||||||
|
" 練 (Enum)",
|
||||||
|
" (Keyword)",
|
||||||
|
" (Snippet)",
|
||||||
|
" (Color)",
|
||||||
|
" (File)",
|
||||||
|
" (Reference)",
|
||||||
|
" (Folder)",
|
||||||
|
" (EnumMember)",
|
||||||
|
" ﲀ (Constant)",
|
||||||
|
" ﳤ (Struct)",
|
||||||
|
" (Event)",
|
||||||
|
" (Operator)",
|
||||||
|
" (TypeParameter)"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
-- Diagnostic keymaps
|
||||||
|
-- Show Lspsaga line diagnostics
|
||||||
|
vim.keymap.set('n', '<leader>e', '<cmd>Lspsaga show_line_diagnostics<CR>', { noremap = true, silent = true })
|
||||||
|
|
||||||
|
-- Send diagnostics to location list
|
||||||
|
vim.keymap.set('n', '<leader>q', function()
|
||||||
|
vim.diagnostic.setloclist()
|
||||||
|
end, { noremap = true, silent = true })
|
||||||
|
|
||||||
|
-- Global mappings.
|
||||||
|
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
|
||||||
|
vim.keymap.set('n', '<space>e', vim.diagnostic.open_float)
|
||||||
|
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev)
|
||||||
|
vim.keymap.set('n', ']d', vim.diagnostic.goto_next)
|
||||||
|
vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist)
|
||||||
|
|
||||||
|
-- Use LspAttach autocommand to only map the following keys
|
||||||
|
-- after the language server attaches to the current buffer
|
||||||
|
vim.api.nvim_create_autocmd('LspAttach', {
|
||||||
|
group = vim.api.nvim_create_augroup('UserLspConfig', {}),
|
||||||
|
callback = function(ev)
|
||||||
|
-- Enable completion triggered by <c-x><c-o>
|
||||||
|
vim.bo[ev.buf].omnifunc = 'v:lua.vim.lsp.omnifunc'
|
||||||
|
|
||||||
|
-- Buffer local mappings.
|
||||||
|
-- See `:help vim.lsp.*` for documentation on any of the below functions
|
||||||
|
local opts = { buffer = ev.buf }
|
||||||
|
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts)
|
||||||
|
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts)
|
||||||
|
vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts)
|
||||||
|
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, opts)
|
||||||
|
vim.keymap.set('n', '<C-k>', vim.lsp.buf.signature_help, opts)
|
||||||
|
vim.keymap.set('n', '<space>wa', vim.lsp.buf.add_workspace_folder, opts)
|
||||||
|
vim.keymap.set('n', '<space>wr', vim.lsp.buf.remove_workspace_folder, opts)
|
||||||
|
vim.keymap.set('n', '<space>wl', function()
|
||||||
|
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
||||||
|
end, opts)
|
||||||
|
vim.keymap.set('n', '<space>D', vim.lsp.buf.type_definition, opts)
|
||||||
|
vim.keymap.set('n', '<space>rn', vim.lsp.buf.rename, opts)
|
||||||
|
vim.keymap.set({ 'n', 'v' }, '<space>ca', vim.lsp.buf.code_action, opts)
|
||||||
|
vim.keymap.set('n', 'gr', vim.lsp.buf.references, opts)
|
||||||
|
vim.keymap.set('n', '<space>f', function()
|
||||||
|
vim.lsp.buf.format { async = true }
|
||||||
|
end, opts)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.lsp.config("lua_ls", {
|
||||||
|
settings = {
|
||||||
|
Lua = {
|
||||||
|
runtime = {
|
||||||
|
-- Tell the language server which version of Lua you're using
|
||||||
|
version = "LuaJIT",
|
||||||
|
},
|
||||||
|
diagnostics = {
|
||||||
|
-- Get the language server to recognize the `vim` global
|
||||||
|
globals = { "vim" },
|
||||||
|
},
|
||||||
|
workspace = {
|
||||||
|
-- Make the server aware of Neovim runtime files
|
||||||
|
library = vim.api.nvim_get_runtime_file("", true),
|
||||||
|
},
|
||||||
|
telemetry = {
|
||||||
|
-- Do not send telemetry data containing a randomized but unique identifier
|
||||||
|
enable = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Enable it
|
||||||
|
vim.lsp.enable("lua_ls")
|
||||||
|
|
||||||
|
vim.lsp.config('gopls', {
|
||||||
|
cmd = { "gopls" },
|
||||||
|
filetypes = { "go", "gomod", "gowork", "gotmpl" },
|
||||||
|
root_markers = { "go.work", "go.mod", ".git" },
|
||||||
|
settings = {
|
||||||
|
gopls = {
|
||||||
|
analyses = {
|
||||||
|
unusedparams = true,
|
||||||
|
shadow = true,
|
||||||
|
},
|
||||||
|
staticcheck = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.lsp.enable 'gopls'
|
||||||
|
|
||||||
|
vim.lsp.config('expert', {
|
||||||
|
cmd = { 'expert' },
|
||||||
|
root_markers = { 'mix.exs', '.git' },
|
||||||
|
filetypes = { 'elixir', 'eelixir', 'heex' },
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.lsp.enable 'expert'
|
46
.config/nvim/after/plugin/neotest.lua
Normal file
46
.config/nvim/after/plugin/neotest.lua
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
if vim.g.vscode then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local nnoremap = require('halfdan.keymap').nnoremap
|
||||||
|
local neotest = require('neotest')
|
||||||
|
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)
|
||||||
|
|
||||||
|
neotest.setup({
|
||||||
|
log_level = vim.log.levels.DEBUG,
|
||||||
|
adapters = {
|
||||||
|
require("neotest-elixir")({
|
||||||
|
args = { "--trace" },
|
||||||
|
write_delay = 0,
|
||||||
|
}),
|
||||||
|
require("neotest-rust"),
|
||||||
|
-- require("neotest-vim-test")({ allow_file_types = { "haskell"} }),
|
||||||
|
require("neotest-golang")
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
nnoremap("<leader>nt", function()
|
||||||
|
neotest.run.run()
|
||||||
|
end)
|
||||||
|
|
||||||
|
nnoremap("<leader>nf", function()
|
||||||
|
neotest.run.run(vim.fn.expand("%"))
|
||||||
|
end)
|
||||||
|
|
||||||
|
nnoremap("<leader>nd", function()
|
||||||
|
neotest.run.run({ strategy = "dap" })
|
||||||
|
end)
|
||||||
|
|
||||||
|
nnoremap("<leader>ns", function()
|
||||||
|
neotest.summary.toggle()
|
||||||
|
end)
|
9
.config/nvim/after/plugin/notify.lua
Normal file
9
.config/nvim/after/plugin/notify.lua
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
if vim.g.vscode then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
require('notify').setup({
|
||||||
|
background_colour = "#000000",
|
||||||
|
max_width = 120,
|
||||||
|
max_height = 10,
|
||||||
|
})
|
12
.config/nvim/after/plugin/sneak.lua
Normal file
12
.config/nvim/after/plugin/sneak.lua
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
if vim.g.vscode then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Sneak
|
||||||
|
vim.g["sneak#label"] = 1
|
||||||
|
vim.g["sneak#prompt"] = "🔎"
|
||||||
|
vim.g["sneak#s_next"] = 1
|
||||||
|
|
||||||
|
-- Vim-Test
|
||||||
|
vim.g["test#strategy"] = "neovim"
|
||||||
|
vim.g["test#neovim#term_position"] = "vert rightbelow 80"
|
48
.config/nvim/after/plugin/treesitter-textobjects.lua
Normal file
48
.config/nvim/after/plugin/treesitter-textobjects.lua
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
if vim.g.vscode then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
require'nvim-treesitter.configs'.setup {
|
||||||
|
textobjects = {
|
||||||
|
select = {
|
||||||
|
enable = true,
|
||||||
|
|
||||||
|
-- Automatically jump forward to textobj, similar to targets.vim
|
||||||
|
lookahead = true,
|
||||||
|
|
||||||
|
keymaps = {
|
||||||
|
-- You can use the capture groups defined in textobjects.scm
|
||||||
|
["af"] = "@function.outer",
|
||||||
|
["if"] = "@function.inner",
|
||||||
|
["ac"] = "@class.outer",
|
||||||
|
["ic"] = "@class.inner",
|
||||||
|
},
|
||||||
|
-- You can choose the select mode (default is charwise 'v')
|
||||||
|
selection_modes = {
|
||||||
|
['@parameter.outer'] = 'v', -- charwise
|
||||||
|
['@function.outer'] = 'V', -- linewise
|
||||||
|
['@class.outer'] = '<c-v>', -- blockwise
|
||||||
|
},
|
||||||
|
},
|
||||||
|
move = {
|
||||||
|
enable = true,
|
||||||
|
set_jumps = true, -- whether to set jumps in the jumplist
|
||||||
|
goto_next_start = {
|
||||||
|
["]m"] = "@function.outer",
|
||||||
|
["]]"] = "@class.outer",
|
||||||
|
},
|
||||||
|
goto_next_end = {
|
||||||
|
["]M"] = "@function.outer",
|
||||||
|
["]["] = "@class.outer",
|
||||||
|
},
|
||||||
|
goto_previous_start = {
|
||||||
|
["[m"] = "@function.outer",
|
||||||
|
["[["] = "@class.outer",
|
||||||
|
},
|
||||||
|
goto_previous_end = {
|
||||||
|
["[M"] = "@function.outer",
|
||||||
|
["[]"] = "@class.outer",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
@@ -1,28 +1 @@
|
|||||||
require('globals')
|
require('halfdan')
|
||||||
require('keymappings')
|
|
||||||
require('settings')
|
|
||||||
require('plugins')
|
|
||||||
|
|
||||||
require('colorscheme')
|
|
||||||
|
|
||||||
require('lsp')
|
|
||||||
require('lsp.docker-ls')
|
|
||||||
require('lsp.python-ls')
|
|
||||||
require('lsp.julia-ls')
|
|
||||||
require('lsp.json-ls')
|
|
||||||
require('lsp.elixir-ls')
|
|
||||||
require('lsp.go-ls')
|
|
||||||
require('lsp.terraform-ls')
|
|
||||||
|
|
||||||
require('plugins.telescope')
|
|
||||||
require('plugins.telescope-project')
|
|
||||||
require('plugins.treesitter')
|
|
||||||
require('plugins.cmp')
|
|
||||||
require('plugins.which-key')
|
|
||||||
require('plugins.lualine')
|
|
||||||
require('plugins.tagbar')
|
|
||||||
require('plugins.sneak')
|
|
||||||
|
|
||||||
require('themes.nord')
|
|
||||||
|
|
||||||
require('go').setup()
|
|
||||||
|
68
.config/nvim/lazy-lock.json
Normal file
68
.config/nvim/lazy-lock.json
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
{
|
||||||
|
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
||||||
|
"FTerm.nvim": { "branch": "master", "commit": "d1320892cc2ebab472935242d9d992a2c9570180" },
|
||||||
|
"FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" },
|
||||||
|
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
|
||||||
|
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
|
||||||
|
"cmp-cmdline": { "branch": "main", "commit": "d126061b624e0af6c3a556428712dd4d4194ec6d" },
|
||||||
|
"cmp-git": { "branch": "main", "commit": "b24309c386c9666c549a1abaedd4956541676d06" },
|
||||||
|
"cmp-nvim-lsp": { "branch": "main", "commit": "bd5a7d6db125d4654b50eeae9f5217f24bb22fd3" },
|
||||||
|
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
|
||||||
|
"cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" },
|
||||||
|
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
|
||||||
|
"editorconfig-vim": { "branch": "master", "commit": "6a58b7c11f79c0e1d0f20533b3f42f2a11490cf8" },
|
||||||
|
"fzf-lua": { "branch": "main", "commit": "c2d9b8693792c6dd810162d9e8c90782cec19404" },
|
||||||
|
"git-blame.nvim": { "branch": "master", "commit": "9874ec1ec8bc53beb33b7cd82c092b85271a578b" },
|
||||||
|
"gruvbox-baby": { "branch": "main", "commit": "bd52e62d8134647090108189e69c8b3cd18bdbbf" },
|
||||||
|
"hardtime.nvim": { "branch": "main", "commit": "6d7664d5bdfaea44c5f50b29f5239fab7b00c273" },
|
||||||
|
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||||
|
"lsp-status.nvim": { "branch": "master", "commit": "54f48eb5017632d81d0fd40112065f1d062d0629" },
|
||||||
|
"lspkind.nvim": { "branch": "master", "commit": "d79a1c3299ad0ef94e255d045bed9fa26025dab6" },
|
||||||
|
"lspsaga.nvim": { "branch": "main", "commit": "8efe00d6aed9db6449969f889170f1a7e43101a1" },
|
||||||
|
"lua-utils.nvim": { "branch": "main", "commit": "e565749421f4bbb5d2e85e37c3cef9d56553d8bd" },
|
||||||
|
"lualine.nvim": { "branch": "master", "commit": "b8c23159c0161f4b89196f74ee3a6d02cdc3a955" },
|
||||||
|
"neo-tree.nvim": { "branch": "v3.x", "commit": "f1deac7ecec88c28a250d890ba7bb35843e69cbd" },
|
||||||
|
"neogit": { "branch": "master", "commit": "6617978288d58eb121754b5dd890e893d9a7e8d6" },
|
||||||
|
"neorg": { "branch": "main", "commit": "e206c9642f4a115cd836e76c98ef785623d335bc" },
|
||||||
|
"neorg-telescope": { "branch": "main", "commit": "7fb6ca6a632c3c095601d379a664c0c1f802dc6c" },
|
||||||
|
"neoscroll.nvim": { "branch": "master", "commit": "f957373912e88579e26fdaea4735450ff2ef5c9c" },
|
||||||
|
"neotest": { "branch": "master", "commit": "2cf3544fb55cdd428a9a1b7154aea9c9823426e8" },
|
||||||
|
"neotest-elixir": { "branch": "master", "commit": "a242aebeaa6997c1c149138ff77f6cacbe33b6fc" },
|
||||||
|
"neotest-golang": { "branch": "main", "commit": "0ada81e50429a071cc7d349301762e4ee04dcb2a" },
|
||||||
|
"neotest-rust": { "branch": "main", "commit": "2c9941d4a358839918fac21d20fc8fef0e1ad05f" },
|
||||||
|
"neotest-vim-test": { "branch": "master", "commit": "75c4228882ae4883b11bfce9b8383e637eb44192" },
|
||||||
|
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
||||||
|
"nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" },
|
||||||
|
"nvim-dap": { "branch": "master", "commit": "7523676a4be17644587aa47e4d42f6f7646d4727" },
|
||||||
|
"nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" },
|
||||||
|
"nvim-dap-virtual-text": { "branch": "master", "commit": "fbdb48c2ed45f4a8293d0d483f7730d24467ccb6" },
|
||||||
|
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
|
||||||
|
"nvim-notify": { "branch": "master", "commit": "8701bece920b38ea289b457f902e2ad184131a5d" },
|
||||||
|
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||||
|
"nvim-treesitter-textobjects": { "branch": "master", "commit": "71385f191ec06ffc60e80e6b0c9a9d5daed4824c" },
|
||||||
|
"nvim-web-devicons": { "branch": "master", "commit": "6e51ca170563330e063720449c21f43e27ca0bc1" },
|
||||||
|
"outline.nvim": { "branch": "main", "commit": "6b62f73a6bf317531d15a7ae1b724e85485d8148" },
|
||||||
|
"pathlib.nvim": { "branch": "main", "commit": "57e5598af6fe253761c1b48e0b59b7cd6699e2c1" },
|
||||||
|
"playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" },
|
||||||
|
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||||
|
"popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" },
|
||||||
|
"rose-pine": { "branch": "main", "commit": "72a04c4065345b51b56aed4859ea1d884f734097" },
|
||||||
|
"rust.vim": { "branch": "master", "commit": "889b9a7515db477f4cb6808bef1769e53493c578" },
|
||||||
|
"rustaceanvim": { "branch": "master", "commit": "12504405821c05874d2d1f6b5ec919f9808e2c99" },
|
||||||
|
"smart-open.nvim": { "branch": "0.2.x", "commit": "560d8f16e17977c8303db6f9660db58a4415ca41" },
|
||||||
|
"sqlite.lua": { "branch": "master", "commit": "50092d60feb242602d7578398c6eb53b4a8ffe7b" },
|
||||||
|
"telescope-dap.nvim": { "branch": "master", "commit": "783366bd6c1e7fa0a5c59c07db37f49c805a28df" },
|
||||||
|
"telescope-egrepify.nvim": { "branch": "master", "commit": "8da5e3ba5faf3bdd6bbfaccb3eb3b8e7ebf9b131" },
|
||||||
|
"telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },
|
||||||
|
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
|
||||||
|
"toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" },
|
||||||
|
"vim-dispatch": { "branch": "master", "commit": "a2ff28abdb2d89725192db5b8562977d392a4d3f" },
|
||||||
|
"vim-easy-align": { "branch": "master", "commit": "9815a55dbcd817784458df7a18acacc6f82b1241" },
|
||||||
|
"vim-fugitive": { "branch": "master", "commit": "61b51c09b7c9ce04e821f6cf76ea4f6f903e3cf4" },
|
||||||
|
"vim-gitgutter": { "branch": "main", "commit": "488c0555e47e2aabe273c635f7dd233e985311a6" },
|
||||||
|
"vim-highlightedyank": { "branch": "master", "commit": "285a61425e79742997bbde76a91be6189bc988fb" },
|
||||||
|
"vim-projectionist": { "branch": "master", "commit": "5ff7bf79a6ef741036d2038a226bcb5f8b1cd296" },
|
||||||
|
"vim-sneak": { "branch": "master", "commit": "18b1faf020e6a66c1ce09b3ff5e6b6feb182973b" },
|
||||||
|
"vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" },
|
||||||
|
"vim-test": { "branch": "master", "commit": "5ee3c0b3734eab612b9f70bbc8a4f69f17f8e8ef" }
|
||||||
|
}
|
88
.config/nvim/lua/.luarc.json
Normal file
88
.config/nvim/lua/.luarc.json
Normal file
@@ -0,0 +1,88 @@
|
|||||||
|
{
|
||||||
|
"workspace.library": [
|
||||||
|
"/Users/fbecker/.config/nvim",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/Comment.nvim",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/diffview.nvim",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/editorconfig-vim",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/elixir.nvim",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/FixCursorHold.nvim",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/FTerm.nvim",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/git-worktree.nvim",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/gruvbox",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/gruvbox-baby",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/harpoon",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/impatient.nvim",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/lsp-status.nvim",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/lspkind.nvim",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/lspsaga.nvim",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/lualine.nvim",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/LuaSnip",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/monokai-pro.nvim",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/neogit",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/neorg",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/neorg-telescope",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/neotest",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/neotest-elixir",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/neotest-rust",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/neotest-vim-test",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/null-ls.nvim",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/nvim-cmp",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/nvim-dap",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/nvim-dap-ui",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/nvim-dap-virtual-text",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/nvim-lsp-installer",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/nvim-lspconfig",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/nvim-notify",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/nvim-treesitter",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/nvim-web-devicons",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/packer.nvim",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/plenary.nvim",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/popup.nvim",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/rust-tools.nvim",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/rust.vim",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/smart-open.nvim",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/sqlite.lua",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/symbols-outline.nvim",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/tagbar",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/telescope-dap.nvim",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/telescope-fzf-native.nvim",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/telescope.nvim",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/vim-dispatch",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/vim-easy-align",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/vim-fugitive",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/vim-gitgutter",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/vim-highlightedyank",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/vim-projectionist",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/vim-sneak",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/vim-surround",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/vim-test",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/zk-nvim",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/opt/friendly-snippets",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/opt/playground",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/opt/nvim-treesitter-textobjects",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/opt/cmp_luasnip",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/opt/cmp-git",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/opt/cmp-tabnine",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/opt/cmp-buffer",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/opt/cmp-path",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/opt/cmp-nvim-lua",
|
||||||
|
"/Users/fbecker/.asdf/installs/neovim/0.9.0/share/nvim/runtime",
|
||||||
|
"/Users/fbecker/.asdf/installs/neovim/0.9.0/share/nvim/runtime/pack/dist/opt/matchit",
|
||||||
|
"/Users/fbecker/.asdf/installs/neovim/0.9.0/lib/nvim",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp/after",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/gruvbox-baby/after",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/start/rust.vim/after",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/opt/playground/after",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/opt/cmp_luasnip/after",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/opt/cmp-tabnine/after",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/opt/cmp-buffer/after",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/opt/cmp-path/after",
|
||||||
|
"/Users/fbecker/.local/share/nvim/site/pack/packer/opt/cmp-nvim-lua/after",
|
||||||
|
"/Users/fbecker/.config/nvim/after",
|
||||||
|
"/Users/fbecker/code/jira.nvim",
|
||||||
|
"${3rd}/luassert/library",
|
||||||
|
"${3rd}/luv/library"
|
||||||
|
]
|
||||||
|
}
|
@@ -1,3 +0,0 @@
|
|||||||
vim.cmd('let g:nvcode_termcolors=256')
|
|
||||||
|
|
||||||
vim.cmd('colorscheme ' .. O.colorscheme)
|
|
@@ -1,19 +0,0 @@
|
|||||||
-- functions
|
|
||||||
|
|
||||||
local M = {}
|
|
||||||
|
|
||||||
function M.edit_dotfiles()
|
|
||||||
require'telescope.builtin'.git_files {
|
|
||||||
shorten_path = false,
|
|
||||||
cwd = "~/.dotfiles",
|
|
||||||
prompt = "~ dotfiles ~",
|
|
||||||
height = 10,
|
|
||||||
|
|
||||||
layout_strategy = 'horizontal',
|
|
||||||
layout_options = {
|
|
||||||
preview_width = 0.75,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
|
@@ -1,70 +0,0 @@
|
|||||||
O = {
|
|
||||||
auto_close_tree = 0,
|
|
||||||
auto_complete = true,
|
|
||||||
background = dark,
|
|
||||||
ignorecase = smartcase,
|
|
||||||
clipboard = unnamedplus,
|
|
||||||
incsearch = true,
|
|
||||||
termguicolors = true,
|
|
||||||
colorscheme = 'dracula',
|
|
||||||
hidden_files = true,
|
|
||||||
wrap_lines = false,
|
|
||||||
number = true,
|
|
||||||
relative_number = true,
|
|
||||||
shell = 'zsh',
|
|
||||||
timeoutlen = 500,
|
|
||||||
number = true,
|
|
||||||
scrolloff = 8,
|
|
||||||
noshowmode = true,
|
|
||||||
splitright = true,
|
|
||||||
splitbelow = true,
|
|
||||||
|
|
||||||
database = {save_location = '~/.config/nvcode_db', auto_execute = 1},
|
|
||||||
python = {
|
|
||||||
linter = 'flake8',
|
|
||||||
-- @usage can be 'yapf', 'black'
|
|
||||||
formatter = 'black',
|
|
||||||
autoformat = false,
|
|
||||||
isort = false,
|
|
||||||
diagnostics = {virtual_text = {spacing = 0, prefix = ""}, signs = true, underline = true},
|
|
||||||
analysis = {type_checking = "basic", auto_search_paths = true, use_library_code_types = true}
|
|
||||||
},
|
|
||||||
lua = {
|
|
||||||
-- @usage can be 'lua-format'
|
|
||||||
formatter = '',
|
|
||||||
autoformat = false,
|
|
||||||
diagnostics = {virtual_text = {spacing = 0, prefix = ""}, signs = true, underline = true}
|
|
||||||
},
|
|
||||||
sh = {
|
|
||||||
-- @usage can be 'shellcheck'
|
|
||||||
linter = '',
|
|
||||||
-- @usage can be 'shfmt'
|
|
||||||
formatter = '',
|
|
||||||
autoformat = false,
|
|
||||||
diagnostics = {virtual_text = {spacing = 0, prefix = ""}, signs = true, underline = true}
|
|
||||||
},
|
|
||||||
tsserver = {
|
|
||||||
-- @usage can be 'eslint'
|
|
||||||
linter = '',
|
|
||||||
-- @usage can be 'prettier'
|
|
||||||
formatter = '',
|
|
||||||
autoformat = false,
|
|
||||||
diagnostics = {virtual_text = {spacing = 0, prefix = ""}, signs = true, underline = true}
|
|
||||||
},
|
|
||||||
json = {
|
|
||||||
-- @usage can be 'prettier'
|
|
||||||
formatter = '',
|
|
||||||
autoformat = false,
|
|
||||||
diagnostics = {virtual_text = {spacing = 0, prefix = ""}, signs = true, underline = true}
|
|
||||||
},
|
|
||||||
clang = {diagnostics = {virtual_text = {spacing = 0, prefix = ""}, signs = true, underline = true}},
|
|
||||||
ruby = {
|
|
||||||
diagnostics = {virtualtext = {spacing = 0, prefix = ""}, signs = true, underline = true},
|
|
||||||
filetypes = {'rb', 'erb', 'rakefile'}
|
|
||||||
},
|
|
||||||
-- css = {formatter = '', autoformat = false, virtual_text = true},
|
|
||||||
-- json = {formatter = '', autoformat = false, virtual_text = true}
|
|
||||||
}
|
|
||||||
|
|
||||||
DATA_PATH = vim.fn.stdpath('data')
|
|
||||||
CACHE_PATH = vim.fn.stdpath('cache')
|
|
10
.config/nvim/lua/halfdan/autocmds.lua
Normal file
10
.config/nvim/lua/halfdan/autocmds.lua
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
local vim = vim
|
||||||
|
local api = vim.api
|
||||||
|
|
||||||
|
vim.cmd([[autocmd TermOpen * setlocal nonumber norelativenumber]])
|
||||||
|
|
||||||
|
local format_group = api.nvim_create_augroup("FormatGroup", { clear = true })
|
||||||
|
api.nvim_create_autocmd(
|
||||||
|
{ "BufWinEnter", "BufReadPost" },
|
||||||
|
{ pattern = "*", command = "normal zR", group = format_group }
|
||||||
|
)
|
96
.config/nvim/lua/halfdan/cmp.lua
Normal file
96
.config/nvim/lua/halfdan/cmp.lua
Normal file
@@ -0,0 +1,96 @@
|
|||||||
|
local cmp = require'cmp'
|
||||||
|
local lspkind = require('lspkind')
|
||||||
|
|
||||||
|
local source_mapping = {
|
||||||
|
buffer = "[Buffer]",
|
||||||
|
nvim_lsp = "[LSP]",
|
||||||
|
nvim_lua = "[Lua]",
|
||||||
|
path = "[Path]",
|
||||||
|
}
|
||||||
|
|
||||||
|
local has_words_before = function()
|
||||||
|
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||||
|
return col ~= 0 and
|
||||||
|
vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(
|
||||||
|
col, col):match("%s") == nil
|
||||||
|
end
|
||||||
|
|
||||||
|
cmp.setup({
|
||||||
|
preselect = cmp.PreselectMode.None,
|
||||||
|
snippet = {
|
||||||
|
expand = function(args)
|
||||||
|
vim.snippet.expand(args.body)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
mapping = {
|
||||||
|
["<C-p>"] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }),
|
||||||
|
["<C-n>"] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }),
|
||||||
|
["<C-d>"] = cmp.mapping.scroll_docs(-4),
|
||||||
|
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||||
|
["<C-Space>"] = cmp.mapping.complete(),
|
||||||
|
["<C-e>"] = cmp.mapping.close(),
|
||||||
|
["<CR>"] = cmp.mapping.confirm {
|
||||||
|
behavior = cmp.ConfirmBehavior.Replace,
|
||||||
|
select = false, -- only confirm if explicitly selected
|
||||||
|
},
|
||||||
|
|
||||||
|
["<Tab>"] = cmp.mapping(function(fallback)
|
||||||
|
if cmp.visible() then
|
||||||
|
cmp.select_next_item()
|
||||||
|
elseif vim.snippet.active({ direction = 1 }) then
|
||||||
|
vim.snippet.jump(1)
|
||||||
|
elseif has_words_before() then
|
||||||
|
cmp.complete()
|
||||||
|
else
|
||||||
|
fallback()
|
||||||
|
end
|
||||||
|
end, { "i", "s" }),
|
||||||
|
|
||||||
|
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||||
|
if cmp.visible() then
|
||||||
|
cmp.select_prev_item()
|
||||||
|
elseif vim.snippet.active({ direction = -1 }) then
|
||||||
|
vim.snippet.jump(-1)
|
||||||
|
else
|
||||||
|
fallback()
|
||||||
|
end
|
||||||
|
end, { "i", "s" }),
|
||||||
|
},
|
||||||
|
|
||||||
|
sources = cmp.config.sources({
|
||||||
|
{ name = "nvim_lsp" },
|
||||||
|
}, {
|
||||||
|
{ name = "buffer" },
|
||||||
|
}),
|
||||||
|
|
||||||
|
formatting = {
|
||||||
|
format = function(entry, vim_item)
|
||||||
|
vim_item.kind = lspkind.presets.default[vim_item.kind]
|
||||||
|
local menu = source_mapping[entry.source.name]
|
||||||
|
vim_item.menu = menu
|
||||||
|
return vim_item
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
experimental = {
|
||||||
|
ghost_text = true,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore).
|
||||||
|
cmp.setup.cmdline({ '/', '?' }, {
|
||||||
|
sources = {
|
||||||
|
{ name = 'buffer' }
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
|
||||||
|
cmp.setup.cmdline(':', {
|
||||||
|
sources = cmp.config.sources({
|
||||||
|
{ name = 'path' }
|
||||||
|
}, {
|
||||||
|
{ name = 'cmdline' }
|
||||||
|
}),
|
||||||
|
mappings = cmp.mapping.preset.cmdline(),
|
||||||
|
})
|
||||||
|
|
2
.config/nvim/lua/halfdan/colorscheme.lua
Normal file
2
.config/nvim/lua/halfdan/colorscheme.lua
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
vim.g.nvcode_termcolors = 256
|
||||||
|
vim.cmd.colorscheme("gruvbox-baby")
|
35
.config/nvim/lua/halfdan/debugger/elixir.lua
Normal file
35
.config/nvim/lua/halfdan/debugger/elixir.lua
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
local dap = require('dap')
|
||||||
|
|
||||||
|
dap.adapters.mix_task = {
|
||||||
|
type = 'executable',
|
||||||
|
command = '/usr/local/opt/elixir-ls/rel/debugger.sh', -- debugger.bat for windows
|
||||||
|
args = {}
|
||||||
|
}
|
||||||
|
|
||||||
|
dap.configurations.elixir = {
|
||||||
|
{
|
||||||
|
type = 'mix_task',
|
||||||
|
name = 'mix test',
|
||||||
|
request = 'launch',
|
||||||
|
task = 'test',
|
||||||
|
taskArgs = { '--trace' },
|
||||||
|
startApps = false,
|
||||||
|
projectDir = "${workspaceFolder}",
|
||||||
|
requireFiles = { "test/**/test_helper.exs", "test/**/*_test.exs" }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name = "mix test focused",
|
||||||
|
type = "mix_task",
|
||||||
|
request = "launch",
|
||||||
|
taskArgs = {
|
||||||
|
"${relativeFile}:${lineNumber}",
|
||||||
|
"--color",
|
||||||
|
"--trace"
|
||||||
|
},
|
||||||
|
projectDir = "${workspaceRoot}",
|
||||||
|
requireFiles = {
|
||||||
|
"test/**/test_helper.exs",
|
||||||
|
"test/**/*_test.exs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
76
.config/nvim/lua/halfdan/debugger/init.lua
Normal file
76
.config/nvim/lua/halfdan/debugger/init.lua
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
local dap = require("dap")
|
||||||
|
local dapui = require("dapui")
|
||||||
|
local daptext = require("nvim-dap-virtual-text")
|
||||||
|
|
||||||
|
local remap = require("halfdan.keymap")
|
||||||
|
local nnoremap = remap.nnoremap
|
||||||
|
|
||||||
|
daptext.setup()
|
||||||
|
dapui.setup({
|
||||||
|
layouts = {
|
||||||
|
{
|
||||||
|
elements = {
|
||||||
|
"console",
|
||||||
|
},
|
||||||
|
size = 7,
|
||||||
|
position = "bottom",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
elements = {
|
||||||
|
-- Elements can be strings or table with id and size keys.
|
||||||
|
{ id = "scopes", size = 0.25 },
|
||||||
|
"watches",
|
||||||
|
},
|
||||||
|
size = 40,
|
||||||
|
position = "left",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
dap.listeners.after.event_initialized["dapui_config"] = function()
|
||||||
|
dapui.open(1)
|
||||||
|
end
|
||||||
|
dap.listeners.before.event_terminated["dapui_config"] = function()
|
||||||
|
dapui.close()
|
||||||
|
end
|
||||||
|
dap.listeners.before.event_exited["dapui_config"] = function()
|
||||||
|
dapui.close()
|
||||||
|
end
|
||||||
|
|
||||||
|
require("halfdan.debugger.elixir");
|
||||||
|
|
||||||
|
nnoremap("<Home>", function()
|
||||||
|
dapui.toggle(1)
|
||||||
|
end)
|
||||||
|
nnoremap("<End>", function()
|
||||||
|
dapui.toggle(2)
|
||||||
|
end)
|
||||||
|
|
||||||
|
nnoremap("<leader><leader>", function()
|
||||||
|
dap.close()
|
||||||
|
end)
|
||||||
|
|
||||||
|
nnoremap("<F5>", function()
|
||||||
|
dap.continue()
|
||||||
|
end)
|
||||||
|
nnoremap("<F10>", function()
|
||||||
|
dap.step_over()
|
||||||
|
end)
|
||||||
|
nnoremap("<F11>", function()
|
||||||
|
dap.step_into()
|
||||||
|
end)
|
||||||
|
nnoremap("<F12>", function()
|
||||||
|
dap.step_out()
|
||||||
|
end)
|
||||||
|
nnoremap("<Leader>b", function()
|
||||||
|
dap.toggle_breakpoint()
|
||||||
|
end)
|
||||||
|
nnoremap("<Leader>B", function()
|
||||||
|
dap.set_breakpoint(vim.fn.input('Breakpoint condition: '))
|
||||||
|
end)
|
||||||
|
nnoremap("<leader>rc", function()
|
||||||
|
dap.run_to_cursor()
|
||||||
|
end)
|
||||||
|
nnoremap("<leader>dr", function()
|
||||||
|
dap.repl.open()
|
||||||
|
end)
|
25
.config/nvim/lua/halfdan/globals.lua
Normal file
25
.config/nvim/lua/halfdan/globals.lua
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
O = {
|
||||||
|
auto_close_tree = 0,
|
||||||
|
auto_complete = true,
|
||||||
|
background = 'dark',
|
||||||
|
ignorecase = 'smartcase',
|
||||||
|
clipboard = 'unnamedplus',
|
||||||
|
incsearch = true,
|
||||||
|
termguicolors = true,
|
||||||
|
colorscheme = 'monokai-pro',
|
||||||
|
hidden_files = true,
|
||||||
|
wrap_lines = false,
|
||||||
|
number = true,
|
||||||
|
relative_number = true,
|
||||||
|
shell = 'zsh',
|
||||||
|
timeoutlen = 500,
|
||||||
|
scrolloff = 8,
|
||||||
|
noshowmode = true,
|
||||||
|
splitright = true,
|
||||||
|
splitbelow = true,
|
||||||
|
|
||||||
|
database = {save_location = '~/.config/nvcode_db', auto_execute = 1},
|
||||||
|
}
|
||||||
|
|
||||||
|
DATA_PATH = vim.fn.stdpath('data')
|
||||||
|
CACHE_PATH = vim.fn.stdpath('cache')
|
125
.config/nvim/lua/halfdan/icons.lua
Normal file
125
.config/nvim/lua/halfdan/icons.lua
Normal file
@@ -0,0 +1,125 @@
|
|||||||
|
return {
|
||||||
|
diagnostics = {
|
||||||
|
error = "",
|
||||||
|
warn = "",
|
||||||
|
hint = "",
|
||||||
|
info = "",
|
||||||
|
},
|
||||||
|
git = {
|
||||||
|
added = "",
|
||||||
|
modified = "",
|
||||||
|
removed = "",
|
||||||
|
renamed = "➜",
|
||||||
|
untracked = "",
|
||||||
|
ignored = "",
|
||||||
|
unstaged = "U",
|
||||||
|
staged = "",
|
||||||
|
conflict = "",
|
||||||
|
deleted = "",
|
||||||
|
},
|
||||||
|
gitsigns = {
|
||||||
|
add = "┃",
|
||||||
|
change = "┋",
|
||||||
|
delete = "",
|
||||||
|
topdelhfe = "",
|
||||||
|
changedelete = "┃",
|
||||||
|
untracked = "┃",
|
||||||
|
},
|
||||||
|
kinds = {
|
||||||
|
Array = "",
|
||||||
|
Boolean = "",
|
||||||
|
Class = "",
|
||||||
|
Color = "",
|
||||||
|
Constant = "",
|
||||||
|
Constructor = "",
|
||||||
|
Copilot = "",
|
||||||
|
Enum = "",
|
||||||
|
EnumMember = "",
|
||||||
|
Event = "",
|
||||||
|
Field = "",
|
||||||
|
File = "",
|
||||||
|
Folder = "",
|
||||||
|
Function = "",
|
||||||
|
Interface = "",
|
||||||
|
Key = "",
|
||||||
|
Keyword = "",
|
||||||
|
Method = "",
|
||||||
|
Module = "",
|
||||||
|
Namespace = "",
|
||||||
|
Null = "",
|
||||||
|
Number = "",
|
||||||
|
Object = "",
|
||||||
|
Operator = "",
|
||||||
|
Package = "",
|
||||||
|
Property = "",
|
||||||
|
Reference = "",
|
||||||
|
Snippet = "",
|
||||||
|
String = "",
|
||||||
|
Struct = "",
|
||||||
|
Text = "",
|
||||||
|
TypeParameter = "",
|
||||||
|
Unit = "",
|
||||||
|
Value = "",
|
||||||
|
Variable = "",
|
||||||
|
Macro = "", -- Macro
|
||||||
|
},
|
||||||
|
borders = {
|
||||||
|
--- @class BorderIcons
|
||||||
|
single = {
|
||||||
|
top = "─",
|
||||||
|
right = "│",
|
||||||
|
bottom = "─",
|
||||||
|
left = "│",
|
||||||
|
top_left = "╭",
|
||||||
|
top_right = "╮",
|
||||||
|
bottom_right = "╯",
|
||||||
|
bottom_left = "╰",
|
||||||
|
},
|
||||||
|
double = {
|
||||||
|
top = '═',
|
||||||
|
right = "║",
|
||||||
|
bottom = '═',
|
||||||
|
left = "║",
|
||||||
|
top_left = "╔",
|
||||||
|
top_right = "╗",
|
||||||
|
bottom_right = "╝",
|
||||||
|
bottom_left = "╚",
|
||||||
|
},
|
||||||
|
--- @class BorderIcons
|
||||||
|
thin = {
|
||||||
|
top = "▔",
|
||||||
|
right = "▕",
|
||||||
|
bottom = "▁",
|
||||||
|
left = "▏",
|
||||||
|
top_left = "🭽",
|
||||||
|
top_right = "🭾",
|
||||||
|
bottom_right = "🭿",
|
||||||
|
bottom_left = "🭼",
|
||||||
|
},
|
||||||
|
---@type BorderIcons
|
||||||
|
empty = {
|
||||||
|
top = " ",
|
||||||
|
right = " ",
|
||||||
|
bottom = " ",
|
||||||
|
left = " ",
|
||||||
|
top_left = " ",
|
||||||
|
top_right = " ",
|
||||||
|
bottom_right = " ",
|
||||||
|
bottom_left = " ",
|
||||||
|
},
|
||||||
|
---@type BorderIcons
|
||||||
|
thick = {
|
||||||
|
top = "▄",
|
||||||
|
right = "█",
|
||||||
|
bottom = "▀",
|
||||||
|
left = "█",
|
||||||
|
top_left = "▄",
|
||||||
|
top_right = "▄",
|
||||||
|
bottom_right = "▀",
|
||||||
|
bottom_left = "▀",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
misc = {
|
||||||
|
codeium = " ",
|
||||||
|
},
|
||||||
|
}
|
22
.config/nvim/lua/halfdan/init.lua
Normal file
22
.config/nvim/lua/halfdan/init.lua
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
require("halfdan.settings")
|
||||||
|
|
||||||
|
if vim.g.vscode then
|
||||||
|
-- VSCode extension
|
||||||
|
else
|
||||||
|
-- ordinary Neovim
|
||||||
|
require("halfdan.lazy")
|
||||||
|
vim.notify = require("notify")
|
||||||
|
|
||||||
|
require("halfdan.neogit")
|
||||||
|
-- require('halfdan.globals')
|
||||||
|
require('halfdan.keymap')
|
||||||
|
require('halfdan.cmp')
|
||||||
|
require('halfdan.colorscheme')
|
||||||
|
require('halfdan.treesitter')
|
||||||
|
require('halfdan.telescope')
|
||||||
|
require('halfdan.lualine')
|
||||||
|
|
||||||
|
require('halfdan.autocmds')
|
||||||
|
|
||||||
|
require('halfdan.debugger')
|
||||||
|
end
|
21
.config/nvim/lua/halfdan/keymap.lua
Normal file
21
.config/nvim/lua/halfdan/keymap.lua
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
local function bind(op, outer_opts)
|
||||||
|
outer_opts = outer_opts or {noremap = true}
|
||||||
|
return function(lhs, rhs, opts)
|
||||||
|
opts = vim.tbl_extend("force",
|
||||||
|
outer_opts,
|
||||||
|
opts or {}
|
||||||
|
)
|
||||||
|
vim.keymap.set(op, lhs, rhs, opts)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
M.nmap = bind("n", {noremap = false})
|
||||||
|
M.nnoremap = bind("n")
|
||||||
|
M.vnoremap = bind("v")
|
||||||
|
M.xnoremap = bind("x")
|
||||||
|
M.inoremap = bind("i")
|
||||||
|
M.tnoremap = bind("t")
|
||||||
|
|
||||||
|
return M
|
319
.config/nvim/lua/halfdan/lazy.lua
Normal file
319
.config/nvim/lua/halfdan/lazy.lua
Normal file
@@ -0,0 +1,319 @@
|
|||||||
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
|
if not vim.loop.fs_stat(lazypath) then
|
||||||
|
vim.fn.system({
|
||||||
|
"git",
|
||||||
|
"clone",
|
||||||
|
"--filter=blob:none",
|
||||||
|
"https://github.com/folke/lazy.nvim.git",
|
||||||
|
"--branch=stable", -- latest stable release
|
||||||
|
lazypath,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
|
if vim.g.vscode then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
require("lazy").setup({
|
||||||
|
{
|
||||||
|
"NeogitOrg/neogit",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim", -- required
|
||||||
|
"nvim-telescope/telescope.nvim", -- optional
|
||||||
|
"sindrets/diffview.nvim", -- optional
|
||||||
|
"ibhagwan/fzf-lua", -- optional
|
||||||
|
},
|
||||||
|
config = true
|
||||||
|
},
|
||||||
|
{'airblade/vim-gitgutter'},
|
||||||
|
|
||||||
|
-- Load .editorconfig files
|
||||||
|
{'editorconfig/editorconfig-vim'},
|
||||||
|
|
||||||
|
{
|
||||||
|
"m4xshen/hardtime.nvim",
|
||||||
|
lazy = false,
|
||||||
|
dependencies = { "MunifTanjim/nui.nvim" },
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"karb94/neoscroll.nvim",
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
{'junegunn/vim-easy-align'},
|
||||||
|
|
||||||
|
-- Goodies
|
||||||
|
{'tpope/vim-fugitive'},
|
||||||
|
{'tpope/vim-surround'}, -- ✅
|
||||||
|
{'tpope/vim-dispatch'},
|
||||||
|
|
||||||
|
-- Treesitter
|
||||||
|
{
|
||||||
|
'nvim-treesitter/nvim-treesitter',
|
||||||
|
build = ':TSUpdate',
|
||||||
|
},
|
||||||
|
{ 'nvim-treesitter/playground', after = 'nvim-treesitter' },
|
||||||
|
{ 'nvim-treesitter/nvim-treesitter-textobjects', after = 'nvim-treesitter' },
|
||||||
|
|
||||||
|
-- Testing
|
||||||
|
{'vim-test/vim-test'},
|
||||||
|
{
|
||||||
|
"nvim-neotest/neotest",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-neotest/nvim-nio",
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
"antoinemadec/FixCursorHold.nvim",
|
||||||
|
-- plugins
|
||||||
|
"fredrikaverpil/neotest-golang",
|
||||||
|
"jfpedroza/neotest-elixir",
|
||||||
|
"rouge8/neotest-rust",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{"nvim-neotest/neotest-vim-test" },
|
||||||
|
{'akinsho/toggleterm.nvim', version = "*", config = function()
|
||||||
|
require('toggleterm').setup({
|
||||||
|
open_mapping = [[<C-\>]],
|
||||||
|
start_in_insert = true,
|
||||||
|
direction = "horizontal",
|
||||||
|
autochdir = false,
|
||||||
|
size = 20,
|
||||||
|
highlights = {
|
||||||
|
FloatBorder = { link = "ToggleTermBorder" },
|
||||||
|
Normal = { link = "ToggleTerm" },
|
||||||
|
NormalFloat = { link = "ToggleTerm" },
|
||||||
|
},
|
||||||
|
winbar = {
|
||||||
|
enabled = true,
|
||||||
|
name_formatter = function(term)
|
||||||
|
return term.name
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end},
|
||||||
|
|
||||||
|
{'f-person/git-blame.nvim'},
|
||||||
|
-- Status Line and Bufferline
|
||||||
|
{
|
||||||
|
'nvim-lualine/lualine.nvim',
|
||||||
|
dependencies = {'kyazdani42/nvim-web-devicons'},
|
||||||
|
event = { "BufReadPost", "BufNewFile" },
|
||||||
|
opts = function()
|
||||||
|
local monokai_opts = require("halfdan.util").opts("monokai-pro.nvim")
|
||||||
|
return {
|
||||||
|
float = vim.tbl_contains(monokai_opts.background_clear or {}, "neo-tree"),
|
||||||
|
separator = "bubble", -- bubble | triangle
|
||||||
|
---@type any
|
||||||
|
colorful = true,
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
config = function(_, opts)
|
||||||
|
local lualine_config = require("halfdan.lualine")
|
||||||
|
lualine_config.setup(opts)
|
||||||
|
lualine_config.load()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
{'rcarriga/nvim-notify'},
|
||||||
|
|
||||||
|
{
|
||||||
|
"nvim-neorg/neorg",
|
||||||
|
lazy = false, -- Disable lazy loading as some `lazy.nvim` distributions set `lazy = true` by default
|
||||||
|
version = "*", -- Pin Neorg to the latest stable release
|
||||||
|
config = function()
|
||||||
|
require('neorg').setup({
|
||||||
|
load = {
|
||||||
|
["core.defaults"] = {},
|
||||||
|
["core.dirman"] = {
|
||||||
|
config = {
|
||||||
|
workspaces = {
|
||||||
|
work = "~/org/work",
|
||||||
|
home = "~/org/home",
|
||||||
|
},
|
||||||
|
index = "index.norg",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
["core.completion"] = {
|
||||||
|
config = {
|
||||||
|
engine = "nvim-cmp",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
["core.concealer"] = {},
|
||||||
|
["core.journal"] = {
|
||||||
|
config = {
|
||||||
|
strategy = "flat",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
["core.integrations.telescope"] = {},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{'nvim-neorg/neorg-telescope'},
|
||||||
|
|
||||||
|
{'justinmk/vim-sneak'},
|
||||||
|
|
||||||
|
{'machakann/vim-highlightedyank'},
|
||||||
|
|
||||||
|
{
|
||||||
|
'nvimdev/lspsaga.nvim',
|
||||||
|
config = function()
|
||||||
|
require('lspsaga').setup({
|
||||||
|
symbol_in_winbar = {
|
||||||
|
enable = false,
|
||||||
|
},
|
||||||
|
lightbulb = {
|
||||||
|
enable = false,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
dependencies = {
|
||||||
|
'nvim-treesitter/nvim-treesitter', -- optional
|
||||||
|
'nvim-tree/nvim-web-devicons' -- optional
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
'hrsh7th/nvim-cmp',
|
||||||
|
dependencies = {
|
||||||
|
{ 'hrsh7th/cmp-buffer', after = 'nvim-cmp' },
|
||||||
|
'hrsh7th/cmp-nvim-lsp',
|
||||||
|
'onsails/lspkind.nvim',
|
||||||
|
{ 'hrsh7th/cmp-path', after = 'nvim-cmp' },
|
||||||
|
{ 'hrsh7th/cmp-nvim-lua', after = 'nvim-cmp' },
|
||||||
|
{ 'hrsh7th/cmp-cmdline', after = 'nvim-cmp', event = 'CmdlineEnter' },
|
||||||
|
{'petertriho/cmp-git', after = 'nvim-cmp'},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Used to display LSP status in Lualine
|
||||||
|
{'nvim-lua/lsp-status.nvim'},
|
||||||
|
|
||||||
|
{
|
||||||
|
"hedyhli/outline.nvim",
|
||||||
|
lazy = true,
|
||||||
|
cmd = { "Outline", "OutlineOpen" },
|
||||||
|
keys = { -- Example mapping to toggle outline
|
||||||
|
{ "<leader>o", "<cmd>Outline<CR>", desc = "Toggle outline" },
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
-- Your setup opts here
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'numToStr/Comment.nvim',
|
||||||
|
config = function()
|
||||||
|
require('Comment').setup()
|
||||||
|
end
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Telescope fuzzy find files/grep
|
||||||
|
{'nvim-lua/popup.nvim'},
|
||||||
|
{'nvim-lua/plenary.nvim'},
|
||||||
|
{
|
||||||
|
"fdschmidt93/telescope-egrepify.nvim",
|
||||||
|
dependencies = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim" }
|
||||||
|
},
|
||||||
|
{'nvim-telescope/telescope-fzf-native.nvim', build = 'make' },
|
||||||
|
{'nvim-telescope/telescope.nvim'},
|
||||||
|
{'nvim-telescope/telescope-dap.nvim'},
|
||||||
|
{
|
||||||
|
"danielfalk/smart-open.nvim",
|
||||||
|
branch = "0.2.x",
|
||||||
|
dependencies = {"kkharji/sqlite.lua"}
|
||||||
|
},
|
||||||
|
|
||||||
|
{'numToStr/FTerm.nvim'},
|
||||||
|
|
||||||
|
-- Debugging
|
||||||
|
"mfussenegger/nvim-dap",
|
||||||
|
"rcarriga/nvim-dap-ui",
|
||||||
|
"nvim-neotest/nvim-nio",
|
||||||
|
"theHamsta/nvim-dap-virtual-text",
|
||||||
|
|
||||||
|
-- => Language Support
|
||||||
|
{'rust-lang/rust.vim'},
|
||||||
|
{
|
||||||
|
'mrcjkb/rustaceanvim',
|
||||||
|
version = '^6', -- Recommended
|
||||||
|
lazy = false, -- This plugin is already lazy
|
||||||
|
},
|
||||||
|
{'tpope/vim-projectionist'},
|
||||||
|
|
||||||
|
-- themes & colorschemes
|
||||||
|
{ "rose-pine/neovim", name = "rose-pine" },
|
||||||
|
{'luisiacc/gruvbox-baby'},
|
||||||
|
{'akinsho/bufferline.nvim', version = "*", dependencies = 'nvim-tree/nvim-web-devicons',
|
||||||
|
keys = {
|
||||||
|
{ "<C-1>", "<Cmd>BufferLineGoToBuffer 1<CR>", desc = "Go to buffer 1" },
|
||||||
|
{ "<C-2>", "<Cmd>BufferLineGoToBuffer 2<CR>", desc = "Go to buffer 2" },
|
||||||
|
{ "<C-3>", "<Cmd>BufferLineGoToBuffer 3<CR>", desc = "Go to buffer 3" },
|
||||||
|
{ "<C-4>", "<Cmd>BufferLineGoToBuffer 4<CR>", desc = "Go to buffer 4" },
|
||||||
|
{ "<C-5>", "<Cmd>BufferLineGoToBuffer 5<CR>", desc = "Go to buffer 5" },
|
||||||
|
{ "<C-6>", "<Cmd>BufferLineGoToBuffer 6<CR>", desc = "Go to buffer 6" },
|
||||||
|
{ "<C-7>", "<Cmd>BufferLineGoToBuffer 7<CR>", desc = "Go to buffer 7" },
|
||||||
|
{ "<C-8>", "<Cmd>BufferLineGoToBuffer 8<CR>", desc = "Go to buffer 8" },
|
||||||
|
{ "<C-9>", "<Cmd>BufferLineGoToBuffer 9<CR>", desc = "Go to buffer 9" },
|
||||||
|
{ "<S-l>", "<Cmd>BufferLineCycleNext<CR>", desc = "Next buffer" },
|
||||||
|
{ "<S-h>", "<Cmd>BufferLineCyclePrev<CR>", desc = "Previous buffer" },
|
||||||
|
{ "<A-S-l>", "<Cmd>BufferLineMoveNext<CR>", desc = "Move buffer right" },
|
||||||
|
{ "<A-S-h>", "<Cmd>BufferLineMovePrev<CR>", desc = "Move buffer left" },
|
||||||
|
},
|
||||||
|
opts = function()
|
||||||
|
local monokai_opts = require("halfdan.util").opts("monokai-pro.nvim")
|
||||||
|
return {
|
||||||
|
options = {
|
||||||
|
diagnostics = "nvim_lsp", -- | "nvim_lsp" | "coc",
|
||||||
|
-- separator_style = "", -- | "thick" | "thin" | "slope" | { 'any', 'any' },
|
||||||
|
separator_style = { "", "" }, -- | "thick" | "thin" | { 'any', 'any' },
|
||||||
|
-- separator_style = "slant", -- | "thick" | "thin" | { 'any', 'any' },
|
||||||
|
indicator = {
|
||||||
|
-- icon = " ",
|
||||||
|
-- style = 'icon',
|
||||||
|
style = "underline",
|
||||||
|
},
|
||||||
|
close_command = "Bdelete! %d", -- can be a string | function, see "Mouse actions"
|
||||||
|
diagnostics_indicator = function(count, _, _, _)
|
||||||
|
if count > 9 then
|
||||||
|
return "9+"
|
||||||
|
end
|
||||||
|
return tostring(count)
|
||||||
|
end,
|
||||||
|
numbers = function(opts)
|
||||||
|
return string.format('%s', opts.raise(opts.ordinal))
|
||||||
|
end,
|
||||||
|
offsets = {
|
||||||
|
{
|
||||||
|
filetype = "neo-tree",
|
||||||
|
text = "EXPLORER",
|
||||||
|
text_align = "center",
|
||||||
|
separator = vim.tbl_contains(monokai_opts.background_clear or {}, "neo-tree"), -- set to `true` if clear background of neo-tree
|
||||||
|
},
|
||||||
|
{
|
||||||
|
filetype = "NvimTree",
|
||||||
|
text = "EXPLORER",
|
||||||
|
text_align = "center",
|
||||||
|
separator = vim.tbl_contains(monokai_opts.background_clear or {}, "nvim-tree"), -- set to `true` if clear background of neo-tree
|
||||||
|
},
|
||||||
|
},
|
||||||
|
hover = {
|
||||||
|
enabled = true,
|
||||||
|
delay = 0,
|
||||||
|
reveal = { "close" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nvim-neo-tree/neo-tree.nvim",
|
||||||
|
branch = "v3.x",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
|
||||||
|
"MunifTanjim/nui.nvim",
|
||||||
|
-- "3rd/image.nvim", -- Optional image support in preview window: See `# Preview Mode` for more information
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
160
.config/nvim/lua/halfdan/lualine/components.lua
Normal file
160
.config/nvim/lua/halfdan/lualine/components.lua
Normal file
@@ -0,0 +1,160 @@
|
|||||||
|
local config = require("halfdan.lualine.config").options
|
||||||
|
local icons = require("halfdan.icons")
|
||||||
|
|
||||||
|
local M = {}
|
||||||
|
|
||||||
|
local hl_str = function(str, hl_cur, hl_after)
|
||||||
|
if hl_after == nil then
|
||||||
|
return "%#" .. hl_cur .. "#" .. str .. "%*"
|
||||||
|
end
|
||||||
|
return "%#" .. hl_cur .. "#" .. str .. "%*" .. "%#" .. hl_after .. "#"
|
||||||
|
end
|
||||||
|
|
||||||
|
local function hide_in_width()
|
||||||
|
return vim.fn.winwidth(0) > 85
|
||||||
|
end
|
||||||
|
|
||||||
|
local prev_branch = ""
|
||||||
|
M.branch = {
|
||||||
|
"branch",
|
||||||
|
icons_enabled = false,
|
||||||
|
icon = hl_str("", "SLGitIcon", "SLBranchName"),
|
||||||
|
colored = false,
|
||||||
|
fmt = function(str)
|
||||||
|
if vim.bo.filetype == "toggleterm" then
|
||||||
|
str = prev_branch
|
||||||
|
elseif str == "" or str == nil then
|
||||||
|
str = "!=vcs"
|
||||||
|
end
|
||||||
|
prev_branch = str
|
||||||
|
local icon = hl_str(" ", "SLGitIcon", "SLBranchName")
|
||||||
|
return hl_str(config.separator_icon.left, "SLSeparator")
|
||||||
|
.. hl_str(icon, "SLGitIcon")
|
||||||
|
.. hl_str(str, "SLBranchName")
|
||||||
|
.. hl_str(config.separator_icon.right, "SLSeparator", "SLSeparator")
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
|
M.position = function()
|
||||||
|
-- print(vim.inspect(config.separator_icon))
|
||||||
|
local current_line = vim.fn.line(".")
|
||||||
|
local current_column = vim.fn.col(".")
|
||||||
|
local left_sep = hl_str(config.separator_icon.left, "SLSeparator")
|
||||||
|
local right_sep = hl_str(config.separator_icon.right, "SLSeparator", "SLSeparator")
|
||||||
|
local str = "Ln " .. current_line .. ", Col " .. current_column
|
||||||
|
return left_sep .. hl_str(str, "SLPosition", "SLPosition") .. right_sep
|
||||||
|
end
|
||||||
|
|
||||||
|
M.spaces = function()
|
||||||
|
local left_sep = hl_str(config.separator_icon.left, "SLSeparator")
|
||||||
|
local right_sep = hl_str(config.separator_icon.right, "SLSeparator", "SLSeparator")
|
||||||
|
local str = "Spaces: " .. vim.api.nvim_buf_get_option(0, "shiftwidth")
|
||||||
|
return left_sep .. hl_str(str, "SLShiftWidth", "SLShiftWidth") .. right_sep
|
||||||
|
end
|
||||||
|
|
||||||
|
M.diagnostics = function()
|
||||||
|
local function nvim_diagnostic()
|
||||||
|
local diagnostics = vim.diagnostic.get(0)
|
||||||
|
local count = { 0, 0, 0, 0 }
|
||||||
|
for _, diagnostic in ipairs(diagnostics) do
|
||||||
|
count[diagnostic.severity] = count[diagnostic.severity] + 1
|
||||||
|
end
|
||||||
|
return count[vim.diagnostic.severity.ERROR],
|
||||||
|
count[vim.diagnostic.severity.WARN],
|
||||||
|
count[vim.diagnostic.severity.INFO],
|
||||||
|
count[vim.diagnostic.severity.HINT]
|
||||||
|
end
|
||||||
|
|
||||||
|
local error_count, warn_count, info_count, hint_count = nvim_diagnostic()
|
||||||
|
local error_hl = hl_str(icons.diagnostics.Error .. " " .. error_count, "SLError", "SLError")
|
||||||
|
local warn_hl = hl_str(icons.diagnostics.Warn .. " " .. warn_count, "SLWarning", "SLWarning")
|
||||||
|
local info_hl = hl_str(icons.diagnostics.Info .. " " .. info_count, "SLInfo", "SLInfo")
|
||||||
|
local hint_hl = hl_str(icons.diagnostics.Hint .. " " .. hint_count, "SLInfo", "SLInfo")
|
||||||
|
local left_sep = hl_str(config.thin_separator_icon.left, "SLSeparator")
|
||||||
|
local right_sep = hl_str(config.thin_separator_icon.right, "SLSeparator", "SLSeparator")
|
||||||
|
return left_sep .. error_hl .. " " .. warn_hl .. " " .. hint_hl .. right_sep
|
||||||
|
end
|
||||||
|
|
||||||
|
M.diff = {
|
||||||
|
"diff",
|
||||||
|
colored = true,
|
||||||
|
diff_color = {
|
||||||
|
added = "SLDiffAdd",
|
||||||
|
modified = "SLDiffChange",
|
||||||
|
removed = "SLDiffDelete",
|
||||||
|
},
|
||||||
|
symbols = {
|
||||||
|
added = icons.git.added .. " ",
|
||||||
|
modified = icons.git.modified .. " ",
|
||||||
|
removed = icons.git.removed .. " ",
|
||||||
|
}, -- changes diff symbols
|
||||||
|
fmt = function(str)
|
||||||
|
if str == "" then
|
||||||
|
return ""
|
||||||
|
end
|
||||||
|
local left_sep = hl_str(config.thin_separator_icon.left, "SLSeparator")
|
||||||
|
local right_sep = hl_str(config.thin_separator_icon.right, "SLSeparator", "SLSeparator")
|
||||||
|
return left_sep .. str .. right_sep
|
||||||
|
end,
|
||||||
|
cond = hide_in_width,
|
||||||
|
}
|
||||||
|
|
||||||
|
M.mode = {
|
||||||
|
"mode",
|
||||||
|
fmt = function(str)
|
||||||
|
local left_sep = hl_str(config.separator_icon.left, "SLSeparator", "SLPadding")
|
||||||
|
local right_sep = hl_str(config.separator_icon.right, "SLSeparator", "SLPadding")
|
||||||
|
return left_sep .. hl_str(str, "SLMode") .. right_sep
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
|
local prev_filetype = ""
|
||||||
|
M.filetype = {
|
||||||
|
"filetype",
|
||||||
|
icons_enabled = false,
|
||||||
|
icons_only = false,
|
||||||
|
fmt = function(str)
|
||||||
|
local ui_filetypes = {
|
||||||
|
"help",
|
||||||
|
"packer",
|
||||||
|
"neogitstatus",
|
||||||
|
"NvimTree",
|
||||||
|
"Trouble",
|
||||||
|
"lir",
|
||||||
|
"Outline",
|
||||||
|
"spectre_panel",
|
||||||
|
"toggleterm",
|
||||||
|
"DressingSelect",
|
||||||
|
"neo-tree",
|
||||||
|
"",
|
||||||
|
}
|
||||||
|
local filetype_str = ""
|
||||||
|
|
||||||
|
if str == "toggleterm" then
|
||||||
|
--
|
||||||
|
filetype_str = "ToggleTerm " .. vim.api.nvim_buf_get_var(0, "toggle_number")
|
||||||
|
elseif str == "TelescopePrompt" then
|
||||||
|
filetype_str = ""
|
||||||
|
elseif str == "neo-tree" or str == "neo-tree-popup" then
|
||||||
|
if prev_filetype == "" then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
filetype_str = prev_filetype
|
||||||
|
elseif str == "help" then
|
||||||
|
filetype_str = ""
|
||||||
|
elseif vim.tbl_contains(ui_filetypes, str) then
|
||||||
|
return
|
||||||
|
else
|
||||||
|
prev_filetype = str
|
||||||
|
filetype_str = str
|
||||||
|
end
|
||||||
|
local left_sep = hl_str(config.separator_icon.left, "SLSeparator")
|
||||||
|
local right_sep = hl_str(config.separator_icon.right, "SLSeparator", "SLSeparator")
|
||||||
|
-- Upper case first character
|
||||||
|
filetype_str = filetype_str:gsub("%a", string.upper, 1)
|
||||||
|
local filetype_hl = hl_str(filetype_str, "SLFiletype", "SLFiletype")
|
||||||
|
return left_sep .. filetype_hl .. right_sep
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
|
return M
|
40
.config/nvim/lua/halfdan/lualine/config.lua
Normal file
40
.config/nvim/lua/halfdan/lualine/config.lua
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
---@class LualineConfig
|
||||||
|
local default = {
|
||||||
|
float = true,
|
||||||
|
separator = "bubble", -- bubble | triangle
|
||||||
|
---@type any
|
||||||
|
colorful = true,
|
||||||
|
separator_icon = { left = "", right = " " },
|
||||||
|
thin_separator_icon = { left = "", right = " " },
|
||||||
|
-- separator_icon = { left = "█", right = "█" },
|
||||||
|
-- thin_separator_icon = { left = " ", right = " " },
|
||||||
|
}
|
||||||
|
|
||||||
|
---@type LualineConfig
|
||||||
|
M.options = {}
|
||||||
|
|
||||||
|
---@param type "bubble" | "triangle"
|
||||||
|
local function make_separator(type)
|
||||||
|
if type == "bubble" then
|
||||||
|
M.options.separator_icon = { left = "█", right = "█" }
|
||||||
|
M.options.thin_separator_icon = { left = " ", right = " " }
|
||||||
|
elseif type == "triangle" then
|
||||||
|
M.options.separator_icon = { left = "█", right = "█" }
|
||||||
|
M.options.thin_separator_icon = { left = " ", right = " " }
|
||||||
|
else
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
M.setup = function(opts)
|
||||||
|
M.options = vim.tbl_deep_extend("force", {}, default, opts or {})
|
||||||
|
if M.options.float then
|
||||||
|
make_separator(M.options.separator)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
M.setup()
|
||||||
|
|
||||||
|
return M
|
111
.config/nvim/lua/halfdan/lualine/highlights.lua
Normal file
111
.config/nvim/lua/halfdan/lualine/highlights.lua
Normal file
@@ -0,0 +1,111 @@
|
|||||||
|
local M = {}
|
||||||
|
local util = require("halfdan.util")
|
||||||
|
|
||||||
|
local function draw(groups)
|
||||||
|
if groups == nil then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
for group, value in pairs(groups) do
|
||||||
|
vim.api.nvim_set_hl(0, group, value)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function generate(config, palette)
|
||||||
|
local float = config.float
|
||||||
|
local colorful = config.colorful
|
||||||
|
if colorful then
|
||||||
|
palette.yellow = util.get_highlight_value("String").foreground or "#ffff00"
|
||||||
|
palette.white = util.get_highlight_value("Normal").foreground or "#ffffff"
|
||||||
|
palette.red = util.get_highlight_value("DiagnosticError").foreground or "#ff0000"
|
||||||
|
palette.orange = util.get_highlight_value("DiagnosticWarn").foreground or "#ff7700"
|
||||||
|
palette.blue = util.get_highlight_value("DiagnosticHint").foreground or "#00ffff"
|
||||||
|
palette.magenta = util.get_highlight_value("Statement").foreground or "#ff00ff"
|
||||||
|
palette.green = util.get_highlight_value("healthSuccess").foreground or "#00ff00"
|
||||||
|
end
|
||||||
|
return {
|
||||||
|
SLGitIcon = {
|
||||||
|
bg = float and palette.float_background or palette.statusbar_bg,
|
||||||
|
fg = colorful and palette.white or palette.statusbar_fg,
|
||||||
|
},
|
||||||
|
SLBranchName = {
|
||||||
|
bg = float and palette.float_background or palette.statusbar_bg,
|
||||||
|
fg = colorful and palette.yellow or palette.statusbar_fg,
|
||||||
|
},
|
||||||
|
SLError = {
|
||||||
|
bg = float and palette.editor_bg or palette.statusbar_bg,
|
||||||
|
fg = colorful and palette.red or palette.statusbar_fg,
|
||||||
|
},
|
||||||
|
SLWarning = {
|
||||||
|
bg = float and palette.editor_bg or palette.statusbar_bg,
|
||||||
|
fg = colorful and palette.orange or palette.statusbar_fg,
|
||||||
|
},
|
||||||
|
SLInfo = {
|
||||||
|
bg = float and palette.editor_bg or palette.statusbar_bg,
|
||||||
|
fg = colorful and palette.blue or palette.statusbar_fg,
|
||||||
|
},
|
||||||
|
SLDiffAdd = {
|
||||||
|
bg = float and palette.editor_bg or palette.statusbar_bg,
|
||||||
|
fg = colorful and palette.green or palette.statusbar_fg,
|
||||||
|
},
|
||||||
|
SLDiffChange = {
|
||||||
|
bg = float and palette.editor_bg or palette.statusbar_bg,
|
||||||
|
fg = colorful and palette.yellow or palette.statusbar_fg,
|
||||||
|
},
|
||||||
|
SLDiffDelete = {
|
||||||
|
bg = float and palette.editor_bg or palette.statusbar_bg,
|
||||||
|
fg = colorful and palette.red or palette.statusbar_fg,
|
||||||
|
},
|
||||||
|
SLPosition = {
|
||||||
|
bg = float and palette.float_background or palette.statusbar_bg,
|
||||||
|
fg = colorful and palette.magenta or palette.statusbar_fg,
|
||||||
|
},
|
||||||
|
SLFiletype = {
|
||||||
|
bg = float and palette.float_background or palette.statusbar_bg,
|
||||||
|
fg = colorful and palette.blue or palette.statusbar_fg,
|
||||||
|
},
|
||||||
|
SLShiftWidth = {
|
||||||
|
bg = float and palette.float_background or palette.statusbar_bg,
|
||||||
|
fg = colorful and palette.yellow or palette.statusbar_fg,
|
||||||
|
},
|
||||||
|
SLEncoding = {
|
||||||
|
bg = float and palette.float_background or palette.statusbar_bg,
|
||||||
|
fg = colorful and palette.green or palette.statusbar_fg,
|
||||||
|
},
|
||||||
|
SLMode = {
|
||||||
|
bg = float and palette.float_background or palette.statusbar_bg,
|
||||||
|
fg = colorful and palette.green or palette.statusbar_fg,
|
||||||
|
bold = true,
|
||||||
|
},
|
||||||
|
SLSeparatorUnused = {
|
||||||
|
bg = float and palette.float_background or palette.statusbar_bg,
|
||||||
|
fg = colorful and palette.editor_bg or palette.statusbar_fg,
|
||||||
|
},
|
||||||
|
SLSeparator = {
|
||||||
|
bg = float and palette.editor_bg or palette.statusbar_bg,
|
||||||
|
fg = float and palette.float_background or palette.statusbar_bg,
|
||||||
|
},
|
||||||
|
SLPadding = {
|
||||||
|
bg = float and palette.editor_bg or palette.statusbar_bg,
|
||||||
|
fg = palette.editor_bg,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
---@param config LualineConfig
|
||||||
|
M.custom = function(config)
|
||||||
|
local statusline_hl = util.get_highlight_value("StatusLine")
|
||||||
|
local palette = {
|
||||||
|
float_background = util.get_highlight_value("CursorLine").background,
|
||||||
|
editor_bg = util.get_highlight_value("Normal").background or "NONE",
|
||||||
|
statusbar_bg = statusline_hl.background or "#000000",
|
||||||
|
statusbar_fg = statusline_hl.foreground or "#505050",
|
||||||
|
}
|
||||||
|
local groups = generate(config, palette)
|
||||||
|
|
||||||
|
draw(groups)
|
||||||
|
-- clear theme if float ortherwhise, make it auto
|
||||||
|
local theme = config.float and { normal = { c = { bg = palette.editor_bg } } } or "auto"
|
||||||
|
return theme
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
60
.config/nvim/lua/halfdan/lualine/init.lua
Normal file
60
.config/nvim/lua/halfdan/lualine/init.lua
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
local config = require("halfdan.lualine.config")
|
||||||
|
|
||||||
|
local git_blame = require('gitblame')
|
||||||
|
local M = {}
|
||||||
|
|
||||||
|
local function setup()
|
||||||
|
local cpn = require("halfdan.lualine.components")
|
||||||
|
local theme = require("halfdan.lualine.highlights").custom(config.options)
|
||||||
|
|
||||||
|
require("lualine").setup({
|
||||||
|
options = {
|
||||||
|
theme = theme,
|
||||||
|
icons_enabled = true,
|
||||||
|
component_separators = { left = "", right = "" },
|
||||||
|
section_separators = { left = "", right = "" },
|
||||||
|
disabled_filetypes = {
|
||||||
|
statusline = { "dashboard", "lazy", "alpha" },
|
||||||
|
},
|
||||||
|
ignore_focus = {},
|
||||||
|
always_divide_middle = true,
|
||||||
|
globalstatus = true,
|
||||||
|
refresh = {
|
||||||
|
statusline = 1000,
|
||||||
|
tabline = 1000,
|
||||||
|
-- winbar = 100,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
sections = {
|
||||||
|
lualine_a = { cpn.branch },
|
||||||
|
lualine_b = { cpn.diagnostics },
|
||||||
|
lualine_c = { "lsp_status" },
|
||||||
|
lualine_x = { { git_blame.get_current_blame_text, cond = git_blame.is_blame_text_available }, cpn.diff },
|
||||||
|
lualine_y = { cpn.position, cpn.filetype },
|
||||||
|
lualine_z = { cpn.spaces, cpn.mode },
|
||||||
|
},
|
||||||
|
inactive_sections = {
|
||||||
|
lualine_a = {},
|
||||||
|
lualine_b = {},
|
||||||
|
lualine_c = { "filename" },
|
||||||
|
lualine_x = { "location" },
|
||||||
|
lualine_y = {},
|
||||||
|
lualine_z = {},
|
||||||
|
},
|
||||||
|
tabline = {},
|
||||||
|
extensions = {},
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
M.setup = config.setup
|
||||||
|
|
||||||
|
M.load = function()
|
||||||
|
setup()
|
||||||
|
vim.api.nvim_create_autocmd("ColorScheme", {
|
||||||
|
callback = function()
|
||||||
|
setup()
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
12
.config/nvim/lua/halfdan/neogit.lua
Normal file
12
.config/nvim/lua/halfdan/neogit.lua
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
local neogit = require('neogit')
|
||||||
|
local nnoremap = require('halfdan.keymap').nnoremap
|
||||||
|
|
||||||
|
neogit.setup {
|
||||||
|
integrations = {
|
||||||
|
diffview = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
nnoremap("<leader>gs", function()
|
||||||
|
neogit.open({kind='split'})
|
||||||
|
end)
|
68
.config/nvim/lua/halfdan/settings.lua
Normal file
68
.config/nvim/lua/halfdan/settings.lua
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
vim.opt.iskeyword:append("-") -- treat dash separated words as a word text object"
|
||||||
|
vim.opt.shortmess:append("c") -- Don't pass messages to |ins-completion-menu|.
|
||||||
|
vim.opt.inccommand = "split" -- Make substitution work in realtime
|
||||||
|
vim.o.hidden = true -- Required to keep multiple buffers open multiple buffers
|
||||||
|
vim.o.title = true
|
||||||
|
vim.o.titlestring="%<%F%=%l/%L - nvim"
|
||||||
|
vim.wo.wrap = false -- Display long lines as just one line
|
||||||
|
-- vim.cmd('set whichwrap+=<,>,[,],h,l') -- move to next line with theses keys
|
||||||
|
-- vim.cmd('syntax on') -- syntax highlighting
|
||||||
|
vim.o.foldmethod = "manual"
|
||||||
|
vim.o.fillchars = [[eob: ,fold: ,foldopen:,foldsep: ,foldclose:]]
|
||||||
|
local fcs = vim.opt.fillchars:get()
|
||||||
|
|
||||||
|
-- Stolen from Akinsho
|
||||||
|
local function get_fold(lnum)
|
||||||
|
if vim.fn.foldlevel(lnum) <= vim.fn.foldlevel(lnum - 1) then return ' ' end
|
||||||
|
return vim.fn.foldclosed(lnum) == -1 and fcs.foldopen or fcs.foldclose
|
||||||
|
end
|
||||||
|
|
||||||
|
_G.get_statuscol = function()
|
||||||
|
return "%s%=" .. get_fold(vim.v.lnum) .. " %l "
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
vim.o.statuscolumn = "%!v:lua.get_statuscol()"
|
||||||
|
vim.o.foldcolumn = '0'
|
||||||
|
vim.o.foldlevelstart = 99
|
||||||
|
vim.o.foldlevel = 99 -- Keep folds open by default
|
||||||
|
vim.o.pumheight = 10 -- Makes popup menu smaller
|
||||||
|
vim.o.fileencoding = "utf-8" -- The encoding written to file
|
||||||
|
vim.o.cmdheight = 1 -- More space for displaying messages
|
||||||
|
vim.o.mouse = "a" -- Enable your mouse
|
||||||
|
vim.o.splitbelow = true -- Horizontal splits will automatically be below
|
||||||
|
vim.o.termguicolors = true -- set term gui colors most terminals support this
|
||||||
|
vim.o.splitright = true -- Vertical splits will automatically be to the right
|
||||||
|
vim.opt.conceallevel = 2
|
||||||
|
vim.opt.concealcursor = 'nc'
|
||||||
|
vim.o.tabstop = 2 -- Insert 4 spaces for a tab
|
||||||
|
vim.o.shiftwidth = 2 -- Change the number of space characters inserted for indentation
|
||||||
|
vim.o.expandtab = true -- Converts tabs to spaces
|
||||||
|
vim.bo.smartindent = false -- Makes indenting smart
|
||||||
|
vim.wo.number = true -- set numbered lines
|
||||||
|
-- vim.wo.relativenumber = true -- set relative number
|
||||||
|
vim.wo.cursorline = true -- Enable highlighting of the current line
|
||||||
|
vim.o.showtabline = 1 -- Always show tabs
|
||||||
|
vim.o.showmode = false -- We don't need to see things like -- INSERT -- anymore
|
||||||
|
vim.o.backup = false -- This is recommended by coc
|
||||||
|
vim.o.writebackup = false -- This is recommended by coc
|
||||||
|
vim.wo.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift the text each time
|
||||||
|
vim.o.updatetime = 300 -- Faster completion
|
||||||
|
vim.o.timeoutlen = 1000 -- By default timeoutlen is 1000 ms
|
||||||
|
vim.o.clipboard = "unnamedplus" -- Copy paste between vim and everything else
|
||||||
|
vim.o.laststatus = 3 -- Set global status bar
|
||||||
|
vim.b.did_ftplugin = 1
|
||||||
|
-- Enable telescope theme
|
||||||
|
-- vim.g.gruvbox_baby_telescope_theme = 1
|
||||||
|
-- vim.g.gruvbox_baby_background_color = "dark"
|
||||||
|
|
||||||
|
vim.g.mapleader = ' '
|
||||||
|
|
||||||
|
vim.g.netrw_preview = 1 -- Split preview vertically
|
||||||
|
vim.g.netrw_alo = 1 -- Show preview window to the right
|
||||||
|
vim.g.netrw_winsize = 30 -- Have the preview window take up 70%
|
||||||
|
-- vim.g.netrw_liststyle = 3 -- Use tree style
|
||||||
|
--
|
||||||
|
vim.g.gitblame_display_virtual_text = 0
|
||||||
|
vim.g.gitblame_date_format = '%r'
|
||||||
|
vim.g.gitblame_message_template = '<author> • <date>'
|
@@ -1,3 +1,7 @@
|
|||||||
|
if vim.g.vscode then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
-- Global remapping
|
-- Global remapping
|
||||||
------------------------------
|
------------------------------
|
||||||
-- '--color=never',
|
-- '--color=never',
|
67
.config/nvim/lua/halfdan/telescope.lua
Normal file
67
.config/nvim/lua/halfdan/telescope.lua
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
local actions = require('telescope.actions')
|
||||||
|
|
||||||
|
-- Global remapping
|
||||||
|
require('telescope').setup {
|
||||||
|
defaults = {
|
||||||
|
-- find_command = { 'rg', '--no-heading', '--with-filename', '--line-number', '--column', '--smart-case' },
|
||||||
|
file_ignore_patterns = { "_build", "node_modules", "deps", ".git", ".elixir_ls" },
|
||||||
|
prompt_prefix = " ",
|
||||||
|
selection_caret = " ",
|
||||||
|
entry_prefix = " ",
|
||||||
|
-- borderchars = { "█", " ", "▀", "█", "█", " ", " ", "▀" },
|
||||||
|
file_sorter = require 'telescope'.extensions.fzf.get_fzf_sorter,
|
||||||
|
-- Developer configurations: Not meant for general override
|
||||||
|
mappings = {
|
||||||
|
i = {
|
||||||
|
["<C-j>"] = actions.move_selection_next,
|
||||||
|
["<C-k>"] = actions.move_selection_previous,
|
||||||
|
["<C-q>"] = actions.smart_send_to_qflist + actions.open_qflist,
|
||||||
|
-- To disable a keymap, put [map] = false
|
||||||
|
-- So, to not map "<C-n>", just put
|
||||||
|
-- ["<c-x>"] = false,
|
||||||
|
|
||||||
|
-- Otherwise, just set the mapping to the function that you want it to be.
|
||||||
|
-- ["<C-i>"] = actions.select_horizontal,
|
||||||
|
|
||||||
|
-- Add up multiple actions
|
||||||
|
["<CR>"] = actions.select_default + actions.center
|
||||||
|
|
||||||
|
-- You can perform as many actions in a row as you like
|
||||||
|
-- ["<CR>"] = actions.select_default + actions.center + my_cool_custom_action,
|
||||||
|
},
|
||||||
|
n = {
|
||||||
|
["<C-j>"] = actions.move_selection_next,
|
||||||
|
["<C-k>"] = actions.move_selection_previous,
|
||||||
|
["<C-q>"] = actions.smart_send_to_qflist + actions.open_qflist,
|
||||||
|
["<esc>"] = actions.close,
|
||||||
|
-- ["<C-i>"] = my_cool_custom_action,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
pickers = {
|
||||||
|
buffers = {
|
||||||
|
mappings = {
|
||||||
|
n = {
|
||||||
|
['d'] = actions.delete_buffer
|
||||||
|
}, -- n
|
||||||
|
i = {
|
||||||
|
['<c-d>'] = actions.delete_buffer
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
extensions = {
|
||||||
|
fzf = {
|
||||||
|
fuzzy = true, -- false will only do exact matching
|
||||||
|
override_generic_sorter = true, -- override the generic sorter
|
||||||
|
override_file_sorter = true, -- override the file sorter
|
||||||
|
case_mode = "smart_case", -- or "ignore_case" or "respect_case"
|
||||||
|
-- the default case_mode is "smart_case"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
require('telescope').load_extension("fzf")
|
||||||
|
require('telescope').load_extension("dap")
|
||||||
|
require('telescope').load_extension("smart_open")
|
||||||
|
require('telescope').load_extension("egrepify")
|
23
.config/nvim/lua/halfdan/treesitter.lua
Normal file
23
.config/nvim/lua/halfdan/treesitter.lua
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
if vim.g.vscode then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
require('nvim-treesitter.configs').setup({
|
||||||
|
ensure_installed = { "python", "go", "elixir", "heex", "rust", "gomod", "json", "lua", "yaml", "norg", "query", "markdown", "markdown_inline", "gleam", "zig", "odin"},
|
||||||
|
ignore_install = { "haskell" },
|
||||||
|
highlight = {
|
||||||
|
enable = true,
|
||||||
|
},
|
||||||
|
indent = {
|
||||||
|
enable = true,
|
||||||
|
},
|
||||||
|
incremental_selection = {
|
||||||
|
enable = true,
|
||||||
|
keymaps = {
|
||||||
|
init_selection = "gnn",
|
||||||
|
node_incremental = "grn",
|
||||||
|
scope_incremental = "grc",
|
||||||
|
node_decremental = "grm",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
245
.config/nvim/lua/halfdan/util.lua
Normal file
245
.config/nvim/lua/halfdan/util.lua
Normal file
@@ -0,0 +1,245 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
M.root_patterns = { ".git", "lua", "package.json", "mvnw", "gradlew", "pom.xml", "build.gradle", "release", ".project" }
|
||||||
|
|
||||||
|
M.augroup = function(name)
|
||||||
|
return vim.api.nvim_create_augroup("halfdan_" .. name, { clear = true })
|
||||||
|
end
|
||||||
|
|
||||||
|
M.has = function(plugin)
|
||||||
|
return require("lazy.core.config").plugins[plugin] ~= nil
|
||||||
|
end
|
||||||
|
|
||||||
|
function M.get_clients(...)
|
||||||
|
local fn = vim.lsp.get_clients or vim.lsp.get_active_clients
|
||||||
|
return fn(...)
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param on_attach fun(client, buffer)
|
||||||
|
M.on_attach = function(on_attach)
|
||||||
|
vim.api.nvim_create_autocmd("LspAttach", {
|
||||||
|
callback = function(args)
|
||||||
|
local buffer = args.buf
|
||||||
|
local client = vim.lsp.get_client_by_id(args.data.client_id)
|
||||||
|
on_attach(client, buffer)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
M.get_highlight_value = function(group)
|
||||||
|
local found, hl = pcall(vim.api.nvim_get_hl_by_name, group, true)
|
||||||
|
if not found then
|
||||||
|
return {}
|
||||||
|
end
|
||||||
|
local hl_config = {}
|
||||||
|
for key, value in pairs(hl) do
|
||||||
|
_, hl_config[key] = pcall(string.format, "#%06x", value)
|
||||||
|
end
|
||||||
|
return hl_config
|
||||||
|
end
|
||||||
|
|
||||||
|
---@param name string
|
||||||
|
function M.opts(name)
|
||||||
|
local plugin = require("lazy.core.config").plugins[name]
|
||||||
|
if not plugin then
|
||||||
|
return {}
|
||||||
|
end
|
||||||
|
local Plugin = require("lazy.core.plugin")
|
||||||
|
return Plugin.values(plugin, "opts", false)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- returns the root directory based on:
|
||||||
|
-- * lsp workspace folders
|
||||||
|
-- * lsp root_dir
|
||||||
|
-- * root pattern of filename of the current buffer
|
||||||
|
-- * root pattern of cwd
|
||||||
|
---@return string
|
||||||
|
M.get_root = function()
|
||||||
|
---@type string?
|
||||||
|
local path = vim.api.nvim_buf_get_name(0)
|
||||||
|
path = path ~= "" and vim.loop.fs_realpath(path) or nil
|
||||||
|
---@type string[]
|
||||||
|
local roots = {}
|
||||||
|
if path then
|
||||||
|
for _, client in pairs(vim.lsp.get_active_clients({ bufnr = 0 })) do
|
||||||
|
local workspace = client.config.workspace_folders
|
||||||
|
local paths = workspace
|
||||||
|
and vim.tbl_map(function(ws)
|
||||||
|
return vim.uri_to_fname(ws.uri)
|
||||||
|
end, workspace)
|
||||||
|
or client.config.root_dir and { client.config.root_dir }
|
||||||
|
or {}
|
||||||
|
for _, p in ipairs(paths) do
|
||||||
|
local r = vim.loop.fs_realpath(p)
|
||||||
|
if path:find(r, 1, true) then
|
||||||
|
roots[#roots + 1] = r
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
table.sort(roots, function(a, b)
|
||||||
|
return #a > #b
|
||||||
|
end)
|
||||||
|
---@type string?
|
||||||
|
local root = roots[1]
|
||||||
|
if not root then
|
||||||
|
path = path and vim.fs.dirname(path) or vim.loop.cwd()
|
||||||
|
---@type string?
|
||||||
|
root = vim.fs.find(M.root_patterns, { path = path, upward = true })[1]
|
||||||
|
root = root and vim.fs.dirname(root) or vim.loop.cwd()
|
||||||
|
end
|
||||||
|
---@cast root string
|
||||||
|
return root
|
||||||
|
end
|
||||||
|
|
||||||
|
M.set_root = function(dir)
|
||||||
|
vim.api.nvim_set_current_dir(dir)
|
||||||
|
end
|
||||||
|
|
||||||
|
---@param type "ivy" | "dropdown" | "cursor" | nil
|
||||||
|
--- @param borderType "thin" | "thick" | "double" | "single" | "empty" | nil
|
||||||
|
M.telescope_theme = function(type, borderType)
|
||||||
|
if type == nil then
|
||||||
|
return {
|
||||||
|
borderchars = M.generate_borderchars(borderType),
|
||||||
|
layout_config = {
|
||||||
|
width = 80,
|
||||||
|
height = 0.5,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end
|
||||||
|
return require("telescope.themes")["get_" .. type]({
|
||||||
|
cwd = M.get_root(),
|
||||||
|
borderchars = M.generate_borderchars(borderType, nil, { top = "█", top_left = "█", top_right = "█" }),
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
---@param builtin "find_files" | "live_grep" | "buffers"
|
||||||
|
---@param type "ivy" | "dropdown" | "cursor" | nil
|
||||||
|
M.telescope = function(builtin, type, opts)
|
||||||
|
local params = { builtin = builtin, type = type, opts = opts }
|
||||||
|
return function()
|
||||||
|
builtin = params.builtin
|
||||||
|
type = params.type
|
||||||
|
opts = params.opts
|
||||||
|
opts = vim.tbl_deep_extend("force", { cwd = M.get_root() }, opts or {})
|
||||||
|
local theme
|
||||||
|
if vim.tbl_contains({ "ivy", "dropdown", "cursor" }, type) then
|
||||||
|
theme = M.telescope_theme(type)
|
||||||
|
else
|
||||||
|
theme = opts
|
||||||
|
end
|
||||||
|
require("telescope.builtin")[builtin](theme)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
---@param name "autocmds" | "options" | "keymaps"
|
||||||
|
M.load = function(name)
|
||||||
|
local Util = require("lazy.core.util")
|
||||||
|
-- always load lazyvim, then user file
|
||||||
|
local mod = "halfdan.core." .. name
|
||||||
|
Util.try(function()
|
||||||
|
require(mod)
|
||||||
|
end, {
|
||||||
|
msg = "Failed loading " .. mod,
|
||||||
|
on_error = function(msg)
|
||||||
|
local modpath = require("lazy.core.cache").find(mod)
|
||||||
|
if modpath then
|
||||||
|
Util.error(msg)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
M.on_very_lazy = function(fn)
|
||||||
|
vim.api.nvim_create_autocmd("User", {
|
||||||
|
pattern = "VeryLazy",
|
||||||
|
callback = function()
|
||||||
|
fn()
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
M.capabilities = function(ext)
|
||||||
|
return vim.tbl_deep_extend(
|
||||||
|
"force",
|
||||||
|
{},
|
||||||
|
ext or {},
|
||||||
|
require("cmp_nvim_lsp").default_capabilities(),
|
||||||
|
{ textDocument = { foldingRange = { dynamicRegistration = false, lineFoldingOnly = true } } }
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
M.notify = function(msg, level, opts)
|
||||||
|
opts = opts or {}
|
||||||
|
level = vim.log.levels[level:upper()]
|
||||||
|
if type(msg) == "table" then
|
||||||
|
msg = table.concat(msg, "\n")
|
||||||
|
end
|
||||||
|
local nopts = { title = "Nvim" }
|
||||||
|
if opts.once then
|
||||||
|
return vim.schedule(function()
|
||||||
|
vim.notify_once(msg, level, nopts)
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
vim.schedule(function()
|
||||||
|
vim.notify(msg, level, nopts)
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param type "thin" | "thick" | "double" | "single" | "empty" | nil
|
||||||
|
--- @param order "t-r-b-l-tl-tr-br-bl" | "tl-t-tr-r-br-b-bl-l" | nil
|
||||||
|
--- @param opts BorderIcons | nil
|
||||||
|
M.generate_borderchars = function(type, order, opts)
|
||||||
|
if order == nil then
|
||||||
|
order = "t-r-b-l-tl-tr-br-bl"
|
||||||
|
end
|
||||||
|
local border_icons = require("halfdan.icons").borders
|
||||||
|
--- @type BorderIcons
|
||||||
|
local border = vim.tbl_deep_extend("force", border_icons[type or "empty"], opts or {})
|
||||||
|
|
||||||
|
local borderchars = {}
|
||||||
|
|
||||||
|
local extractDirections = (function()
|
||||||
|
local index = 1
|
||||||
|
return function()
|
||||||
|
if index == nil then
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
-- Find the next occurence of `char`
|
||||||
|
local nextIndex = string.find(order, "-", index)
|
||||||
|
-- Extract the first direction
|
||||||
|
local direction = string.sub(order, index, nextIndex and nextIndex - 1)
|
||||||
|
-- Update the index to nextIndex
|
||||||
|
index = nextIndex and nextIndex + 1 or nil
|
||||||
|
return direction
|
||||||
|
end
|
||||||
|
end)()
|
||||||
|
|
||||||
|
local mappings = {
|
||||||
|
t = "top",
|
||||||
|
r = "right",
|
||||||
|
b = "bottom",
|
||||||
|
l = "left",
|
||||||
|
tl = "top_left",
|
||||||
|
tr = "top_right",
|
||||||
|
br = "bottom_right",
|
||||||
|
bl = "bottom_left",
|
||||||
|
}
|
||||||
|
local direction = extractDirections()
|
||||||
|
while direction do
|
||||||
|
if mappings[direction] == nil then
|
||||||
|
M.notify(string.format("Invalid direction '%s'", direction), "error")
|
||||||
|
end
|
||||||
|
borderchars[#borderchars + 1] = border[mappings[direction]]
|
||||||
|
direction = extractDirections()
|
||||||
|
end
|
||||||
|
|
||||||
|
if #borderchars ~= 8 then
|
||||||
|
M.notify(string.format("Invalid order '%s'", order), "error")
|
||||||
|
end
|
||||||
|
|
||||||
|
return borderchars
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
@@ -1,117 +0,0 @@
|
|||||||
vim.g.mapleader = ' '
|
|
||||||
|
|
||||||
-- TODO find better place
|
|
||||||
vim.g.floaterm_open_command = 'vsplit'
|
|
||||||
--vim.g.floaterm_position = 'bottom'
|
|
||||||
|
|
||||||
-- better window movement
|
|
||||||
vim.api.nvim_set_keymap('n', '<C-h>', '<C-w>h', {silent = true})
|
|
||||||
vim.api.nvim_set_keymap('n', '<C-j>', '<C-w>j', {silent = true})
|
|
||||||
vim.api.nvim_set_keymap('n', '<C-k>', '<C-w>k', {silent = true})
|
|
||||||
vim.api.nvim_set_keymap('n', '<C-l>', '<C-w>l', {silent = true})
|
|
||||||
|
|
||||||
-- TODO fix this
|
|
||||||
-- Terminal window navigation
|
|
||||||
--vim.cmd([[
|
|
||||||
--tnoremap <C-h> <C-\><C-N><C-w>h
|
|
||||||
--tnoremap <C-j> <C-\><C-N><C-w>j
|
|
||||||
--tnoremap <C-k> <C-\><C-N><C-w>k
|
|
||||||
--tnoremap <C-l> <C-\><C-N><C-w>l
|
|
||||||
--inoremap <C-h> <C-\><C-N><C-w>h
|
|
||||||
--inoremap <C-j> <C-\><C-N><C-w>j
|
|
||||||
--inoremap <C-k> <C-\><C-N><C-w>k
|
|
||||||
--inoremap <C-l> <C-\><C-N><C-w>l
|
|
||||||
--tnoremap <Esc> <C-\><C-n>
|
|
||||||
--]])
|
|
||||||
|
|
||||||
-- resize with arrows
|
|
||||||
vim.api.nvim_set_keymap('n', '<C-Up>', ':resize -2<CR>', {silent = true})
|
|
||||||
vim.api.nvim_set_keymap('n', '<C-Down>', ':resize +2<CR>', {silent = true})
|
|
||||||
vim.api.nvim_set_keymap('n', '<C-Left>', ':vertical resize -2<CR>', {silent = true})
|
|
||||||
vim.api.nvim_set_keymap('n', '<C-Right>', ':vertical resize +2<CR>', {silent = true})
|
|
||||||
|
|
||||||
-- improved keyboard support for navigation (especially terminal)
|
|
||||||
vim.cmd([[
|
|
||||||
nnoremap <leader>h <C-w>h
|
|
||||||
nnoremap <leader>j <C-w>j
|
|
||||||
nnoremap <leader>k <C-w>k
|
|
||||||
nnoremap <leader>l <C-w>l
|
|
||||||
nnoremap <A-h> <C-w>h
|
|
||||||
nnoremap <A-j> <C-w>j
|
|
||||||
nnoremap <A-k> <C-w>k
|
|
||||||
nnoremap <A-l> <C-w>l
|
|
||||||
]])
|
|
||||||
|
|
||||||
-- Change 2 split windows from vert to horiz or horiz to vert
|
|
||||||
vim.cmd([[
|
|
||||||
map <leader>th <C-w>t<C-w>H
|
|
||||||
map <leader>tk <C-w>t<C-w>K
|
|
||||||
]])
|
|
||||||
|
|
||||||
-- Make adjusting split sizes a bit more friendly
|
|
||||||
vim.cmd([[
|
|
||||||
noremap <silent> <C-Left> :vertical resize +3<CR>
|
|
||||||
noremap <silent> <C-Right> :vertical resize -3<CR>
|
|
||||||
noremap <silent> <C-Up> :resize +3<CR>
|
|
||||||
noremap <silent> <C-Down> :resize -3<CR>
|
|
||||||
]])
|
|
||||||
|
|
||||||
-- FloatTerm
|
|
||||||
vim.cmd([[
|
|
||||||
nnoremap <silent> <F9> :FloatermNew --height=0.4 --width=0.98 --wintype=floating --position=bottom --autoclose=2 --title=
|
|
||||||
tnoremap <silent> <F9> <C-\><C-n>:FloatermNew --height=0.4 --width=0.98 --wintype=floating --position=bottom --autoclose=2 --title=
|
|
||||||
nnoremap <silent> <F8> :FloatermPrev<CR>
|
|
||||||
tnoremap <silent> <F8> <C-\><C-n>:FloatermPrev<CR>
|
|
||||||
nnoremap <silent> <F10> :FloatermNext<CR>
|
|
||||||
tnoremap <silent> <F10> <C-\><C-n>:FloatermNext<CR>
|
|
||||||
inoremap <silent> <F11> <C-c>:FloatermToggle<CR>
|
|
||||||
nnoremap <silent> <F11> :FloatermToggle<CR>
|
|
||||||
tnoremap <silent> <F11> <C-\><C-n>:FloatermToggle<CR>
|
|
||||||
tnoremap <silent> <M-o> <C-\><C-n><CR>
|
|
||||||
nnoremap <C-c><C-c> :FloatermSend<CR>
|
|
||||||
vnoremap <C-c><C-c> :FloatermSend<CR>
|
|
||||||
]])
|
|
||||||
|
|
||||||
-- -- Compe
|
|
||||||
-- vim.cmd([[
|
|
||||||
-- inoremap <silent><expr> <C-Space> compe#complete()
|
|
||||||
-- inoremap <silent><expr> <CR> compe#confirm('<CR>')
|
|
||||||
-- inoremap <silent><expr> <C-e> compe#close('<C-e>')
|
|
||||||
-- inoremap <silent><expr> <C-f> compe#scroll({ 'delta': +4 })
|
|
||||||
-- inoremap <silent><expr> <C-d> compe#scroll({ 'delta': -4 })
|
|
||||||
-- ]])
|
|
||||||
|
|
||||||
|
|
||||||
-- better indenting
|
|
||||||
vim.api.nvim_set_keymap('v', '<', '<gv', {noremap = true, silent = true})
|
|
||||||
vim.api.nvim_set_keymap('v', '>', '>gv', {noremap = true, silent = true})
|
|
||||||
|
|
||||||
-- I hate escape
|
|
||||||
vim.api.nvim_set_keymap('i', 'jk', '<ESC>', {noremap = true, silent = true})
|
|
||||||
vim.api.nvim_set_keymap('i', 'kj', '<ESC>', {noremap = true, silent = true})
|
|
||||||
vim.api.nvim_set_keymap('i', 'jj', '<ESC>', {noremap = true, silent = true})
|
|
||||||
|
|
||||||
-- Tab switch buffer
|
|
||||||
vim.api.nvim_set_keymap('n', '<TAB>', ':bnext<CR>', {noremap = true, silent = true})
|
|
||||||
vim.api.nvim_set_keymap('n', '<S-TAB>', ':bprevious<CR>', {noremap = true, silent = true})
|
|
||||||
|
|
||||||
-- Move selected line / block of text in visual mode
|
|
||||||
vim.api.nvim_set_keymap('x', 'K', ':move \'<-2<CR>gv-gv', {noremap = true, silent = true})
|
|
||||||
vim.api.nvim_set_keymap('x', 'J', ':move \'>+1<CR>gv-gv', {noremap = true, silent = true})
|
|
||||||
|
|
||||||
|
|
||||||
-- vim.cmd([[
|
|
||||||
-- if !exists('g:vscode')
|
|
||||||
-- " Automatic formatting for Julia files
|
|
||||||
-- autocmd FileType julia nnoremap <buffer> <c-f> :JuliaFormatterFormat<cr>
|
|
||||||
|
|
||||||
-- " Maps quit
|
|
||||||
-- noremap <leader>q :q<cr>
|
|
||||||
|
|
||||||
-- " Maps quit all
|
|
||||||
-- noremap <c-q> :qa<cr>
|
|
||||||
|
|
||||||
-- " Maps write
|
|
||||||
-- nnoremap <leader>w :w<cr>
|
|
||||||
-- end
|
|
||||||
-- ]])
|
|
@@ -1,6 +0,0 @@
|
|||||||
-- npm install -g dockerfile-language-server-nodejs
|
|
||||||
require'lspconfig'.dockerls.setup {
|
|
||||||
cmd = {DATA_PATH .. "/lspinstall/dockerfile/node_modules/.bin/docker-langserver", "--stdio"},
|
|
||||||
on_attach = require'lsp'.common_on_attach,
|
|
||||||
root_dir = vim.loop.cwd
|
|
||||||
}
|
|
@@ -1,10 +0,0 @@
|
|||||||
require'lspconfig'.elixirls.setup{
|
|
||||||
cmd = { DATA_PATH .. "/lspinstall/elixir/elixir-ls/language_server.sh"};
|
|
||||||
}
|
|
||||||
|
|
||||||
-- needed for the LSP to recognize elixir files (alternativly just use elixir-editors/vim-elixir)
|
|
||||||
vim.cmd([[
|
|
||||||
au BufRead,BufNewFile *.ex,*.exs set filetype=elixir
|
|
||||||
au BufRead,BufNewFile *.eex,*.leex,*.sface set filetype=eelixir
|
|
||||||
au BufRead,BufNewFile mix.lock set filetype=elixir
|
|
||||||
]])
|
|
@@ -1,7 +0,0 @@
|
|||||||
require'lspconfig'.gopls.setup{
|
|
||||||
cmd = {DATA_PATH .. "/lspinstall/go/gopls"},
|
|
||||||
settings = {gopls = {analyses = {unusedparams = true}, staticcheck = true}},
|
|
||||||
root_dir = require'lspconfig'.util.root_pattern(".git","go.mod","."),
|
|
||||||
init_options = {usePlaceholders = true, completeUnimported = true},
|
|
||||||
on_attach = require'lsp'.common_on_attach
|
|
||||||
}
|
|
@@ -1,111 +0,0 @@
|
|||||||
-- TODO figure out why this don't work
|
|
||||||
vim.fn.sign_define(
|
|
||||||
"LspDiagnosticsSignError",
|
|
||||||
{texthl = "LspDiagnosticsSignError", text = "", numhl = "LspDiagnosticsSignError"}
|
|
||||||
)
|
|
||||||
vim.fn.sign_define(
|
|
||||||
"LspDiagnosticsSignWarning",
|
|
||||||
{texthl = "LspDiagnosticsSignWarning", text = "", numhl = "LspDiagnosticsSignWarning"}
|
|
||||||
)
|
|
||||||
vim.fn.sign_define(
|
|
||||||
"LspDiagnosticsSignHint",
|
|
||||||
{texthl = "LspDiagnosticsSignHint", text = "", numhl = "LspDiagnosticsSignHint"}
|
|
||||||
)
|
|
||||||
vim.fn.sign_define(
|
|
||||||
"LspDiagnosticsSignInformation",
|
|
||||||
{texthl = "LspDiagnosticsSignInformation", text = "", numhl = "LspDiagnosticsSignInformation"}
|
|
||||||
)
|
|
||||||
|
|
||||||
vim.cmd("nnoremap <silent> gd <cmd>lua vim.lsp.buf.definition()<CR>")
|
|
||||||
vim.cmd("nnoremap <silent> gD <cmd>lua vim.lsp.buf.declaration()<CR>")
|
|
||||||
vim.cmd("nnoremap <silent> gr <cmd>lua vim.lsp.buf.references()<CR>")
|
|
||||||
vim.cmd("nnoremap <silent> gi <cmd>lua vim.lsp.buf.implementation()<CR>")
|
|
||||||
vim.cmd("nnoremap <silent> ca :Lspsaga code_action<CR>")
|
|
||||||
vim.cmd("nnoremap <silent> K :Lspsaga hover_doc<CR>")
|
|
||||||
vim.cmd('nnoremap <silent> <C-k> <cmd>lua vim.lsp.buf.signature_help()<CR>')
|
|
||||||
vim.cmd("nnoremap <silent> <C-p> :Lspsaga diagnostic_jump_prev<CR>")
|
|
||||||
vim.cmd("nnoremap <silent> <C-n> :Lspsaga diagnostic_jump_next<CR>")
|
|
||||||
-- -- scroll down hover doc or scroll in definition preview
|
|
||||||
vim.cmd("nnoremap <silent> <C-f> <cmd>ua require('lspsaga.action').smart_scroll_with_saga(1)<CR>")
|
|
||||||
-- -- scroll up hover doc
|
|
||||||
vim.cmd("nnoremap <silent> <C-b> <cmd>lua require('lspsaga.action').smart_scroll_with_saga(-1)<CR>")
|
|
||||||
vim.cmd('command! -nargs=0 LspVirtualTextToggle lua require("lsp/virtual_text").toggle()')
|
|
||||||
|
|
||||||
-- Set Default Prefix.
|
|
||||||
-- Note: You can set a prefix per lsp server in the lv-globals.lua file
|
|
||||||
vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(
|
|
||||||
vim.lsp.diagnostic.on_publish_diagnostics, {
|
|
||||||
virtual_text = {
|
|
||||||
prefix = "",
|
|
||||||
spacing = 1,
|
|
||||||
},
|
|
||||||
signs = true,
|
|
||||||
underline = true,
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
-- symbols for autocomplete
|
|
||||||
vim.lsp.protocol.CompletionItemKind = {
|
|
||||||
" (Text) ",
|
|
||||||
" (Method)",
|
|
||||||
" (Function)",
|
|
||||||
" (Constructor)",
|
|
||||||
" ﴲ (Field)",
|
|
||||||
"[] (Variable)",
|
|
||||||
" (Class)",
|
|
||||||
" ﰮ (Interface)",
|
|
||||||
" (Module)",
|
|
||||||
" 襁 (Property)",
|
|
||||||
" (Unit)",
|
|
||||||
" (Value)",
|
|
||||||
" 練 (Enum)",
|
|
||||||
" (Keyword)",
|
|
||||||
" (Snippet)",
|
|
||||||
" (Color)",
|
|
||||||
" (File)",
|
|
||||||
" (Reference)",
|
|
||||||
" (Folder)",
|
|
||||||
" (EnumMember)",
|
|
||||||
" ﲀ (Constant)",
|
|
||||||
" ﳤ (Struct)",
|
|
||||||
" (Event)",
|
|
||||||
" (Operator)",
|
|
||||||
" (TypeParameter)"
|
|
||||||
}
|
|
||||||
|
|
||||||
vim.cmd("autocmd BufWritePre *.go :silent! lua require('go.format').gofmt()")
|
|
||||||
|
|
||||||
local function documentHighlight(client, bufnr)
|
|
||||||
-- Set autocommands conditional on server_capabilities
|
|
||||||
if client.resolved_capabilities.document_highlight then
|
|
||||||
vim.api.nvim_exec(
|
|
||||||
[[
|
|
||||||
hi LspReferenceRead cterm=bold ctermbg=red guibg=#464646
|
|
||||||
hi LspReferenceText cterm=bold ctermbg=red guibg=#464646
|
|
||||||
hi LspReferenceWrite cterm=bold ctermbg=red guibg=#464646
|
|
||||||
augroup lsp_document_highlight
|
|
||||||
autocmd! * <buffer>
|
|
||||||
autocmd CursorHold <buffer> lua vim.lsp.buf.document_highlight()
|
|
||||||
autocmd CursorMoved <buffer> lua vim.lsp.buf.clear_references()
|
|
||||||
augroup END
|
|
||||||
]],
|
|
||||||
false
|
|
||||||
)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
local lsp_config = {}
|
|
||||||
|
|
||||||
function lsp_config.common_on_attach(client, bufnr)
|
|
||||||
documentHighlight(client, bufnr)
|
|
||||||
end
|
|
||||||
|
|
||||||
function lsp_config.tsserver_on_attach(client, bufnr)
|
|
||||||
lsp_config.common_on_attach(client, bufnr)
|
|
||||||
client.resolved_capabilities.document_formatting = false
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Use a loop to conveniently both setup defined servers
|
|
||||||
-- and map buffer local keybindings when the language server attaches
|
|
||||||
-- local servers = {"pyright", "tsserver"}
|
|
||||||
-- for _, lsp in ipairs(servers) do nvim_lsp[lsp].setup {on_attach = on_attach} end
|
|
||||||
return lsp_config
|
|
@@ -1,16 +0,0 @@
|
|||||||
-- npm install -g vscode-json-languageserver
|
|
||||||
require'lspconfig'.jsonls.setup {
|
|
||||||
cmd = {
|
|
||||||
"node", DATA_PATH .. "/lspinstall/json/vscode-json/json-language-features/server/dist/node/jsonServerMain.js",
|
|
||||||
"--stdio"
|
|
||||||
},
|
|
||||||
on_attach = require'lsp'.common_on_attach,
|
|
||||||
|
|
||||||
commands = {
|
|
||||||
Format = {
|
|
||||||
function()
|
|
||||||
vim.lsp.buf.range_formatting({}, {0, 0}, {vim.fn.line("$"), 0})
|
|
||||||
end
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,3 +0,0 @@
|
|||||||
require'lspconfig'.julials.setup{
|
|
||||||
on_attach = require'lsp'.common_on_attach
|
|
||||||
}
|
|
@@ -1,22 +0,0 @@
|
|||||||
-- npm i -g pyright
|
|
||||||
require'lspconfig'.pyright.setup {
|
|
||||||
cmd = {DATA_PATH .. "/lspinstall/python/node_modules/.bin/pyright-langserver", "--stdio"},
|
|
||||||
on_attach = require'lsp'.common_on_attach,
|
|
||||||
handlers = {
|
|
||||||
["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, {
|
|
||||||
virtual_text = O.python.diagnostics.virtual_text,
|
|
||||||
signs = O.python.diagnostics.signs,
|
|
||||||
underline = O.python.diagnostics.underline,
|
|
||||||
update_in_insert = true
|
|
||||||
})
|
|
||||||
},
|
|
||||||
settings = {
|
|
||||||
python = {
|
|
||||||
analysis = {
|
|
||||||
typeCheckingMode = O.python.analysis.type_checking,
|
|
||||||
autoSearchPaths = O.python.analysis.auto_search_paths,
|
|
||||||
useLibraryCodeForTypes = O.python.analysis.use_library_code_types
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,4 +0,0 @@
|
|||||||
require'lspconfig'.terraformls.setup{
|
|
||||||
cmd = {DATA_PATH .. "/lspinstall/terraform/terraform-ls", "serve"},
|
|
||||||
on_attach = require'lsp'.common_on_attach
|
|
||||||
}
|
|
@@ -1,137 +0,0 @@
|
|||||||
local execute = vim.api.nvim_command
|
|
||||||
local fn = vim.fn
|
|
||||||
|
|
||||||
local install_path = fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim"
|
|
||||||
|
|
||||||
if fn.empty(fn.glob(install_path)) > 0 then
|
|
||||||
execute("!git clone https://github.com/wbthomason/packer.nvim " .. install_path)
|
|
||||||
execute "packadd packer.nvim"
|
|
||||||
end
|
|
||||||
|
|
||||||
--- Check if a file or directory exists in this path
|
|
||||||
local function require_plugin(plugin)
|
|
||||||
local plugin_prefix = fn.stdpath("data") .. "/site/pack/packer/opt/"
|
|
||||||
|
|
||||||
local plugin_path = plugin_prefix .. plugin .. "/"
|
|
||||||
-- print('test '..plugin_path)
|
|
||||||
local ok, err, code = os.rename(plugin_path, plugin_path)
|
|
||||||
if not ok then
|
|
||||||
if code == 13 then
|
|
||||||
-- Permission denied, but it exists
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
-- print(ok, err, code)
|
|
||||||
if ok then
|
|
||||||
vim.cmd("packadd " .. plugin)
|
|
||||||
end
|
|
||||||
return ok, err, code
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.cmd "autocmd BufWritePost plugins.lua PackerCompile" -- Auto compile when there are changes in plugins.lua
|
|
||||||
|
|
||||||
return require("packer").startup(
|
|
||||||
function(use)
|
|
||||||
-- Packer can manage itself as an optional plugin
|
|
||||||
use "wbthomason/packer.nvim"
|
|
||||||
|
|
||||||
use {'airblade/vim-gitgutter'}
|
|
||||||
-- use {'andymass/vim-matchup'}
|
|
||||||
|
|
||||||
-- Load .editorconfig files
|
|
||||||
use {'editorconfig/editorconfig-vim'}
|
|
||||||
|
|
||||||
use {'junegunn/vim-easy-align'}
|
|
||||||
|
|
||||||
-- Goodies
|
|
||||||
use {'tpope/vim-fugitive'}
|
|
||||||
use {'tpope/vim-surround'} -- ✅
|
|
||||||
|
|
||||||
-- Treesitter
|
|
||||||
use {"nvim-treesitter/nvim-treesitter", run = ":TSUpdate"}
|
|
||||||
|
|
||||||
use {'preservim/tagbar'}
|
|
||||||
vim.g.tagbar_ctags_bin = '/usr/local/bin/ctags'
|
|
||||||
|
|
||||||
-- Status Line and Bufferline
|
|
||||||
use {
|
|
||||||
'nvim-lualine/lualine.nvim',
|
|
||||||
requires = {'kyazdani42/nvim-web-devicons'}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
use {'justinmk/vim-sneak'}
|
|
||||||
|
|
||||||
use {'machakann/vim-highlightedyank'}
|
|
||||||
-- let g:highlightedyank_highlight_duration = 100
|
|
||||||
|
|
||||||
-- Easy commenting for Vim
|
|
||||||
use {'preservim/nerdcommenter'}
|
|
||||||
|
|
||||||
-- NERD Tree - tree explorer
|
|
||||||
-- https://github.com/scrooloose/nerdtree
|
|
||||||
-- http://usevim.com/2012/07/18/nerdtree/
|
|
||||||
-- (loaded on first invocation of the command)
|
|
||||||
use {
|
|
||||||
'preservim/nerdtree',
|
|
||||||
requires = {'ryanoasis/vim-devicons'}
|
|
||||||
}
|
|
||||||
|
|
||||||
-- nerdtree-git-plugin - show git status in NERD Tree
|
|
||||||
-- https://github.com/Xuyuanp/nerdtree-git-plugi
|
|
||||||
use {'Xuyuanp/nerdtree-git-plugin'}
|
|
||||||
|
|
||||||
|
|
||||||
-- LSP / Language Server Protocol
|
|
||||||
use {'neovim/nvim-lspconfig'}
|
|
||||||
--use {'hrsh7th/nvim-compe'}
|
|
||||||
|
|
||||||
use {'hrsh7th/cmp-nvim-lsp'}
|
|
||||||
use {'hrsh7th/cmp-buffer'}
|
|
||||||
use {'hrsh7th/cmp-path'}
|
|
||||||
use {'hrsh7th/cmp-cmdline'}
|
|
||||||
use {'hrsh7th/nvim-cmp'}
|
|
||||||
|
|
||||||
-- use {'glepnir/lspsaga.nvim'} -- Has a bug
|
|
||||||
use {'tami5/lspsaga.nvim'}
|
|
||||||
use {'kabouzeid/nvim-lspinstall'}
|
|
||||||
use {'nvim-lua/lsp-status.nvim'}
|
|
||||||
use {'simrat39/symbols-outline.nvim'}
|
|
||||||
|
|
||||||
-- Terminal in floating window
|
|
||||||
use {'voldikss/vim-floaterm'}
|
|
||||||
|
|
||||||
-- Telescope fuzzy find files/grep
|
|
||||||
use {'nvim-lua/popup.nvim'}
|
|
||||||
use {'nvim-lua/plenary.nvim'}
|
|
||||||
use {'nvim-telescope/telescope.nvim'}
|
|
||||||
use {'nvim-telescope/telescope-project.nvim'}
|
|
||||||
|
|
||||||
-- Which Key
|
|
||||||
use {'folke/which-key.nvim'}
|
|
||||||
|
|
||||||
-- => Language Support
|
|
||||||
use {'neoclide/jsonc.vim'}
|
|
||||||
|
|
||||||
use {'ray-x/go.nvim'}
|
|
||||||
|
|
||||||
-- use {'vim-python/python-syntax', ft={'python'}, opt=true}
|
|
||||||
-- let g:python_highlight_all = 1
|
|
||||||
|
|
||||||
use {'JuliaEditorSupport/julia-vim', opt=true}
|
|
||||||
vim.g.latex_to_unicode_auto = 1
|
|
||||||
|
|
||||||
-- Formatting Julia Files
|
|
||||||
use {'kdheepak/JuliaFormatter.vim'}
|
|
||||||
|
|
||||||
-- themes & colorschemes
|
|
||||||
use {'dracula/vim', as='dracula' }
|
|
||||||
use { "briones-gabriel/darcula-solid.nvim", requires = "rktjmp/lush.nvim" }
|
|
||||||
use {'shaunsingh/moonlight.nvim', as='moonlight'}
|
|
||||||
use {'arcticicestudio/nord-vim'}
|
|
||||||
use {'joshdick/onedark.vim'}
|
|
||||||
use {'sainnhe/everforest'}
|
|
||||||
|
|
||||||
require_plugin('julia-vim')
|
|
||||||
end
|
|
||||||
)
|
|
@@ -1,53 +0,0 @@
|
|||||||
local cmp = require'cmp'
|
|
||||||
|
|
||||||
cmp.setup({
|
|
||||||
-- snippet = {
|
|
||||||
-- -- REQUIRED - you must specify a snippet engine
|
|
||||||
-- expand = function(args)
|
|
||||||
-- vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users.
|
|
||||||
-- -- require('luasnip').lsp_expand(args.body) -- For `luasnip` users.
|
|
||||||
-- -- vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users.
|
|
||||||
-- -- require'snippy'.expand_snippet(args.body) -- For `snippy` users.
|
|
||||||
-- end,
|
|
||||||
-- },
|
|
||||||
mapping = {
|
|
||||||
['<C-b>'] = cmp.mapping(cmp.mapping.scroll_docs(-4), { 'i', 'c' }),
|
|
||||||
['<C-f>'] = cmp.mapping(cmp.mapping.scroll_docs(4), { 'i', 'c' }),
|
|
||||||
['<C-Space>'] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c' }),
|
|
||||||
['<C-y>'] = cmp.config.disable, -- Specify `cmp.config.disable` if you want to remove the default `<C-y>` mapping.
|
|
||||||
['<C-e>'] = cmp.mapping({
|
|
||||||
i = cmp.mapping.abort(),
|
|
||||||
c = cmp.mapping.close(),
|
|
||||||
}),
|
|
||||||
['<CR>'] = cmp.mapping.confirm({ select = true }),
|
|
||||||
},
|
|
||||||
sources = cmp.config.sources({
|
|
||||||
{ name = 'nvim_lsp' },
|
|
||||||
-- { name = 'vsnip' }, -- For vsnip users.
|
|
||||||
-- { name = 'luasnip' }, -- For luasnip users.
|
|
||||||
-- { name = 'ultisnips' }, -- For ultisnips users.
|
|
||||||
-- { name = 'snippy' }, -- For snippy users.
|
|
||||||
}, {
|
|
||||||
{ name = 'buffer' },
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore).
|
|
||||||
cmp.setup.cmdline('/', {
|
|
||||||
sources = {
|
|
||||||
{ name = 'buffer' }
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
|
|
||||||
cmp.setup.cmdline(':', {
|
|
||||||
sources = cmp.config.sources({
|
|
||||||
{ name = 'path' }
|
|
||||||
}, {
|
|
||||||
{ name = 'cmdline' }
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Setup lspconfig.
|
|
||||||
local capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities())
|
|
||||||
capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities)
|
|
@@ -1,70 +0,0 @@
|
|||||||
vim.o.completeopt = "menuone,noselect"
|
|
||||||
|
|
||||||
require'compe'.setup {
|
|
||||||
enabled = true;
|
|
||||||
autocomplete = true;
|
|
||||||
debug = false;
|
|
||||||
min_length = 1;
|
|
||||||
preselect = 'enable';
|
|
||||||
throttle_time = 80;
|
|
||||||
source_timeout = 200;
|
|
||||||
incomplete_delay = 400;
|
|
||||||
max_abbr_width = 100;
|
|
||||||
max_kind_width = 100;
|
|
||||||
max_menu_width = 100;
|
|
||||||
documentation = true;
|
|
||||||
|
|
||||||
source = {
|
|
||||||
path = true;
|
|
||||||
buffer = true;
|
|
||||||
calc = true;
|
|
||||||
vsnip = false;
|
|
||||||
nvim_lsp = true;
|
|
||||||
nvim_lua = true;
|
|
||||||
spell = true;
|
|
||||||
tags = true;
|
|
||||||
snippets_nvim = true;
|
|
||||||
treesitter = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
local t = function(str)
|
|
||||||
return vim.api.nvim_replace_termcodes(str, true, true, true)
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
local check_back_space = function()
|
|
||||||
local col = vim.fn.col('.') - 1
|
|
||||||
if col == 0 or vim.fn.getline('.'):sub(col, col):match('%s') then
|
|
||||||
return true
|
|
||||||
else
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
_G.tab_complete = function()
|
|
||||||
if vim.fn.pumvisible() == 1 then
|
|
||||||
return t "<C-n>"
|
|
||||||
--elseif vim.fn.call("vsnip#available", {1}) == 1 then
|
|
||||||
--return t "<Plug>(vsnip-expand-or-jump)"
|
|
||||||
elseif check_back_space() then
|
|
||||||
return t "<Tab>"
|
|
||||||
else
|
|
||||||
return vim.fn['compe#complete']()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
_G.s_tab_complete = function()
|
|
||||||
if vim.fn.pumvisible() == 1 then
|
|
||||||
return t "<C-p>"
|
|
||||||
--elseif vim.fn.call("vsnip#jumpable", {-1}) == 1 then
|
|
||||||
--return t "<Plug>(vsnip-jump-prev)"
|
|
||||||
else
|
|
||||||
return t "<S-Tab>"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.api.nvim_set_keymap("i", "<Tab>", "v:lua.tab_complete()", {noremap = true, expr = true})
|
|
||||||
vim.api.nvim_set_keymap("s", "<Tab>", "v:lua.tab_complete()", {noremap = true, expr = true})
|
|
||||||
vim.api.nvim_set_keymap("i", "<S-Tab>", "v:lua.s_tab_complete()", {noremap = true, expr = true})
|
|
||||||
vim.api.nvim_set_keymap("s", "<S-Tab>", "v:lua.s_tab_complete()", {noremap = true, expr = true})
|
|
@@ -1,231 +0,0 @@
|
|||||||
local vim = vim
|
|
||||||
local gl = require('galaxyline')
|
|
||||||
local utils = require('utils')
|
|
||||||
|
|
||||||
local gls = gl.section
|
|
||||||
gl.short_line_list = { 'defx', 'packager', 'vista' }
|
|
||||||
|
|
||||||
-- Colors
|
|
||||||
local colors = {
|
|
||||||
bg = '#282a36',
|
|
||||||
fg = '#f8f8f2',
|
|
||||||
section_bg = '#38393f',
|
|
||||||
yellow = '#f1fa8c',
|
|
||||||
cyan = '#8be9fd',
|
|
||||||
green = '#50fa7b',
|
|
||||||
orange = '#ffb86c',
|
|
||||||
magenta = '#ff79c6',
|
|
||||||
blue = '#8be9fd',
|
|
||||||
red = '#ff5555'
|
|
||||||
}
|
|
||||||
|
|
||||||
-- Local helper functions
|
|
||||||
local buffer_not_empty = function()
|
|
||||||
return not utils.is_buffer_empty()
|
|
||||||
end
|
|
||||||
|
|
||||||
local in_git_repo = function ()
|
|
||||||
local vcs = require('galaxyline.provider_vcs')
|
|
||||||
local branch_name = vcs.get_git_branch()
|
|
||||||
|
|
||||||
return branch_name ~= nil
|
|
||||||
end
|
|
||||||
|
|
||||||
local checkwidth = function()
|
|
||||||
return utils.has_width_gt(40) and in_git_repo()
|
|
||||||
end
|
|
||||||
|
|
||||||
local mode_color = function()
|
|
||||||
local mode_colors = {
|
|
||||||
n = colors.cyan,
|
|
||||||
i = colors.green,
|
|
||||||
c = colors.orange,
|
|
||||||
V = colors.magenta,
|
|
||||||
[''] = colors.magenta,
|
|
||||||
v = colors.magenta,
|
|
||||||
R = colors.red,
|
|
||||||
}
|
|
||||||
|
|
||||||
local color = mode_colors[vim.fn.mode()]
|
|
||||||
|
|
||||||
if color == nil then
|
|
||||||
color = colors.red
|
|
||||||
end
|
|
||||||
|
|
||||||
return color
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Left side
|
|
||||||
gls.left[1] = {
|
|
||||||
FirstElement = {
|
|
||||||
provider = function() return '▋' end,
|
|
||||||
highlight = { colors.cyan, colors.section_bg }
|
|
||||||
},
|
|
||||||
}
|
|
||||||
gls.left[2] = {
|
|
||||||
ViMode = {
|
|
||||||
provider = function()
|
|
||||||
local alias = {
|
|
||||||
n = 'NORMAL',
|
|
||||||
i = 'INSERT',
|
|
||||||
c = 'COMMAND',
|
|
||||||
V = 'VISUAL',
|
|
||||||
[''] = 'VISUAL',
|
|
||||||
v = 'VISUAL',
|
|
||||||
R = 'REPLACE',
|
|
||||||
}
|
|
||||||
vim.api.nvim_command('hi GalaxyViMode guifg='..mode_color())
|
|
||||||
local alias_mode = alias[vim.fn.mode()]
|
|
||||||
if alias_mode == nil then
|
|
||||||
alias_mode = vim.fn.mode()
|
|
||||||
end
|
|
||||||
return alias_mode..' '
|
|
||||||
end,
|
|
||||||
highlight = { colors.bg, colors.bg },
|
|
||||||
separator = " ",
|
|
||||||
separator_highlight = {colors.bg, colors.section_bg},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
gls.left[3] ={
|
|
||||||
FileIcon = {
|
|
||||||
provider = 'FileIcon',
|
|
||||||
condition = buffer_not_empty,
|
|
||||||
highlight = { require('galaxyline.provider_fileinfo').get_file_icon_color, colors.section_bg },
|
|
||||||
},
|
|
||||||
}
|
|
||||||
gls.left[4] = {
|
|
||||||
FileName = {
|
|
||||||
provider = 'FileName',
|
|
||||||
condition = buffer_not_empty,
|
|
||||||
highlight = { colors.fg, colors.section_bg },
|
|
||||||
separator = " ",
|
|
||||||
separator_highlight = {colors.section_bg, colors.bg},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
gls.left[5] = {
|
|
||||||
GitIcon = {
|
|
||||||
provider = function() return ' ' end,
|
|
||||||
condition = in_git_repo,
|
|
||||||
highlight = {colors.red,colors.bg},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
gls.left[6] = {
|
|
||||||
GitBranch = {
|
|
||||||
provider = function()
|
|
||||||
local vcs = require('galaxyline.provider_vcs')
|
|
||||||
local branch_name = vcs.get_git_branch()
|
|
||||||
if (string.len(branch_name) > 28) then
|
|
||||||
return string.sub(branch_name, 1, 25).."..."
|
|
||||||
end
|
|
||||||
return branch_name .. " "
|
|
||||||
end,
|
|
||||||
condition = in_git_repo,
|
|
||||||
highlight = {colors.fg,colors.bg},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
gls.left[7] = {
|
|
||||||
DiffAdd = {
|
|
||||||
provider = 'DiffAdd',
|
|
||||||
condition = checkwidth,
|
|
||||||
icon = ' ',
|
|
||||||
highlight = { colors.green, colors.bg },
|
|
||||||
}
|
|
||||||
}
|
|
||||||
gls.left[8] = {
|
|
||||||
DiffModified = {
|
|
||||||
provider = 'DiffModified',
|
|
||||||
condition = checkwidth,
|
|
||||||
icon = ' ',
|
|
||||||
highlight = { colors.orange, colors.bg },
|
|
||||||
}
|
|
||||||
}
|
|
||||||
gls.left[9] = {
|
|
||||||
DiffRemove = {
|
|
||||||
provider = 'DiffRemove',
|
|
||||||
condition = checkwidth,
|
|
||||||
icon = ' ',
|
|
||||||
highlight = { colors.red,colors.bg },
|
|
||||||
}
|
|
||||||
}
|
|
||||||
gls.left[10] = {
|
|
||||||
LeftEnd = {
|
|
||||||
provider = function() return ' ' end,
|
|
||||||
condition = buffer_not_empty,
|
|
||||||
highlight = {colors.section_bg,colors.bg}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
gls.left[11] = {
|
|
||||||
DiagnosticError = {
|
|
||||||
provider = 'DiagnosticError',
|
|
||||||
icon = ' ',
|
|
||||||
highlight = {colors.red,colors.section_bg}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
gls.left[12] = {
|
|
||||||
Space = {
|
|
||||||
provider = function () return ' ' end,
|
|
||||||
highlight = {colors.section_bg,colors.section_bg},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
gls.left[13] = {
|
|
||||||
DiagnosticWarn = {
|
|
||||||
provider = 'DiagnosticWarn',
|
|
||||||
icon = ' ',
|
|
||||||
highlight = {colors.orange,colors.section_bg},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
gls.left[14] = {
|
|
||||||
Space = {
|
|
||||||
provider = function () return ' ' end,
|
|
||||||
highlight = {colors.section_bg,colors.section_bg},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
gls.left[15] = {
|
|
||||||
DiagnosticInfo = {
|
|
||||||
provider = 'DiagnosticInfo',
|
|
||||||
icon = ' ',
|
|
||||||
highlight = {colors.blue,colors.section_bg},
|
|
||||||
separator = ' ',
|
|
||||||
separator_highlight = { colors.section_bg, colors.bg },
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
-- Right side
|
|
||||||
gls.right[1]= {
|
|
||||||
FileFormat = {
|
|
||||||
provider = function() return vim.bo.filetype end,
|
|
||||||
highlight = { colors.fg,colors.section_bg },
|
|
||||||
separator = ' ',
|
|
||||||
separator_highlight = { colors.section_bg,colors.bg },
|
|
||||||
}
|
|
||||||
}
|
|
||||||
gls.right[2] = {
|
|
||||||
LineInfo = {
|
|
||||||
provider = 'LineColumn',
|
|
||||||
highlight = { colors.fg, colors.section_bg },
|
|
||||||
separator = ' | ',
|
|
||||||
separator_highlight = { colors.bg, colors.section_bg },
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
-- Short status line
|
|
||||||
gls.short_line_left[1] = {
|
|
||||||
BufferType = {
|
|
||||||
provider = 'FileTypeName',
|
|
||||||
highlight = { colors.fg, colors.section_bg },
|
|
||||||
separator = ' ',
|
|
||||||
separator_highlight = { colors.section_bg, colors.bg },
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
gls.short_line_right[1] = {
|
|
||||||
BufferIcon = {
|
|
||||||
provider= 'BufferIcon',
|
|
||||||
highlight = { colors.yellow, colors.section_bg },
|
|
||||||
separator = ' ',
|
|
||||||
separator_highlight = { colors.section_bg, colors.bg },
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
-- Force manual load so that nvim boots with a status line
|
|
||||||
gl.load_galaxyline()
|
|
@@ -1,27 +0,0 @@
|
|||||||
require'lualine'.setup {
|
|
||||||
options = {
|
|
||||||
icons_enabled = true,
|
|
||||||
theme = 'dracula',
|
|
||||||
--component_separators = {'', ''},
|
|
||||||
--section_separators = {'', ''},
|
|
||||||
disabled_filetypes = {}
|
|
||||||
},
|
|
||||||
sections = {
|
|
||||||
lualine_a = {'mode'},
|
|
||||||
lualine_b = {'branch'},
|
|
||||||
lualine_c = {'filename', require'lsp-status'.status},
|
|
||||||
lualine_x = {'filetype'},
|
|
||||||
lualine_y = {'progress'},
|
|
||||||
lualine_z = {'location'}
|
|
||||||
},
|
|
||||||
inactive_sections = {
|
|
||||||
lualine_a = {},
|
|
||||||
lualine_b = {},
|
|
||||||
lualine_c = {'filename'},
|
|
||||||
lualine_x = {'location'},
|
|
||||||
lualine_y = {},
|
|
||||||
lualine_z = {}
|
|
||||||
},
|
|
||||||
tabline = {},
|
|
||||||
extensions = {}
|
|
||||||
}
|
|
@@ -1,5 +0,0 @@
|
|||||||
vim.cmd([[
|
|
||||||
let g:sneak#label = 1
|
|
||||||
let g:sneak#prompt = '🔎'
|
|
||||||
let g:sneak#s_next = 1
|
|
||||||
]])
|
|
@@ -1 +0,0 @@
|
|||||||
vim.g.tagbar_ctags_bin = '/usr/local/bin/ctags'
|
|
@@ -1,72 +0,0 @@
|
|||||||
local actions = require('telescope.actions')
|
|
||||||
-- Global remapping
|
|
||||||
------------------------------
|
|
||||||
-- '--color=never',
|
|
||||||
require('telescope').setup {
|
|
||||||
defaults = {
|
|
||||||
find_command = {'rg', '--no-heading', '--with-filename', '--line-number', '--column', '--smart-case'},
|
|
||||||
prompt_position = "bottom",
|
|
||||||
--prompt_prefix = " ",
|
|
||||||
prompt_prefix = " ",
|
|
||||||
selection_caret = " ",
|
|
||||||
entry_prefix = " ",
|
|
||||||
initial_mode = "insert",
|
|
||||||
selection_strategy = "reset",
|
|
||||||
sorting_strategy = "descending",
|
|
||||||
layout_strategy = "horizontal",
|
|
||||||
layout_defaults = {horizontal = {mirror = false}, vertical = {mirror = false}},
|
|
||||||
file_sorter = require'telescope.sorters'.get_fuzzy_file,
|
|
||||||
file_ignore_patterns = {},
|
|
||||||
generic_sorter = require'telescope.sorters'.get_generic_fuzzy_sorter,
|
|
||||||
shorten_path = true,
|
|
||||||
winblend = 0,
|
|
||||||
width = 0.75,
|
|
||||||
preview_cutoff = 120,
|
|
||||||
results_height = 1,
|
|
||||||
results_width = 0.8,
|
|
||||||
border = {},
|
|
||||||
borderchars = {'─', '│', '─', '│', '╭', '╮', '╯', '╰'},
|
|
||||||
color_devicons = true,
|
|
||||||
use_less = true,
|
|
||||||
set_env = {['COLORTERM'] = 'truecolor'}, -- default = nil,
|
|
||||||
file_previewer = require'telescope.previewers'.vim_buffer_cat.new,
|
|
||||||
grep_previewer = require'telescope.previewers'.vim_buffer_vimgrep.new,
|
|
||||||
qflist_previewer = require'telescope.previewers'.vim_buffer_qflist.new,
|
|
||||||
|
|
||||||
-- Developer configurations: Not meant for general override
|
|
||||||
buffer_previewer_maker = require'telescope.previewers'.buffer_previewer_maker,
|
|
||||||
mappings = {
|
|
||||||
i = {
|
|
||||||
["<C-j>"] = actions.move_selection_next,
|
|
||||||
["<C-k>"] = actions.move_selection_previous,
|
|
||||||
["<C-q>"] = actions.smart_send_to_qflist + actions.open_qflist,
|
|
||||||
-- To disable a keymap, put [map] = false
|
|
||||||
-- So, to not map "<C-n>", just put
|
|
||||||
-- ["<c-x>"] = false,
|
|
||||||
|
|
||||||
|
|
||||||
-- Otherwise, just set the mapping to the function that you want it to be.
|
|
||||||
-- ["<C-i>"] = actions.select_horizontal,
|
|
||||||
|
|
||||||
-- Add up multiple actions
|
|
||||||
["<CR>"] = actions.select_default + actions.center
|
|
||||||
|
|
||||||
-- You can perform as many actions in a row as you like
|
|
||||||
-- ["<CR>"] = actions.select_default + actions.center + my_cool_custom_action,
|
|
||||||
},
|
|
||||||
n = {
|
|
||||||
["<C-j>"] = actions.move_selection_next,
|
|
||||||
["<C-k>"] = actions.move_selection_previous,
|
|
||||||
["<C-q>"] = actions.smart_send_to_qflist + actions.open_qflist,
|
|
||||||
["<esc>"] = actions.close,
|
|
||||||
-- ["<C-i>"] = my_cool_custom_action,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
extensions = {
|
|
||||||
fzy_native = {
|
|
||||||
override_generic_sorter = false,
|
|
||||||
override_file_sorter = true,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,19 +0,0 @@
|
|||||||
require('nvim-treesitter.configs').setup({
|
|
||||||
ensure_installed = { "python", "go", "julia", "elixir", "rust", "gomod", "json", "lua", "ruby", "yaml" },
|
|
||||||
ignore_install = { "haskell" },
|
|
||||||
highlight = {
|
|
||||||
enable = true
|
|
||||||
},
|
|
||||||
indent = {
|
|
||||||
enable = true
|
|
||||||
},
|
|
||||||
incremental_selection = {
|
|
||||||
enable = true,
|
|
||||||
keymaps = {
|
|
||||||
init_selection = "gnn",
|
|
||||||
node_incremental = "grn",
|
|
||||||
scope_incremental = "grc",
|
|
||||||
node_decremental = "grm",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
@@ -1,131 +0,0 @@
|
|||||||
require("which-key").setup {
|
|
||||||
plugins = {
|
|
||||||
marks = true, -- shows a list of your marks on ' and `
|
|
||||||
registers = true, -- shows your registers on " in NORMAL or <C-r> in INSERT mode
|
|
||||||
-- the presets plugin, adds help for a bunch of default keybindings in Neovim
|
|
||||||
-- No actual key bindings are created
|
|
||||||
presets = {
|
|
||||||
operators = true, -- adds help for operators like d, y, ...
|
|
||||||
motions = true, -- adds help for motions
|
|
||||||
text_objects = true, -- help for text objects triggered after entering an operator
|
|
||||||
windows = true, -- default bindings on <c-w>
|
|
||||||
nav = true, -- misc bindings to work with windows
|
|
||||||
z = true, -- bindings for folds, spelling and others prefixed with z
|
|
||||||
g = true -- bindings for prefixed with g
|
|
||||||
}
|
|
||||||
},
|
|
||||||
icons = {
|
|
||||||
breadcrumb = "»", -- symbol used in the command line area that shows your active key combo
|
|
||||||
separator = "➜", -- symbol used between a key and it's label
|
|
||||||
group = "+" -- symbol prepended to a group
|
|
||||||
},
|
|
||||||
window = {
|
|
||||||
border = "single", -- none, single, double, shadow
|
|
||||||
position = "bottom", -- bottom, top
|
|
||||||
margin = {1, 0, 1, 0}, -- extra window margin [top, right, bottom, left]
|
|
||||||
padding = {2, 2, 2, 2} -- extra window padding [top, right, bottom, left]
|
|
||||||
},
|
|
||||||
layout = {
|
|
||||||
height = {min = 4, max = 25}, -- min and max height of the columns
|
|
||||||
width = {min = 20, max = 50}, -- min and max width of the columns
|
|
||||||
spacing = 3 -- spacing between columns
|
|
||||||
},
|
|
||||||
hidden = {"<silent>", "<cmd>", "<Cmd>", "<CR>", "call", "lua", "^:", "^ "}, -- hide mapping boilerplate
|
|
||||||
show_help = true -- show help message on the command line when the popup is visible
|
|
||||||
}
|
|
||||||
|
|
||||||
local opts = {
|
|
||||||
mode = "n", -- NORMAL mode
|
|
||||||
prefix = "<leader>",
|
|
||||||
buffer = nil, -- Global mappings. Specify a buffer number for buffer local mappings
|
|
||||||
silent = true, -- use `silent` when creating keymaps
|
|
||||||
noremap = true, -- use `noremap` when creating keymaps
|
|
||||||
nowait = false -- use `nowait` when creating keymaps
|
|
||||||
}
|
|
||||||
|
|
||||||
-- Set leader
|
|
||||||
vim.api.nvim_set_keymap('n', '<Space>', '<NOP>', {noremap = true, silent = true})
|
|
||||||
vim.g.mapleader = ' '
|
|
||||||
|
|
||||||
-- explorer
|
|
||||||
vim.api.nvim_set_keymap('n', '<Leader>e', ':NERDTreeToggle<CR>', {noremap = true, silent = true})
|
|
||||||
|
|
||||||
-- TODO create entire treesitter section
|
|
||||||
|
|
||||||
local mappings = {
|
|
||||||
["e"] = "Explorer",
|
|
||||||
["c"] = "NERDCommenter",
|
|
||||||
b = {
|
|
||||||
name = "+Buffers",
|
|
||||||
b = {"<C-^>", "Toggle Buffer"},
|
|
||||||
d = {"<cmd>bd<cr>", "Close Buffer"},
|
|
||||||
k = {"<cmd>bd!<cr>", "Kill Buffer"},
|
|
||||||
},
|
|
||||||
f = {
|
|
||||||
name = "Find",
|
|
||||||
f = {"<cmd>Telescope find_files<cr>", "Find File"},
|
|
||||||
p = {"<cmd>lua require'telescope'.extensions.project.project{}<CR>", "Project"},
|
|
||||||
g = {"<cmd>lua require'telescope.builtin'.live_grep()<cr>", "Grep files"},
|
|
||||||
b = {"<cmd>lua require'telescope.builtin'.buffers{}<cr>", "Buffers"},
|
|
||||||
t = {"<cmd>lua require'telescope.builtin'.help_tags{}<cr>", "Tags"},
|
|
||||||
},
|
|
||||||
g = {
|
|
||||||
name = "+Git",
|
|
||||||
j = {"<cmd>GitGutterNextHunk<cr>", "Next Hunk"},
|
|
||||||
k = {"<cmd>GitGutterPrevHunk<cr>", "Prev Hunk"},
|
|
||||||
p = {"<cmd>GitGutterPreviewHunk<cr>", "Preview Hunk"},
|
|
||||||
r = {"<cmd>GitGutterResetHunk<cr>", "Reset Hunk"},
|
|
||||||
s = {"<cmd>GitGutterStageHunk<cr>", "Stage Hunk"},
|
|
||||||
u = {"<cmd>GitGutterUndoHunk<cr>", "Undo Stage Hunk"},
|
|
||||||
o = {"<cmd>Telescope git_status<cr>", "Open changed file"},
|
|
||||||
b = {"<cmd>Telescope git_branches<cr>", "Checkout branch"},
|
|
||||||
c = {"<cmd>Telescope git_commits<cr>", "Checkout commit"},
|
|
||||||
C = {"<cmd>Telescope git_bcommits<cr>", "Checkout commit(for current file)"},
|
|
||||||
},
|
|
||||||
l = {
|
|
||||||
name = "+LSP",
|
|
||||||
a = {"<cmd>Lspsaga code_action<cr>", "Code Action"},
|
|
||||||
A = {"<cmd>Lspsaga range_code_action<cr>", "Selected Action"},
|
|
||||||
d = {"<cmd>Telescope lsp_document_diagnostics<cr>", "Document Diagnostics"},
|
|
||||||
D = {"<cmd>Telescope lsp_workspace_diagnostics<cr>", "Workspace Diagnostics"},
|
|
||||||
f = {"<cmd>LspFormatting<cr>", "Format"},
|
|
||||||
i = {"<cmd>LspInfo<cr>", "Info"},
|
|
||||||
l = {"<cmd>Lspsaga lsp_finder<cr>", "LSP Finder"},
|
|
||||||
L = {"<cmd>Lspsaga show_line_diagnostics<cr>", "Line Diagnostics"},
|
|
||||||
p = {"<cmd>Lspsaga preview_definition<cr>", "Preview Definition"},
|
|
||||||
q = {"<cmd>Telescope quickfix<cr>", "Quickfix"},
|
|
||||||
r = {"<cmd>Lspsaga rename<cr>", "Rename"},
|
|
||||||
t = {"<cmd>LspTypeDefinition<cr>", "Type Definition"},
|
|
||||||
x = {"<cmd>cclose<cr>", "Close Quickfix"},
|
|
||||||
s = {"<cmd>Telescope lsp_document_symbols<cr>", "Document Symbols"},
|
|
||||||
S = {"<cmd>Telescope lsp_workspace_symbols<cr>", "Workspace Symbols"}
|
|
||||||
},
|
|
||||||
d = {
|
|
||||||
f = {":lua require'functions'.edit_dotfiles()<cr>", "Dotfiles search"}
|
|
||||||
},
|
|
||||||
s = {
|
|
||||||
name = "+Search",
|
|
||||||
b = {"<cmd>Telescope git_branches<cr>", "Checkout branch"},
|
|
||||||
c = {"<cmd>Telescope colorscheme<cr>", "Colorscheme"},
|
|
||||||
d = {"<cmd>Telescope lsp_document_diagnostics<cr>", "Document Diagnostics"},
|
|
||||||
D = {"<cmd>Telescope lsp_workspace_diagnostics<cr>", "Workspace Diagnostics"},
|
|
||||||
f = {"<cmd>Telescope find_files<cr>", "Find File"},
|
|
||||||
m = {"<cmd>Telescope marks<cr>", "Marks"},
|
|
||||||
M = {"<cmd>Telescope man_pages<cr>", "Man Pages"},
|
|
||||||
r = {"<cmd>Telescope oldfiles<cr>", "Open Recent File"},
|
|
||||||
R = {"<cmd>Telescope registers<cr>", "Registers"},
|
|
||||||
t = {"<cmd>Telescope live_grep<cr>", "Text"}
|
|
||||||
},
|
|
||||||
S = {
|
|
||||||
name = "+Session",
|
|
||||||
s = {"<cmd>SessionSave<cr>", "Save Session"},
|
|
||||||
l = {"<cmd>SessionLoad<cr>", "Load Session"}
|
|
||||||
},
|
|
||||||
t = {
|
|
||||||
name = "+Tagbar",
|
|
||||||
t = {"<cmd>TagbarToggle<cr>", "Toggle Tagbar"},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
local wk = require("which-key")
|
|
||||||
wk.register(mappings, opts)
|
|
@@ -1,35 +0,0 @@
|
|||||||
vim.cmd('set iskeyword+=-') -- treat dash separated words as a word text object"
|
|
||||||
vim.cmd('set shortmess+=c') -- Don't pass messages to |ins-completion-menu|.
|
|
||||||
vim.cmd('set inccommand=split') -- Make substitution work in realtime
|
|
||||||
vim.o.hidden = O.hidden_files -- Required to keep multiple buffers open multiple buffers
|
|
||||||
vim.o.title = true
|
|
||||||
TERMINAL = vim.fn.expand('$TERMINAL')
|
|
||||||
vim.cmd('let &titleold="'..TERMINAL..'"')
|
|
||||||
vim.o.titlestring="%<%F%=%l/%L - nvim"
|
|
||||||
vim.wo.wrap = O.wrap_lines -- Display long lines as just one line
|
|
||||||
vim.cmd('set whichwrap+=<,>,[,],h,l') -- move to next line with theses keys
|
|
||||||
vim.cmd('syntax on') -- syntax highlighting
|
|
||||||
vim.o.pumheight = 10 -- Makes popup menu smaller
|
|
||||||
vim.o.fileencoding = "utf-8" -- The encoding written to file
|
|
||||||
vim.o.cmdheight = 2 -- More space for displaying messages
|
|
||||||
vim.cmd('set colorcolumn=99999') -- fix indentline for now
|
|
||||||
vim.o.mouse = "a" -- Enable your mouse
|
|
||||||
vim.o.splitbelow = true -- Horizontal splits will automatically be below
|
|
||||||
vim.o.termguicolors = true -- set term gui colors most terminals support this
|
|
||||||
vim.o.splitright = true -- Vertical splits will automatically be to the right
|
|
||||||
vim.o.conceallevel = 0 -- So that I can see `` in markdown files
|
|
||||||
vim.cmd('set ts=4') -- Insert 4 spaces for a tab
|
|
||||||
vim.cmd('set sw=4') -- Change the number of space characters inserted for indentation
|
|
||||||
vim.cmd('set expandtab') -- Converts tabs to spaces
|
|
||||||
vim.bo.smartindent = true -- Makes indenting smart
|
|
||||||
vim.wo.number = O.number -- set numbered lines
|
|
||||||
vim.wo.relativenumber = O.relative_number -- set relative number
|
|
||||||
vim.wo.cursorline = true -- Enable highlighting of the current line
|
|
||||||
vim.o.showtabline = 2 -- Always show tabs
|
|
||||||
vim.o.showmode = false -- We don't need to see things like -- INSERT -- anymore
|
|
||||||
vim.o.backup = false -- This is recommended by coc
|
|
||||||
vim.o.writebackup = false -- This is recommended by coc
|
|
||||||
vim.wo.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift the text each time
|
|
||||||
vim.o.updatetime = 300 -- Faster completion
|
|
||||||
vim.o.timeoutlen = O.timeoutlen -- By default timeoutlen is 1000 ms
|
|
||||||
vim.o.clipboard = "unnamedplus" -- Copy paste between vim and everything else
|
|
@@ -1,4 +0,0 @@
|
|||||||
vim.g.nord_cursor_line_number_background = 1
|
|
||||||
vim.g.nord_bold = 1
|
|
||||||
vim.g.nord_italic = 1
|
|
||||||
vim.g.nord_italic_comments = 1
|
|
@@ -1,13 +0,0 @@
|
|||||||
local M = {}
|
|
||||||
|
|
||||||
function M.is_buffer_empty()
|
|
||||||
-- Check whether the current buffer is empty
|
|
||||||
return vim.fn.empty(vim.fn.expand('%:t')) == 1
|
|
||||||
end
|
|
||||||
|
|
||||||
function M.has_width_gt(cols)
|
|
||||||
-- Check if the windows width is greater than a given number of columns
|
|
||||||
return vim.fn.winwidth(0) / 2 > cols
|
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
|
@@ -1,292 +0,0 @@
|
|||||||
-- Automatically generated packer.nvim plugin loader code
|
|
||||||
|
|
||||||
if vim.api.nvim_call_function('has', {'nvim-0.5'}) ~= 1 then
|
|
||||||
vim.api.nvim_command('echohl WarningMsg | echom "Invalid Neovim version for packer.nvim! | echohl None"')
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.api.nvim_command('packadd packer.nvim')
|
|
||||||
|
|
||||||
local no_errors, error_msg = pcall(function()
|
|
||||||
|
|
||||||
local time
|
|
||||||
local profile_info
|
|
||||||
local should_profile = false
|
|
||||||
if should_profile then
|
|
||||||
local hrtime = vim.loop.hrtime
|
|
||||||
profile_info = {}
|
|
||||||
time = function(chunk, start)
|
|
||||||
if start then
|
|
||||||
profile_info[chunk] = hrtime()
|
|
||||||
else
|
|
||||||
profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6
|
|
||||||
end
|
|
||||||
end
|
|
||||||
else
|
|
||||||
time = function(chunk, start) end
|
|
||||||
end
|
|
||||||
|
|
||||||
local function save_profiles(threshold)
|
|
||||||
local sorted_times = {}
|
|
||||||
for chunk_name, time_taken in pairs(profile_info) do
|
|
||||||
sorted_times[#sorted_times + 1] = {chunk_name, time_taken}
|
|
||||||
end
|
|
||||||
table.sort(sorted_times, function(a, b) return a[2] > b[2] end)
|
|
||||||
local results = {}
|
|
||||||
for i, elem in ipairs(sorted_times) do
|
|
||||||
if not threshold or threshold and elem[2] > threshold then
|
|
||||||
results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
_G._packer = _G._packer or {}
|
|
||||||
_G._packer.profile_output = results
|
|
||||||
end
|
|
||||||
|
|
||||||
time([[Luarocks path setup]], true)
|
|
||||||
local package_path_str = "/Users/fbecker18/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/Users/fbecker18/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/Users/fbecker18/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/Users/fbecker18/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua"
|
|
||||||
local install_cpath_pattern = "/Users/fbecker18/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/?.so"
|
|
||||||
if not string.find(package.path, package_path_str, 1, true) then
|
|
||||||
package.path = package.path .. ';' .. package_path_str
|
|
||||||
end
|
|
||||||
|
|
||||||
if not string.find(package.cpath, install_cpath_pattern, 1, true) then
|
|
||||||
package.cpath = package.cpath .. ';' .. install_cpath_pattern
|
|
||||||
end
|
|
||||||
|
|
||||||
time([[Luarocks path setup]], false)
|
|
||||||
time([[try_loadstring definition]], true)
|
|
||||||
local function try_loadstring(s, component, name)
|
|
||||||
local success, result = pcall(loadstring(s), name, _G.packer_plugins[name])
|
|
||||||
if not success then
|
|
||||||
vim.schedule(function()
|
|
||||||
vim.api.nvim_notify('packer.nvim: Error running ' .. component .. ' for ' .. name .. ': ' .. result, vim.log.levels.ERROR, {})
|
|
||||||
end)
|
|
||||||
end
|
|
||||||
return result
|
|
||||||
end
|
|
||||||
|
|
||||||
time([[try_loadstring definition]], false)
|
|
||||||
time([[Defining packer_plugins]], true)
|
|
||||||
_G.packer_plugins = {
|
|
||||||
["JuliaFormatter.vim"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/JuliaFormatter.vim",
|
|
||||||
url = "https://github.com/kdheepak/JuliaFormatter.vim"
|
|
||||||
},
|
|
||||||
["cmp-buffer"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/cmp-buffer",
|
|
||||||
url = "https://github.com/hrsh7th/cmp-buffer"
|
|
||||||
},
|
|
||||||
["cmp-cmdline"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/cmp-cmdline",
|
|
||||||
url = "https://github.com/hrsh7th/cmp-cmdline"
|
|
||||||
},
|
|
||||||
["cmp-nvim-lsp"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp",
|
|
||||||
url = "https://github.com/hrsh7th/cmp-nvim-lsp"
|
|
||||||
},
|
|
||||||
["cmp-path"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/cmp-path",
|
|
||||||
url = "https://github.com/hrsh7th/cmp-path"
|
|
||||||
},
|
|
||||||
["darcula-solid.nvim"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/darcula-solid.nvim",
|
|
||||||
url = "https://github.com/briones-gabriel/darcula-solid.nvim"
|
|
||||||
},
|
|
||||||
dracula = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/dracula",
|
|
||||||
url = "https://github.com/dracula/vim"
|
|
||||||
},
|
|
||||||
["editorconfig-vim"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/editorconfig-vim",
|
|
||||||
url = "https://github.com/editorconfig/editorconfig-vim"
|
|
||||||
},
|
|
||||||
["go.nvim"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/go.nvim",
|
|
||||||
url = "https://github.com/ray-x/go.nvim"
|
|
||||||
},
|
|
||||||
["jsonc.vim"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/jsonc.vim",
|
|
||||||
url = "https://github.com/neoclide/jsonc.vim"
|
|
||||||
},
|
|
||||||
["julia-vim"] = {
|
|
||||||
loaded = false,
|
|
||||||
needs_bufread = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/opt/julia-vim",
|
|
||||||
url = "https://github.com/JuliaEditorSupport/julia-vim"
|
|
||||||
},
|
|
||||||
["lsp-status.nvim"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/lsp-status.nvim",
|
|
||||||
url = "https://github.com/nvim-lua/lsp-status.nvim"
|
|
||||||
},
|
|
||||||
["lspsaga.nvim"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/lspsaga.nvim",
|
|
||||||
url = "https://github.com/tami5/lspsaga.nvim"
|
|
||||||
},
|
|
||||||
["lualine.nvim"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/lualine.nvim",
|
|
||||||
url = "https://github.com/nvim-lualine/lualine.nvim"
|
|
||||||
},
|
|
||||||
["lush.nvim"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/lush.nvim",
|
|
||||||
url = "https://github.com/rktjmp/lush.nvim"
|
|
||||||
},
|
|
||||||
moonlight = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/moonlight",
|
|
||||||
url = "https://github.com/shaunsingh/moonlight.nvim"
|
|
||||||
},
|
|
||||||
nerdcommenter = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/nerdcommenter",
|
|
||||||
url = "https://github.com/preservim/nerdcommenter"
|
|
||||||
},
|
|
||||||
nerdtree = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/nerdtree",
|
|
||||||
url = "https://github.com/preservim/nerdtree"
|
|
||||||
},
|
|
||||||
["nerdtree-git-plugin"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/nerdtree-git-plugin",
|
|
||||||
url = "https://github.com/Xuyuanp/nerdtree-git-plugin"
|
|
||||||
},
|
|
||||||
["nord-vim"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/nord-vim",
|
|
||||||
url = "https://github.com/arcticicestudio/nord-vim"
|
|
||||||
},
|
|
||||||
["nvim-cmp"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/nvim-cmp",
|
|
||||||
url = "https://github.com/hrsh7th/nvim-cmp"
|
|
||||||
},
|
|
||||||
["nvim-lspconfig"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/nvim-lspconfig",
|
|
||||||
url = "https://github.com/neovim/nvim-lspconfig"
|
|
||||||
},
|
|
||||||
["nvim-lspinstall"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/nvim-lspinstall",
|
|
||||||
url = "https://github.com/kabouzeid/nvim-lspinstall"
|
|
||||||
},
|
|
||||||
["nvim-treesitter"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/nvim-treesitter",
|
|
||||||
url = "https://github.com/nvim-treesitter/nvim-treesitter"
|
|
||||||
},
|
|
||||||
["nvim-web-devicons"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/nvim-web-devicons",
|
|
||||||
url = "https://github.com/kyazdani42/nvim-web-devicons"
|
|
||||||
},
|
|
||||||
["onedark.vim"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/onedark.vim",
|
|
||||||
url = "https://github.com/joshdick/onedark.vim"
|
|
||||||
},
|
|
||||||
["packer.nvim"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/packer.nvim",
|
|
||||||
url = "https://github.com/wbthomason/packer.nvim"
|
|
||||||
},
|
|
||||||
["plenary.nvim"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/plenary.nvim",
|
|
||||||
url = "https://github.com/nvim-lua/plenary.nvim"
|
|
||||||
},
|
|
||||||
["popup.nvim"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/popup.nvim",
|
|
||||||
url = "https://github.com/nvim-lua/popup.nvim"
|
|
||||||
},
|
|
||||||
["symbols-outline.nvim"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/symbols-outline.nvim",
|
|
||||||
url = "https://github.com/simrat39/symbols-outline.nvim"
|
|
||||||
},
|
|
||||||
tagbar = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/tagbar",
|
|
||||||
url = "https://github.com/preservim/tagbar"
|
|
||||||
},
|
|
||||||
["telescope-project.nvim"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/telescope-project.nvim",
|
|
||||||
url = "https://github.com/nvim-telescope/telescope-project.nvim"
|
|
||||||
},
|
|
||||||
["telescope.nvim"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/telescope.nvim",
|
|
||||||
url = "https://github.com/nvim-telescope/telescope.nvim"
|
|
||||||
},
|
|
||||||
["vim-devicons"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/vim-devicons",
|
|
||||||
url = "https://github.com/ryanoasis/vim-devicons"
|
|
||||||
},
|
|
||||||
["vim-easy-align"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/vim-easy-align",
|
|
||||||
url = "https://github.com/junegunn/vim-easy-align"
|
|
||||||
},
|
|
||||||
["vim-floaterm"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/vim-floaterm",
|
|
||||||
url = "https://github.com/voldikss/vim-floaterm"
|
|
||||||
},
|
|
||||||
["vim-fugitive"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/vim-fugitive",
|
|
||||||
url = "https://github.com/tpope/vim-fugitive"
|
|
||||||
},
|
|
||||||
["vim-gitgutter"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/vim-gitgutter",
|
|
||||||
url = "https://github.com/airblade/vim-gitgutter"
|
|
||||||
},
|
|
||||||
["vim-highlightedyank"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/vim-highlightedyank",
|
|
||||||
url = "https://github.com/machakann/vim-highlightedyank"
|
|
||||||
},
|
|
||||||
["vim-sneak"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/vim-sneak",
|
|
||||||
url = "https://github.com/justinmk/vim-sneak"
|
|
||||||
},
|
|
||||||
["vim-surround"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/vim-surround",
|
|
||||||
url = "https://github.com/tpope/vim-surround"
|
|
||||||
},
|
|
||||||
["which-key.nvim"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/which-key.nvim",
|
|
||||||
url = "https://github.com/folke/which-key.nvim"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
time([[Defining packer_plugins]], false)
|
|
||||||
if should_profile then save_profiles() end
|
|
||||||
|
|
||||||
end)
|
|
||||||
|
|
||||||
if not no_errors then
|
|
||||||
vim.api.nvim_command('echohl ErrorMsg | echom "Error in packer_compiled: '..error_msg..'" | echom "Please check your config for correctness" | echohl None')
|
|
||||||
end
|
|
@@ -1,235 +0,0 @@
|
|||||||
" Automatically generated packer.nvim plugin loader code
|
|
||||||
|
|
||||||
if !has('nvim-0.5')
|
|
||||||
echohl WarningMsg
|
|
||||||
echom "Invalid Neovim version for packer.nvim!"
|
|
||||||
echohl None
|
|
||||||
finish
|
|
||||||
endif
|
|
||||||
|
|
||||||
packadd packer.nvim
|
|
||||||
|
|
||||||
try
|
|
||||||
|
|
||||||
lua << END
|
|
||||||
local time
|
|
||||||
local profile_info
|
|
||||||
local should_profile = false
|
|
||||||
if should_profile then
|
|
||||||
local hrtime = vim.loop.hrtime
|
|
||||||
profile_info = {}
|
|
||||||
time = function(chunk, start)
|
|
||||||
if start then
|
|
||||||
profile_info[chunk] = hrtime()
|
|
||||||
else
|
|
||||||
profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6
|
|
||||||
end
|
|
||||||
end
|
|
||||||
else
|
|
||||||
time = function(chunk, start) end
|
|
||||||
end
|
|
||||||
|
|
||||||
local function save_profiles(threshold)
|
|
||||||
local sorted_times = {}
|
|
||||||
for chunk_name, time_taken in pairs(profile_info) do
|
|
||||||
sorted_times[#sorted_times + 1] = {chunk_name, time_taken}
|
|
||||||
end
|
|
||||||
table.sort(sorted_times, function(a, b) return a[2] > b[2] end)
|
|
||||||
local results = {}
|
|
||||||
for i, elem in ipairs(sorted_times) do
|
|
||||||
if not threshold or threshold and elem[2] > threshold then
|
|
||||||
results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
_G._packer = _G._packer or {}
|
|
||||||
_G._packer.profile_output = results
|
|
||||||
end
|
|
||||||
|
|
||||||
time("Luarocks path setup", true)
|
|
||||||
local package_path_str = "/Users/fbecker18/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/Users/fbecker18/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/Users/fbecker18/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/Users/fbecker18/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua"
|
|
||||||
local install_cpath_pattern = "/Users/fbecker18/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/?.so"
|
|
||||||
if not string.find(package.path, package_path_str, 1, true) then
|
|
||||||
package.path = package.path .. ';' .. package_path_str
|
|
||||||
end
|
|
||||||
|
|
||||||
if not string.find(package.cpath, install_cpath_pattern, 1, true) then
|
|
||||||
package.cpath = package.cpath .. ';' .. install_cpath_pattern
|
|
||||||
end
|
|
||||||
|
|
||||||
time("Luarocks path setup", false)
|
|
||||||
time("try_loadstring definition", true)
|
|
||||||
local function try_loadstring(s, component, name)
|
|
||||||
local success, result = pcall(loadstring(s))
|
|
||||||
if not success then
|
|
||||||
print('Error running ' .. component .. ' for ' .. name)
|
|
||||||
error(result)
|
|
||||||
end
|
|
||||||
return result
|
|
||||||
end
|
|
||||||
|
|
||||||
time("try_loadstring definition", false)
|
|
||||||
time("Defining packer_plugins", true)
|
|
||||||
_G.packer_plugins = {
|
|
||||||
["JuliaFormatter.vim"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/JuliaFormatter.vim"
|
|
||||||
},
|
|
||||||
["darcula-solid.nvim"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/darcula-solid.nvim"
|
|
||||||
},
|
|
||||||
dracula = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/dracula"
|
|
||||||
},
|
|
||||||
["editorconfig-vim"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/editorconfig-vim"
|
|
||||||
},
|
|
||||||
["jsonc.vim"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/jsonc.vim"
|
|
||||||
},
|
|
||||||
["julia-vim"] = {
|
|
||||||
loaded = false,
|
|
||||||
needs_bufread = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/opt/julia-vim"
|
|
||||||
},
|
|
||||||
["lsp-status.nvim"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/lsp-status.nvim"
|
|
||||||
},
|
|
||||||
["lspsaga.nvim"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/lspsaga.nvim"
|
|
||||||
},
|
|
||||||
["lualine.nvim"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/lualine.nvim"
|
|
||||||
},
|
|
||||||
["lush.nvim"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/lush.nvim"
|
|
||||||
},
|
|
||||||
moonlight = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/moonlight"
|
|
||||||
},
|
|
||||||
nerdcommenter = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/nerdcommenter"
|
|
||||||
},
|
|
||||||
nerdtree = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/nerdtree"
|
|
||||||
},
|
|
||||||
["nerdtree-git-plugin"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/nerdtree-git-plugin"
|
|
||||||
},
|
|
||||||
["nord-vim"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/nord-vim"
|
|
||||||
},
|
|
||||||
["nvim-compe"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/nvim-compe"
|
|
||||||
},
|
|
||||||
["nvim-lspconfig"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/nvim-lspconfig"
|
|
||||||
},
|
|
||||||
["nvim-lspinstall"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/nvim-lspinstall"
|
|
||||||
},
|
|
||||||
["nvim-treesitter"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/nvim-treesitter"
|
|
||||||
},
|
|
||||||
["nvim-web-devicons"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/nvim-web-devicons"
|
|
||||||
},
|
|
||||||
["packer.nvim"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/packer.nvim"
|
|
||||||
},
|
|
||||||
["plenary.nvim"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/plenary.nvim"
|
|
||||||
},
|
|
||||||
["popup.nvim"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/popup.nvim"
|
|
||||||
},
|
|
||||||
["symbols-outline.nvim"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/symbols-outline.nvim"
|
|
||||||
},
|
|
||||||
tagbar = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/tagbar"
|
|
||||||
},
|
|
||||||
["telescope-project.nvim"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/telescope-project.nvim"
|
|
||||||
},
|
|
||||||
["telescope.nvim"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/telescope.nvim"
|
|
||||||
},
|
|
||||||
["vim-abolish"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/vim-abolish"
|
|
||||||
},
|
|
||||||
["vim-devicons"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/vim-devicons"
|
|
||||||
},
|
|
||||||
["vim-easy-align"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/vim-easy-align"
|
|
||||||
},
|
|
||||||
["vim-floaterm"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/vim-floaterm"
|
|
||||||
},
|
|
||||||
["vim-fugitive"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/vim-fugitive"
|
|
||||||
},
|
|
||||||
["vim-gitgutter"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/vim-gitgutter"
|
|
||||||
},
|
|
||||||
["vim-highlightedyank"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/vim-highlightedyank"
|
|
||||||
},
|
|
||||||
["vim-sneak"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/vim-sneak"
|
|
||||||
},
|
|
||||||
["vim-surround"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/vim-surround"
|
|
||||||
},
|
|
||||||
["which-key.nvim"] = {
|
|
||||||
loaded = true,
|
|
||||||
path = "/Users/fbecker18/.local/share/nvim/site/pack/packer/start/which-key.nvim"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
time("Defining packer_plugins", false)
|
|
||||||
if should_profile then save_profiles() end
|
|
||||||
|
|
||||||
END
|
|
||||||
|
|
||||||
catch
|
|
||||||
echohl ErrorMsg
|
|
||||||
echom "Error in packer_compiled: " .. v:exception
|
|
||||||
echom "Please check your config for correctness"
|
|
||||||
echohl None
|
|
||||||
endtry
|
|
10
.config/nvim/snippets/lua.json
Normal file
10
.config/nvim/snippets/lua.json
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"anonymous-function": {
|
||||||
|
"prefix": "fn",
|
||||||
|
"body": [
|
||||||
|
"function($1)",
|
||||||
|
"\t${0:-- code}",
|
||||||
|
"end"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
13
.config/nvim/snippets/package.json
Normal file
13
.config/nvim/snippets/package.json
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"name": "halfdans-collection",
|
||||||
|
"engines": {
|
||||||
|
"vscode": "^1.11.0"
|
||||||
|
},
|
||||||
|
"contributes": {
|
||||||
|
"snippets": [
|
||||||
|
{
|
||||||
|
"language": "lua",
|
||||||
|
"path": "./snippets/lua.json"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
2
.config/nvim/syntax/NeogitStatus.vim
Normal file
2
.config/nvim/syntax/NeogitStatus.vim
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
hi def NeogitDiffAddHighlight guibg=#404040 guifg=#859900
|
||||||
|
hi def NeogitDiffDeleteHighlight guibg=#404040 guifg=#dc322f
|
BIN
.config/sway/backgrounds/eclipse.jpg
Normal file
BIN
.config/sway/backgrounds/eclipse.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 MiB |
155
.config/sway/config
Normal file
155
.config/sway/config
Normal file
@@ -0,0 +1,155 @@
|
|||||||
|
#########################
|
||||||
|
# Run services
|
||||||
|
#########################
|
||||||
|
exec waybar
|
||||||
|
|
||||||
|
set $mod Mod1
|
||||||
|
|
||||||
|
# Font for window titles. Will also be used by the bar unless a different font
|
||||||
|
# is used in the bar {} block below.
|
||||||
|
font pango:monospace 14
|
||||||
|
|
||||||
|
# Remove all borders from applications
|
||||||
|
default_border none
|
||||||
|
|
||||||
|
# This font is widely installed, provides lots of unicode glyphs, right-to-left
|
||||||
|
# text rendering and scalability on retina/hidpi displays (thanks to pango).
|
||||||
|
#font pango:DejaVu Sans Mono 8
|
||||||
|
|
||||||
|
# Before i3 v4.8, we used to recommend this one as the default:
|
||||||
|
# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
|
||||||
|
# The font above is very space-efficient, that is, it looks good, sharp and
|
||||||
|
# clear in small sizes. However, its unicode glyph coverage is limited, the old
|
||||||
|
# X core fonts rendering does not support right-to-left and this being a bitmap
|
||||||
|
# font, it doesn’t scale on retina/hidpi displays.
|
||||||
|
|
||||||
|
# Use Mouse+$mod to drag floating windows to their wanted position
|
||||||
|
floating_modifier $mod
|
||||||
|
|
||||||
|
# start a terminal
|
||||||
|
# bindsym $mod+Return exec i3-sensible-terminal
|
||||||
|
bindsym $mod+Return exec alacritty
|
||||||
|
|
||||||
|
# kill focused window
|
||||||
|
bindsym $mod+Shift+q kill
|
||||||
|
|
||||||
|
# app launcher
|
||||||
|
bindsym $mod+d exec wofi --show=run --gtk-dark
|
||||||
|
|
||||||
|
# change focus
|
||||||
|
bindsym $mod+h focus left
|
||||||
|
bindsym $mod+j focus down
|
||||||
|
bindsym $mod+k focus up
|
||||||
|
bindsym $mod+l focus right
|
||||||
|
|
||||||
|
# alternatively, you can use the cursor keys:
|
||||||
|
bindsym $mod+Left focus left
|
||||||
|
bindsym $mod+Down focus down
|
||||||
|
bindsym $mod+Up focus up
|
||||||
|
bindsym $mod+Right focus right
|
||||||
|
|
||||||
|
# move focused window
|
||||||
|
bindsym $mod+Shift+h move left
|
||||||
|
bindsym $mod+Shift+j move down
|
||||||
|
bindsym $mod+Shift+k move up
|
||||||
|
bindsym $mod+Shift+l move right
|
||||||
|
|
||||||
|
# alternatively, you can use the cursor keys:
|
||||||
|
bindsym $mod+Shift+Left move left
|
||||||
|
bindsym $mod+Shift+Down move down
|
||||||
|
bindsym $mod+Shift+Up move up
|
||||||
|
bindsym $mod+Shift+Right move right
|
||||||
|
|
||||||
|
# split in horizontal orientation
|
||||||
|
bindsym $mod+z split h
|
||||||
|
|
||||||
|
# split in vertical orientation
|
||||||
|
bindsym $mod+v split v
|
||||||
|
|
||||||
|
# enter fullscreen mode for the focused container
|
||||||
|
bindsym $mod+f fullscreen toggle
|
||||||
|
|
||||||
|
# change container layout (stacked, tabbed, toggle split)
|
||||||
|
bindsym $mod+s layout stacking
|
||||||
|
bindsym $mod+w layout tabbed
|
||||||
|
bindsym $mod+e layout toggle split
|
||||||
|
|
||||||
|
# toggle tiling / floating
|
||||||
|
bindsym $mod+Shift+space floating toggle
|
||||||
|
|
||||||
|
# focus the parent container
|
||||||
|
bindsym $mod+a focus parent
|
||||||
|
|
||||||
|
# focus the child container
|
||||||
|
#bindsym $mod+d focus child
|
||||||
|
|
||||||
|
# switch to workspace
|
||||||
|
bindsym $mod+plus workspace 1
|
||||||
|
bindsym $mod+bracketleft workspace 2
|
||||||
|
bindsym $mod+braceleft workspace 3
|
||||||
|
bindsym $mod+parenleft workspace 4
|
||||||
|
bindsym $mod+ampersand workspace 5
|
||||||
|
bindsym $mod+equal workspace 6
|
||||||
|
bindsym $mod+parenright workspace 7
|
||||||
|
bindsym $mod+braceright workspace 8
|
||||||
|
bindsym $mod+bracketright workspace 9
|
||||||
|
bindsym $mod+asterisk workspace 10
|
||||||
|
|
||||||
|
# move focused container to workspace
|
||||||
|
bindsym $mod+Shift+plus move container to workspace 1
|
||||||
|
bindsym $mod+Shift+bracketleft move container to workspace 2
|
||||||
|
bindsym $mod+Shift+braceleft move container to workspace 3
|
||||||
|
bindsym $mod+Shift+parenleft move container to workspace 4
|
||||||
|
bindsym $mod+Shift+ampersand move container to workspace 5
|
||||||
|
bindsym $mod+Shift+equal move container to workspace 6
|
||||||
|
bindsym $mod+Shift+parenright move container to workspace 7
|
||||||
|
bindsym $mod+Shift+braceright move container to workspace 8
|
||||||
|
bindsym $mod+Shift+bracketright move container to workspace 9
|
||||||
|
bindsym $mod+Shift+asterisk move container to workspace 10
|
||||||
|
|
||||||
|
# reload the configuration file
|
||||||
|
bindsym $mod+Shift+c reload
|
||||||
|
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
|
||||||
|
bindsym $mod+Shift+r restart
|
||||||
|
# exit i3 (logs you out of your X session)
|
||||||
|
|
||||||
|
# Pulse Audio controls
|
||||||
|
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume $(pacmd list-sinks |awk '/* index:/{print $3}') +5%
|
||||||
|
bindsym XF86AudioLowerVolume exec pactl set-sink-volume $(pacmd list-sinks |awk '/* index:/{print $3}') -5%
|
||||||
|
bindsym XF86AudioMute exec pactl set-sink-mute $(pacmd list-sinks |awk '/* index:/{print $3}') toggle# Pulse Audio controls
|
||||||
|
|
||||||
|
# resize window (you can also use the mouse for that)
|
||||||
|
mode "resize" {
|
||||||
|
# These bindings trigger as soon as you enter the resize mode
|
||||||
|
|
||||||
|
# Pressing left will shrink the window’s width.
|
||||||
|
# Pressing right will grow the window’s width.
|
||||||
|
# Pressing up will shrink the window’s height.
|
||||||
|
# Pressing down will grow the window’s height.
|
||||||
|
bindsym h resize shrink width 10 px or 10 ppt
|
||||||
|
bindsym j resize grow height 10 px or 10 ppt
|
||||||
|
bindsym k resize shrink height 10 px or 10 ppt
|
||||||
|
bindsym l resize grow width 10 px or 10 ppt
|
||||||
|
|
||||||
|
# same bindings, but for the arrow keys
|
||||||
|
bindsym Left resize shrink width 10 px or 10 ppt
|
||||||
|
bindsym Down resize grow height 10 px or 10 ppt
|
||||||
|
bindsym Up resize shrink height 10 px or 10 ppt
|
||||||
|
bindsym Right resize grow width 10 px or 10 ppt
|
||||||
|
|
||||||
|
# back to normal: Enter or Escape
|
||||||
|
bindsym Return mode "default"
|
||||||
|
bindsym Escape mode "default"
|
||||||
|
}
|
||||||
|
|
||||||
|
bindsym $mod+r mode "resize"
|
||||||
|
|
||||||
|
# Start i3bar to display a workspace bar (plus the system information i3status
|
||||||
|
# finds out, if available)
|
||||||
|
set $status_script ~/.config/sway/status.sh
|
||||||
|
|
||||||
|
# Suspend
|
||||||
|
bindsym $mod+Shift+period exec systemctl suspend
|
||||||
|
|
||||||
|
include /etc/sway/config.d/*
|
||||||
|
include ~/.config/sway/config.d/*
|
9
.config/sway/config.d/inputs
Normal file
9
.config/sway/config.d/inputs
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
input 1452:591:Keychron_Keychron_K2 {
|
||||||
|
xkb_layout real-prog-dvorak
|
||||||
|
xkb_options caps:escape
|
||||||
|
}
|
||||||
|
|
||||||
|
input 10730:258:Kinesis_Advantage2_Keyboard {
|
||||||
|
xkb_layout real-prog-dvorak
|
||||||
|
xkb_options caps:escape
|
||||||
|
}
|
10
.config/sway/config.d/outputs
Normal file
10
.config/sway/config.d/outputs
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# Devices
|
||||||
|
set $display_tv 'Technical Concepts Ltd TCL SMART TV 0x00001111'
|
||||||
|
set $curved_small 'Goldstar Company Ltd LG HDR WQHD 0x0000655D'
|
||||||
|
|
||||||
|
# Resolution
|
||||||
|
output $display_tv mode 1920x1080@30Hz
|
||||||
|
output $curved_small mode 3440x1440@60Hz
|
||||||
|
|
||||||
|
# Wallpapers
|
||||||
|
output * bg ~/.config/sway/backgrounds/eclipse.jpg stretch
|
14
.config/sway/status.sh
Executable file
14
.config/sway/status.sh
Executable file
@@ -0,0 +1,14 @@
|
|||||||
|
# The Sway configuration file in ~/.config/sway/config calls this script.
|
||||||
|
# You should see changes to the status bar after saving this script. If
|
||||||
|
# not, do "killall swaybar" and $mod+Shift+c to reload the configuration.
|
||||||
|
# Produces "21 days", for example
|
||||||
|
uptime_formatted=$(uptime | cut -d ',' -f1 | cut -d ' ' -f4,5)
|
||||||
|
# The abbreviated weekday (e.g., "Sat"), followed by the ISO-formatted date
|
||||||
|
# like 2018-10-06 and the time (e.g., 14:01)
|
||||||
|
date_formatted=$(date "+%a %F %H:%M")
|
||||||
|
# Get the Linux version but remove the "-1-ARCH" part
|
||||||
|
linux_version=$(uname -r | cut -d '-' -f1)
|
||||||
|
# Returns the battery status: "Full", "Discharging", or "Charging".
|
||||||
|
# battery_status=$(cat /sys/class/power_supply/BAT0/status)
|
||||||
|
# Emojis and characters for the status bar 💎 💻 💡 🔌 ⚡ 📁 \|
|
||||||
|
echo $uptime_formatted ↑ $linux_version
|
@@ -5,11 +5,16 @@
|
|||||||
# Plugin manager for tmux
|
# Plugin manager for tmux
|
||||||
set -g @plugin 'tmux-plugins/tpm'
|
set -g @plugin 'tmux-plugins/tpm'
|
||||||
|
|
||||||
|
set-environment -g TMUX_PLUGIN_MANAGER_PATH '~/.tmux/plugins/'
|
||||||
|
|
||||||
# Simple tmux options for anyone
|
# Simple tmux options for anyone
|
||||||
set -g @plugin 'tmux-plugins/tmux-sensible'
|
set -g @plugin 'tmux-plugins/tmux-sensible'
|
||||||
|
|
||||||
#set -g @plugin 'dracula/tmux'
|
#set -g @plugin 'odedlaz/tmux-onedark-theme'
|
||||||
set -g @plugin 'odedlaz/tmux-onedark-theme'
|
|
||||||
|
# Gruvbox theme
|
||||||
|
set -g @plugin 'egel/tmux-gruvbox'
|
||||||
|
set -g @tmux-gruvbox 'dark' # or 'light'
|
||||||
|
|
||||||
# Persistent tmux envs across system restarts
|
# Persistent tmux envs across system restarts
|
||||||
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
||||||
@@ -45,7 +50,7 @@ set -g @resurrect-processes '~julia'
|
|||||||
#######################################################
|
#######################################################
|
||||||
|
|
||||||
# Increase scrollback buffer size
|
# Increase scrollback buffer size
|
||||||
set -g history-limit 5000
|
set -g history-limit 50000
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
# END OF PLUGINS
|
# END OF PLUGINS
|
||||||
@@ -64,10 +69,11 @@ bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft=
|
|||||||
|
|
||||||
# Enables italics in tmux
|
# Enables italics in tmux
|
||||||
#set -g default-terminal "tmux-256color"
|
#set -g default-terminal "tmux-256color"
|
||||||
set -g default-terminal "tmux-256color"
|
set -g default-terminal "screen-256color"
|
||||||
|
|
||||||
# Terminal type configuration
|
# Terminal type configuration
|
||||||
set -ga terminal-overrides ",tmux-256color:RGB"
|
set -ga terminal-overrides ",screen-256color:RGB"
|
||||||
|
set -ag terminal-overrides ",alacritty:RGB"
|
||||||
|
|
||||||
# Start window numbering at specific num
|
# Start window numbering at specific num
|
||||||
set -g base-index 1
|
set -g base-index 1
|
||||||
@@ -75,6 +81,9 @@ set -g base-index 1
|
|||||||
# Renumber windows on window close
|
# Renumber windows on window close
|
||||||
set -g renumber-windows on
|
set -g renumber-windows on
|
||||||
|
|
||||||
|
# Set vi mode
|
||||||
|
setw -g mode-keys vi
|
||||||
|
|
||||||
#######################################################
|
#######################################################
|
||||||
# KEY BINDING
|
# KEY BINDING
|
||||||
#######################################################
|
#######################################################
|
||||||
@@ -96,6 +105,13 @@ bind-key C-a send-prefix
|
|||||||
# bind s popup -h80% -w80% -KER "spt"
|
# bind s popup -h80% -w80% -KER "spt"
|
||||||
# bind C-t popup -KR "$SHELL"
|
# bind C-t popup -KR "$SHELL"
|
||||||
|
|
||||||
|
bind-key -r f run-shell "tmux neww ~/.local/bin/tmux-sessionizer"
|
||||||
|
|
||||||
|
bind -T copy-mode-vi v send -X begin-selection
|
||||||
|
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
|
||||||
|
bind P paste-buffer
|
||||||
|
bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy"
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
# END OF GENERAL CONFIGURATIONS
|
# END OF GENERAL CONFIGURATIONS
|
||||||
######################################################################
|
######################################################################
|
253
.config/waybar/config
Normal file
253
.config/waybar/config
Normal file
@@ -0,0 +1,253 @@
|
|||||||
|
// =============================================================================
|
||||||
|
//
|
||||||
|
// Waybar configuration (https://hg.sr.ht/~begs/dotfiles)
|
||||||
|
//
|
||||||
|
// Configuration reference: https://github.com/Alexays/Waybar/wiki/Configuration
|
||||||
|
//
|
||||||
|
// =============================================================================
|
||||||
|
|
||||||
|
{
|
||||||
|
// -------------------------------------------------------------------------
|
||||||
|
// Global configuration
|
||||||
|
// -------------------------------------------------------------------------
|
||||||
|
|
||||||
|
"layer": "top",
|
||||||
|
"position": "top",
|
||||||
|
//"height": 18,
|
||||||
|
|
||||||
|
"modules-left": [
|
||||||
|
"sway/mode",
|
||||||
|
"sway/workspaces",
|
||||||
|
"custom/arrow10",
|
||||||
|
"sway/window"
|
||||||
|
],
|
||||||
|
|
||||||
|
//"modules-center": [
|
||||||
|
// "sway/window"
|
||||||
|
//],
|
||||||
|
|
||||||
|
"modules-right": [
|
||||||
|
//"custom/arrow1",
|
||||||
|
//"custom/alsa",
|
||||||
|
"pulseaudio",
|
||||||
|
"bluetooth",
|
||||||
|
//"sndio",
|
||||||
|
//"custom/arrow2",
|
||||||
|
"network",
|
||||||
|
//"custom/arrow3",
|
||||||
|
"memory",
|
||||||
|
//"custom/arrow4",
|
||||||
|
"cpu",
|
||||||
|
//"custom/arrow5",
|
||||||
|
"temperature",
|
||||||
|
//"custom/arrow6",
|
||||||
|
"sway/language",
|
||||||
|
//"custom/arrow7",
|
||||||
|
//"battery",
|
||||||
|
//"custom/arrow8",
|
||||||
|
"tray",
|
||||||
|
"clock#date",
|
||||||
|
//"custom/arrow9",
|
||||||
|
"clock#time"
|
||||||
|
],
|
||||||
|
|
||||||
|
// -------------------------------------------------------------------------
|
||||||
|
// Modules
|
||||||
|
// -------------------------------------------------------------------------
|
||||||
|
|
||||||
|
"battery": {
|
||||||
|
"interval": 1,
|
||||||
|
"states": {
|
||||||
|
"warning": 30,
|
||||||
|
"critical": 15
|
||||||
|
},
|
||||||
|
"format": " {capacity}%", // Icon: bolt
|
||||||
|
"format-discharging": "{icon} {capacity}%",
|
||||||
|
"format-icons": [
|
||||||
|
"", // Icon: battery-full
|
||||||
|
"", // Icon: battery-three-quarters
|
||||||
|
"", // Icon: battery-half
|
||||||
|
"", // Icon: battery-quarter
|
||||||
|
"" // Icon: battery-empty
|
||||||
|
],
|
||||||
|
"tooltip": false
|
||||||
|
},
|
||||||
|
|
||||||
|
"clock#time": {
|
||||||
|
"interval": 10,
|
||||||
|
"format": "{:%H:%M}",
|
||||||
|
"tooltip": false
|
||||||
|
},
|
||||||
|
|
||||||
|
"clock#date": {
|
||||||
|
"interval": 20,
|
||||||
|
"format": "{:%e %b %Y}", // Icon: calendar-alt
|
||||||
|
//"tooltip-format": "{:%e %B %Y}"
|
||||||
|
"tooltip": false
|
||||||
|
},
|
||||||
|
|
||||||
|
"cpu": {
|
||||||
|
"interval": 5,
|
||||||
|
"tooltip": false,
|
||||||
|
"format": " {usage}%", // Icon: microchip
|
||||||
|
"states": {
|
||||||
|
"warning": 70,
|
||||||
|
"critical": 90
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
"sway/language": {
|
||||||
|
"format": " {}",
|
||||||
|
"min-length": 5,
|
||||||
|
"tooltip": false
|
||||||
|
},
|
||||||
|
|
||||||
|
"memory": {
|
||||||
|
"interval": 5,
|
||||||
|
"format": " {}%", // Icon: memory
|
||||||
|
"states": {
|
||||||
|
"warning": 70,
|
||||||
|
"critical": 90
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
"network": {
|
||||||
|
"interval": 5,
|
||||||
|
// TODO: format-icons
|
||||||
|
"format-wifi": " {essid} ({signalStrength}%)", // Icon: wifi
|
||||||
|
"format-ethernet": " {ifname}: {ipaddr}/{cidr}", // Icon: ethernet
|
||||||
|
//"format-ethernet": " {ifname}",
|
||||||
|
"format-disconnected": "",
|
||||||
|
//"tooltip-format": "{ifname}: {ipaddr}",
|
||||||
|
"tooltip": false
|
||||||
|
//"on-click": "cmst"
|
||||||
|
},
|
||||||
|
|
||||||
|
"sway/mode": {
|
||||||
|
"format": "<span style=\"italic\"> {}</span>", // Icon: expand-arrows-alt
|
||||||
|
"tooltip": false
|
||||||
|
},
|
||||||
|
|
||||||
|
"sway/window": {
|
||||||
|
"format": "{}",
|
||||||
|
"max-length": 30,
|
||||||
|
"tooltip": false
|
||||||
|
},
|
||||||
|
|
||||||
|
"sway/workspaces": {
|
||||||
|
"all-outputs": false,
|
||||||
|
"disable-scroll": false,
|
||||||
|
"format": "{name}",
|
||||||
|
"format-icons": {
|
||||||
|
"1:www": "龜", // Icon: firefox-browser
|
||||||
|
"2:mail": "", // Icon: mail
|
||||||
|
"3:editor": "", // Icon: code
|
||||||
|
"4:terminals": "", // Icon: terminal
|
||||||
|
"5:portal": "", // Icon: terminal
|
||||||
|
"urgent": "",
|
||||||
|
"focused": "",
|
||||||
|
"default": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
"pulseaudio": {
|
||||||
|
"scroll-step": 1,
|
||||||
|
"format": "{icon} {volume}%",
|
||||||
|
"format-bluetooth": "{icon} {volume}%",
|
||||||
|
"format-muted": "",
|
||||||
|
"format-icons": {
|
||||||
|
"headphones": "",
|
||||||
|
"handsfree": "",
|
||||||
|
"headset": "",
|
||||||
|
"phone": "",
|
||||||
|
"portable": "",
|
||||||
|
"car": "",
|
||||||
|
"default": ["", ""]
|
||||||
|
},
|
||||||
|
"on-click": "pavucontrol"
|
||||||
|
},
|
||||||
|
|
||||||
|
"temperature": {
|
||||||
|
"critical-threshold": 90,
|
||||||
|
"interval": 5,
|
||||||
|
//"format": "{icon} {temperatureC}°C",
|
||||||
|
"format": "{icon} {temperatureC}°",
|
||||||
|
"format-icons": [
|
||||||
|
"", // Icon: temperature-empty
|
||||||
|
//"", // Icon: temperature-quarter
|
||||||
|
"", // Icon: temperature-half
|
||||||
|
//"", // Icon: temperature-three-quarters
|
||||||
|
"" // Icon: temperature-full
|
||||||
|
],
|
||||||
|
"tooltip": false
|
||||||
|
},
|
||||||
|
|
||||||
|
"custom/alsa": {
|
||||||
|
"exec": "amixer get Master | sed -nre 's/.*\\[off\\].*/ muted/p; s/.*\\[(.*%)\\].*/ \\1/p'",
|
||||||
|
"on-click": "amixer set Master toggle; pkill -x -RTMIN+11 waybar",
|
||||||
|
"on-scroll-up": "amixer set Master 1+; pkill -x -RTMIN+11 waybar",
|
||||||
|
"on-scroll-down": "amixer set Master 1-; pkill -x -RTMIN+11 waybar",
|
||||||
|
"signal": 11,
|
||||||
|
"interval": 10,
|
||||||
|
"tooltip": false
|
||||||
|
},
|
||||||
|
|
||||||
|
"sndio": {
|
||||||
|
"format": " {}%"
|
||||||
|
},
|
||||||
|
|
||||||
|
"tray": {
|
||||||
|
"icon-size": 21
|
||||||
|
//"spacing": 10
|
||||||
|
},
|
||||||
|
|
||||||
|
"custom/arrow1": {
|
||||||
|
"format": "",
|
||||||
|
"tooltip": false
|
||||||
|
},
|
||||||
|
|
||||||
|
"custom/arrow2": {
|
||||||
|
"format": "",
|
||||||
|
"tooltip": false
|
||||||
|
},
|
||||||
|
|
||||||
|
"custom/arrow3": {
|
||||||
|
"format": "",
|
||||||
|
"tooltip": false
|
||||||
|
},
|
||||||
|
|
||||||
|
"custom/arrow4": {
|
||||||
|
"format": "",
|
||||||
|
"tooltip": false
|
||||||
|
},
|
||||||
|
|
||||||
|
"custom/arrow5": {
|
||||||
|
"format": "",
|
||||||
|
"tooltip": false
|
||||||
|
},
|
||||||
|
|
||||||
|
"custom/arrow6": {
|
||||||
|
"format": "",
|
||||||
|
"tooltip": false
|
||||||
|
},
|
||||||
|
|
||||||
|
"custom/arrow7": {
|
||||||
|
"format": "",
|
||||||
|
"tooltip": false
|
||||||
|
},
|
||||||
|
|
||||||
|
"custom/arrow8": {
|
||||||
|
"format": "",
|
||||||
|
"tooltip": false
|
||||||
|
},
|
||||||
|
|
||||||
|
"custom/arrow9": {
|
||||||
|
"format": "",
|
||||||
|
"tooltip": false
|
||||||
|
},
|
||||||
|
|
||||||
|
"custom/arrow10": {
|
||||||
|
"format": "",
|
||||||
|
"tooltip": false
|
||||||
|
}
|
||||||
|
}
|
298
.config/waybar/style.css
Normal file
298
.config/waybar/style.css
Normal file
@@ -0,0 +1,298 @@
|
|||||||
|
/* =============================================================================
|
||||||
|
*
|
||||||
|
* Waybar configuration
|
||||||
|
*
|
||||||
|
* Configuration reference: https://github.com/Alexays/Waybar/wiki/Configuration
|
||||||
|
*
|
||||||
|
* =========================================================================== */
|
||||||
|
|
||||||
|
/* -----------------------------------------------------------------------------
|
||||||
|
* Keyframes
|
||||||
|
* -------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
@keyframes blink-warning {
|
||||||
|
70% {
|
||||||
|
color: @light;
|
||||||
|
}
|
||||||
|
|
||||||
|
to {
|
||||||
|
color: @light;
|
||||||
|
background-color: @warning;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes blink-critical {
|
||||||
|
70% {
|
||||||
|
color: @light;
|
||||||
|
}
|
||||||
|
|
||||||
|
to {
|
||||||
|
color: @light;
|
||||||
|
background-color: @critical;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* -----------------------------------------------------------------------------
|
||||||
|
* Styles
|
||||||
|
* -------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
/* COLORS */
|
||||||
|
|
||||||
|
/* Nord */
|
||||||
|
/*@define-color light #eceff4;
|
||||||
|
@define-color dark #2e3440;
|
||||||
|
@define-color warning #ebcb8b;
|
||||||
|
@define-color critical #d08770;
|
||||||
|
@define-color mode #4c566a;
|
||||||
|
@define-color workspaces #5e81ac;
|
||||||
|
@define-color workspacesfocused #81a1c1;
|
||||||
|
@define-color sound #d8dee9;
|
||||||
|
@define-color network #4c566a;
|
||||||
|
@define-color memory #88c0d0;
|
||||||
|
@define-color cpu #434c5e;
|
||||||
|
@define-color temp #d8dee9;
|
||||||
|
@define-color layout #5e81ac;
|
||||||
|
@define-color battery #88c0d0;
|
||||||
|
@define-color date #2e3440;
|
||||||
|
@define-color time #eceff4;*/
|
||||||
|
|
||||||
|
/* Gruvbox */
|
||||||
|
@define-color light #ebdbb2;
|
||||||
|
@define-color dark #282828;
|
||||||
|
@define-color warning #fabd2f;
|
||||||
|
@define-color critical #cc241d;
|
||||||
|
@define-color mode #a89984;
|
||||||
|
@define-color workspaces #458588;
|
||||||
|
@define-color workspacesfocused #83a598;
|
||||||
|
@define-color sound #d3869b;
|
||||||
|
@define-color network #b16286;
|
||||||
|
@define-color memory #8ec07c;
|
||||||
|
@define-color cpu #98971a;
|
||||||
|
@define-color temp #b8bb26;
|
||||||
|
@define-color layout #689d6a;
|
||||||
|
@define-color battery #fabd2f;
|
||||||
|
@define-color date #282828;
|
||||||
|
@define-color time #ebdbb2;
|
||||||
|
|
||||||
|
/* Reset all styles */
|
||||||
|
* {
|
||||||
|
border: none;
|
||||||
|
border-radius: 0;
|
||||||
|
min-height: 0;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* The whole bar */
|
||||||
|
#waybar {
|
||||||
|
background: transparent;
|
||||||
|
color: @light;
|
||||||
|
font-family: Hack Nerd Font;
|
||||||
|
font-size: 10pt;
|
||||||
|
/*font-weight: bold;*/
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Each module */
|
||||||
|
#battery,
|
||||||
|
#clock,
|
||||||
|
#cpu,
|
||||||
|
#language,
|
||||||
|
#memory,
|
||||||
|
#mode,
|
||||||
|
#network,
|
||||||
|
#pulseaudio,
|
||||||
|
#temperature,
|
||||||
|
#custom-alsa,
|
||||||
|
#sndio,
|
||||||
|
#tray {
|
||||||
|
padding-left: 10px;
|
||||||
|
padding-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Each module that should blink */
|
||||||
|
#mode,
|
||||||
|
#memory,
|
||||||
|
#temperature,
|
||||||
|
#battery {
|
||||||
|
animation-timing-function: linear;
|
||||||
|
animation-iteration-count: infinite;
|
||||||
|
animation-direction: alternate;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Each critical module */
|
||||||
|
#memory.critical,
|
||||||
|
#cpu.critical,
|
||||||
|
#temperature.critical,
|
||||||
|
#battery.critical {
|
||||||
|
color: @critical;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Each critical that should blink */
|
||||||
|
#mode,
|
||||||
|
#memory.critical,
|
||||||
|
#temperature.critical,
|
||||||
|
#battery.critical.discharging {
|
||||||
|
animation-name: blink-critical;
|
||||||
|
animation-duration: 2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Each warning */
|
||||||
|
#network.disconnected,
|
||||||
|
#memory.warning,
|
||||||
|
#cpu.warning,
|
||||||
|
#temperature.warning,
|
||||||
|
#battery.warning {
|
||||||
|
color: @warning;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Each warning that should blink */
|
||||||
|
#battery.warning.discharging {
|
||||||
|
animation-name: blink-warning;
|
||||||
|
animation-duration: 3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* And now modules themselves in their respective order */
|
||||||
|
|
||||||
|
#mode { /* Shown current Sway mode (resize etc.) */
|
||||||
|
color: @light;
|
||||||
|
background: @mode;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Workspaces stuff */
|
||||||
|
#workspaces button {
|
||||||
|
/*font-weight: bold;*/
|
||||||
|
padding-left: 4px;
|
||||||
|
padding-right: 4px;
|
||||||
|
color: @dark;
|
||||||
|
background: @workspaces;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.focused {
|
||||||
|
background: @workspacesfocused;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*#workspaces button.urgent {
|
||||||
|
border-color: #c9545d;
|
||||||
|
color: #c9545d;
|
||||||
|
}*/
|
||||||
|
|
||||||
|
#window {
|
||||||
|
margin-right: 40px;
|
||||||
|
margin-left: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-alsa,
|
||||||
|
#pulseaudio,
|
||||||
|
#sndio {
|
||||||
|
background: @sound;
|
||||||
|
color: @dark;
|
||||||
|
}
|
||||||
|
|
||||||
|
#network {
|
||||||
|
background: @network;
|
||||||
|
color: @light;
|
||||||
|
}
|
||||||
|
|
||||||
|
#memory {
|
||||||
|
background: @memory;
|
||||||
|
color: @dark;
|
||||||
|
}
|
||||||
|
|
||||||
|
#cpu {
|
||||||
|
background: @cpu;
|
||||||
|
color: @light;
|
||||||
|
}
|
||||||
|
|
||||||
|
#temperature {
|
||||||
|
background: @temp;
|
||||||
|
color: @dark;
|
||||||
|
}
|
||||||
|
|
||||||
|
#language {
|
||||||
|
background: @layout;
|
||||||
|
color: @light;
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery {
|
||||||
|
background: @battery;
|
||||||
|
color: @dark;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tray {
|
||||||
|
background: @date;
|
||||||
|
}
|
||||||
|
|
||||||
|
#clock.date {
|
||||||
|
background: @date;
|
||||||
|
color: @light;
|
||||||
|
}
|
||||||
|
|
||||||
|
#clock.time {
|
||||||
|
background: @time;
|
||||||
|
color: @dark;
|
||||||
|
}
|
||||||
|
|
||||||
|
#pulseaudio.muted {
|
||||||
|
/* No styles */
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-arrow1 {
|
||||||
|
font-size: 16px;
|
||||||
|
color: @sound;
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-arrow2 {
|
||||||
|
font-size: 16px;
|
||||||
|
color: @network;
|
||||||
|
background: @sound;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-arrow3 {
|
||||||
|
font-size: 16px;
|
||||||
|
color: @memory;
|
||||||
|
background: @network;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-arrow4 {
|
||||||
|
font-size: 16px;
|
||||||
|
color: @cpu;
|
||||||
|
background: @memory;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-arrow5 {
|
||||||
|
font-size: 16px;
|
||||||
|
color: @temp;
|
||||||
|
background: @cpu;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-arrow6 {
|
||||||
|
font-size: 16px;
|
||||||
|
color: @layout;
|
||||||
|
background: @temp;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-arrow7 {
|
||||||
|
font-size: 16px;
|
||||||
|
color: @battery;
|
||||||
|
background: @layout;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-arrow8 {
|
||||||
|
font-size: 16px;
|
||||||
|
color: @date;
|
||||||
|
background: @battery;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-arrow9 {
|
||||||
|
font-size: 16px;
|
||||||
|
color: @time;
|
||||||
|
background: @date;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-arrow10 {
|
||||||
|
font-size: 16px;
|
||||||
|
color: @workspaces;
|
||||||
|
background: transparent;
|
||||||
|
}
|
39
.config/wezterm/wezterm.lua
Normal file
39
.config/wezterm/wezterm.lua
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
local wezterm = require"wezterm"
|
||||||
|
local mux = wezterm.mux
|
||||||
|
local act = wezterm.action
|
||||||
|
|
||||||
|
wezterm.on('gui-startup', function()
|
||||||
|
local tab, pane, window = mux.spawn_window({})
|
||||||
|
window:gui_window():maximize()
|
||||||
|
end)
|
||||||
|
|
||||||
|
return {
|
||||||
|
-- Font settings
|
||||||
|
font = wezterm.font_with_fallback {
|
||||||
|
'FiraCode Nerd Font Mono',
|
||||||
|
'Jetbrains Mono'
|
||||||
|
},
|
||||||
|
font_size = 18,
|
||||||
|
|
||||||
|
color_scheme = "Gruvbox Dark",
|
||||||
|
-- Tab bar
|
||||||
|
show_tab_index_in_tab_bar = false,
|
||||||
|
hide_tab_bar_if_only_one_tab = true,
|
||||||
|
adjust_window_size_when_changing_font_size = false,
|
||||||
|
-- Window look
|
||||||
|
window_decorations = "RESIZE",
|
||||||
|
-- Wayland
|
||||||
|
enable_wayland = true,
|
||||||
|
inactive_pane_hsb = {
|
||||||
|
saturation = 0.8,
|
||||||
|
brightness = 0.7
|
||||||
|
},
|
||||||
|
window_frame = {
|
||||||
|
font = wezterm.font { family = 'Noto Sans', weight = 'Regular' },
|
||||||
|
},
|
||||||
|
scrollback_lines = 26000,
|
||||||
|
-- Keybindings
|
||||||
|
-- disable_default_key_bindings = true,
|
||||||
|
|
||||||
|
leader = { key = 'b', mods = 'CMD', timeout_milliseconds = 2000 },
|
||||||
|
}
|
25
.local/bin/tmux-sessionizer
Executable file
25
.local/bin/tmux-sessionizer
Executable file
@@ -0,0 +1,25 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if [[ $# -eq 1 ]]; then
|
||||||
|
selected=$1
|
||||||
|
else
|
||||||
|
selected=$(find ~/code ~/personal -mindepth 1 -maxdepth 1 -type d | fzf)
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z $selected ]]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
selected_name=$(basename "$selected" | tr . _)
|
||||||
|
tmux_running=$(pgrep tmux)
|
||||||
|
|
||||||
|
if [[ -z $TMUX ]] && [[ -z $tmux_running ]]; then
|
||||||
|
tmux new-session -s $selected_name -c $selected
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! tmux has-session -t $selected_name 2> /dev/null; then
|
||||||
|
tmux new-session -ds $selected_name -c $selected
|
||||||
|
fi
|
||||||
|
|
||||||
|
tmux switch-client -t $selected_name
|
@@ -1,7 +1,8 @@
|
|||||||
elixir 1.6
|
elixir 1.18.2-otp-27
|
||||||
kubectl 1.18.2
|
golang 1.24.0
|
||||||
helm 2.9.1
|
erlang 27.2.3
|
||||||
eksctl 0.2.1
|
python 3.13.2
|
||||||
terraform 0.14.6
|
neovim 0.10.4
|
||||||
terragrunt 0.23.31
|
java openjdk-19
|
||||||
kustomize 3.10.0
|
awscli 2.24.7
|
||||||
|
nodejs 18.20.4
|
||||||
|
14
.zshenv
14
.zshenv
@@ -11,18 +11,10 @@ alias vim="nvim"
|
|||||||
alias v="nvim"
|
alias v="nvim"
|
||||||
alias wget="wget -q -c -w 3 --show-progress"
|
alias wget="wget -q -c -w 3 --show-progress"
|
||||||
alias p="python"
|
alias p="python"
|
||||||
|
alias va=". .venv/bin/activate"
|
||||||
|
|
||||||
## Second Measure
|
alias aoeu="asdf"
|
||||||
alias pa="aws-okta exec prod-admin -- "
|
alias update-nvim-nightly='asdf uninstall neovim nightly && asdf install neovim nightly'
|
||||||
alias pe="aws-okta exec prod-eng -- "
|
|
||||||
alias da="aws-okta exec dev-admin -- "
|
|
||||||
alias de="aws-okta exec dev-eng -- "
|
|
||||||
alias s3="aws s3"
|
|
||||||
alias kg="kubectl get "
|
|
||||||
alias kd="kubectl describe "
|
|
||||||
alias ke="kubectl edit "
|
|
||||||
alias ctx="kubectx"
|
|
||||||
alias ctl="kubectl"
|
|
||||||
|
|
||||||
# zsh-autosuggest
|
# zsh-autosuggest
|
||||||
bindkey '^ ' autosuggest-accept
|
bindkey '^ ' autosuggest-accept
|
||||||
|
12
.zshrc
12
.zshrc
@@ -4,7 +4,7 @@ ZSH_THEME="robbyrussell"
|
|||||||
# Plugins
|
# Plugins
|
||||||
plugins=(
|
plugins=(
|
||||||
git
|
git
|
||||||
# zsh-autosuggestions
|
fzf
|
||||||
)
|
)
|
||||||
|
|
||||||
export ZSH=$HOME/.oh-my-zsh
|
export ZSH=$HOME/.oh-my-zsh
|
||||||
@@ -12,9 +12,10 @@ source $ZSH/oh-my-zsh.sh
|
|||||||
|
|
||||||
# Path settings
|
# Path settings
|
||||||
export PYENV_ROOT="$HOME/.pyenv"
|
export PYENV_ROOT="$HOME/.pyenv"
|
||||||
export PATH="$PYENV_ROOT/bin:$PATH"
|
export PATH="$PYENV_ROOT/shims:$PATH"
|
||||||
export GOPATH=$HOME/go
|
export GOPATH=$HOME/go
|
||||||
export PATH=$PATH:$GOPATH/bin
|
export PATH=$PATH:$GOPATH/bin
|
||||||
|
export PATH="$HOME/.local/bin:$PATH"
|
||||||
export PATH="$HOME/.cargo/bin:$PATH"
|
export PATH="$HOME/.cargo/bin:$PATH"
|
||||||
export PATH="$HOME/.poetry/bin:$PATH"
|
export PATH="$HOME/.poetry/bin:$PATH"
|
||||||
export PATH=$PATH:~/.local/bin
|
export PATH=$PATH:~/.local/bin
|
||||||
@@ -30,10 +31,3 @@ SAVEHIST=10000
|
|||||||
#compinit
|
#compinit
|
||||||
#setopt COMPLETE_ALIASES
|
#setopt COMPLETE_ALIASES
|
||||||
|
|
||||||
# goodies
|
|
||||||
eval "$(direnv hook zsh)"
|
|
||||||
eval "$(pyenv init -)"
|
|
||||||
eval "$(starship init zsh)"
|
|
||||||
|
|
||||||
. $HOME/.asdf/asdf.sh
|
|
||||||
. $HOME/.asdf/completions/asdf.bash
|
|
||||||
|
22
bootstrap.sh
Normal file → Executable file
22
bootstrap.sh
Normal file → Executable file
@@ -7,21 +7,27 @@ sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/too
|
|||||||
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
|
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
|
||||||
|
|
||||||
# Install asdf-vm
|
# Install asdf-vm
|
||||||
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.8.0
|
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.9.0
|
||||||
|
|
||||||
# Install pyenv
|
# Install asdf plugins
|
||||||
git clone https://github.com/pyenv/pyenv.git ~/.pyenv
|
asdf plugin add python
|
||||||
|
asdf plugin add golang
|
||||||
|
|
||||||
|
# Install rustup toolchain
|
||||||
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||||
|
|
||||||
# Install starship
|
# Install starship
|
||||||
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
sh -c "$(curl -fsSL https://starship.rs/install.sh)"
|
||||||
|
|
||||||
# Link files
|
# Link files
|
||||||
ln -s ~/.dotfiles/.zshrc .zshrc
|
ln -s ~/.dotfiles/.zshrc ~/.zshrc
|
||||||
ln -s ~/.dotfiles/.zshenv .zshenv
|
ln -s ~/.dotfiles/.zshenv ~/.zshenv
|
||||||
ln -s ~/.dotfiles/.tool-versions .tool-versions
|
ln -s ~/.dotfiles/.tool-versions ~/.tool-versions
|
||||||
ln -s ~/.dotfiles/.tmux.conf .tmux.conf
|
ln -s ~/.dotfiles/.tmux.conf ~/.tmux.conf
|
||||||
ln -s ~/.dotfiles/.vim .vim
|
|
||||||
ln -s ~/.dotfiles/.config/nvim ~/.config/nvim
|
ln -s ~/.dotfiles/.config/nvim ~/.config/nvim
|
||||||
|
ln -s ~/.dotfiles/.config/i3 ~/.config/i3
|
||||||
|
ln -s ~/.dotfiles/.config/i3status ~/.config/i3status
|
||||||
|
ln -s ~/.dotfiles/.config/alacritty ~/.config/alacritty
|
||||||
|
|
||||||
# Source zsh
|
# Source zsh
|
||||||
source ~/.zshrc
|
source ~/.zshrc
|
||||||
|
Reference in New Issue
Block a user