Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Device/mac #50

Merged
merged 7 commits into from
Jun 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 10 additions & 21 deletions dot_config/executable_starship.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# https://starship.rs/ja-jp/config/
# https://i.stack.imgur.com/KTSQa.png
format = """
[┌── ](bold white)$status$username$directory$git_branch$git_status$git_commit$golang$python$deno$cmd_duration$memory_usage$battery$time
[┌── ](bold white)$status$all
[└─](bold white)$character"""

scan_timeout = 10
Expand All @@ -15,13 +14,15 @@ success_symbol = "[▶ ](bold white) "
#error_symbol = "[▶ ](bold red) "
error_symbol = "[✗ ](bold red) "

[line_break]
disabled = true

[shell]
disabled = false
disabled = true

[shlvl]
disabled = false
format = "[ Lv.$shlvl ](bold black)"
threshold = 2
format = '[\[ Lv.$shlvl\] ]($style)'

[username]
disabled = true
Expand All @@ -30,10 +31,13 @@ style_user = "bold green"
style_root = "bold red"
format = "[ $user]($style) "

[package]
disabled = true

[directory]
style = "bold blue"
read_only_style = "white"
fish_style_pwd_dir_length = 3
fish_style_pwd_dir_length = 1
format = "[$read_only]($read_only_style)[ ]($style)[$path]($style) "
truncation_length = 4
truncation_symbol = ".../"
Expand Down Expand Up @@ -83,18 +87,3 @@ style = "bold underline white"
[[battery.display]]
threshold = 10
style = "bold red"

[python]
style = "bold green"

[golang]
disabled = false
symbol = "Go "

[docker_context]
format = "via [🐋 $context](blue bold)"

#[custom.fd_count]
#command = "cat ${XDG_CONFIG_HOME}/rclone/cache_file.txt"
#when = "test -f ${XDG_CONFIG_HOME}/rclone/cache_file.txt"
#format = "☁️⬆️⬆️+$output"
1 change: 1 addition & 0 deletions dot_config/mise/default-go-packages
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github.com/mattn/memo@latest
2 changes: 1 addition & 1 deletion dot_config/npm/npmrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
prefix=${XDG_DATA_HOME}/npm
#prefix=${XDG_DATA_HOME}/npm
cache=${XDG_CACHE_HOME}/npm
#tmp=${XDG_RUNTIME_DIR}/npm
init-module=${XDG_CONFIG_HOME}/npm/config/npm-init.js
34 changes: 17 additions & 17 deletions dot_config/nvim/lazy-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
"LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" },
"alpha-nvim": { "branch": "main", "commit": "41283fb402713fc8b327e60907f74e46166f4cfd" },
"barbar.nvim": { "branch": "master", "commit": "79f7d16578a167bdf5355725551ef7d90613a601" },
"catppuccin": { "branch": "main", "commit": "c0bea773a09e49e123136b099bce9ddc1bf395d2" },
"catppuccin": { "branch": "main", "commit": "31fcfb02c47952d5c75aec893b93b2878abe5fbb" },
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
"fidget.nvim": { "branch": "main", "commit": "0ba1e16d07627532b6cae915cc992ecac249fb97" },
"flash.nvim": { "branch": "main", "commit": "43f67935d388fbb540f8b40e8cbfd80de54f978a" },
"gitsigns.nvim": { "branch": "main", "commit": "47c8e3e571376b24de62408fd0c9d12f0a9fc0a3" },
"go.nvim": { "branch": "master", "commit": "fca26b05699ad06c077721823a0b1a8e02539d5c" },
"gitsigns.nvim": { "branch": "main", "commit": "6b1a14eabcebbcca1b9e9163a26b2f8371364cb7" },
"go.nvim": { "branch": "master", "commit": "cde0c7a110c0f65b9e4e6baf342654268efff371" },
"guihua.lua": { "branch": "master", "commit": "225db770e36aae6a1e9e3a65578095c8eb4038d3" },
"hlchunk.nvim": { "branch": "main", "commit": "3c06deb40d01b0b0efc81cbe8423df1346dab2fd" },
"lazy.nvim": { "branch": "main", "commit": "4c6479e98ad643cd584e9e7c4095c463e0d810eb" },
"hlchunk.nvim": { "branch": "main", "commit": "930fe6262f87d66ca0c85dada3bb7c2a8cb6ec3e" },
"lazy.nvim": { "branch": "main", "commit": "c882227f1fdc4580d14212df8f814a0772951e3d" },
"lsp-lens.nvim": { "branch": "main", "commit": "48bb1a7e271424c15f3d588d54adc9b7c319d977" },
"lsp-zero.nvim": { "branch": "v2.x", "commit": "9a686513eaaa13d737d0fec8956a18268ead8b29" },
"lsp_signature.nvim": { "branch": "master", "commit": "a38da0a61c172bb59e34befc12efe48359884793" },
Expand All @@ -21,36 +21,36 @@
"mason-lspconfig.nvim": { "branch": "main", "commit": "37a336b653f8594df75c827ed589f1c91d91ff6c" },
"mason-null-ls.nvim": { "branch": "main", "commit": "de19726de7260c68d94691afb057fa73d3cc53e7" },
"mason.nvim": { "branch": "main", "commit": "0950b15060067f752fde13a779a994f59516ce3d" },
"none-ls.nvim": { "branch": "main", "commit": "cc0a3c45047e3daf85d07c1571d65476cfce6480" },
"none-ls.nvim": { "branch": "main", "commit": "0d1b3fa2ad0b371b94cb4b9a27ba6e5a1a915c91" },
"nvim-autopairs": { "branch": "master", "commit": "c15de7e7981f1111642e7e53799e1211d4606cb9" },
"nvim-cmp": { "branch": "main", "commit": "a110e12d0b58eefcf5b771f533fc2cf3050680ac" },
"nvim-dap": { "branch": "master", "commit": "6f79b822997f2e8a789c6034e147d42bc6706770" },
"nvim-dap-ui": { "branch": "master", "commit": "b7267003ba4dd860350be86f75b9d9ea287cedca" },
"nvim-dap-virtual-text": { "branch": "master", "commit": "d7c695ea39542f6da94ee4d66176f5d660ab0a77" },
"nvim-lspconfig": { "branch": "master", "commit": "bd7c76375a511994c9ca8d69441f134dc10ae3bd" },
"nvim-lspconfig": { "branch": "master", "commit": "7edfd6692ba17f8d4fe08d84142781898ab0a672" },
"nvim-nio": { "branch": "master", "commit": "7969e0a8ffabdf210edd7978ec954a47a737bbcc" },
"nvim-spectre": { "branch": "master", "commit": "ec67d4b5370094b923dfcf6b09b39142f2964861" },
"nvim-tree.lua": { "branch": "master", "commit": "2086e564c4d23fea714e8a6d63b881e551af2f41" },
"nvim-treesitter": { "branch": "master", "commit": "4d112977c706034370a7fed65f7c957ec268eaa2" },
"nvim-spectre": { "branch": "master", "commit": "49fae98ef2bfa8342522b337892992e3495065d5" },
"nvim-tree.lua": { "branch": "master", "commit": "8b2c5c678be4b49dff6a2df794877000113fd77b" },
"nvim-treesitter": { "branch": "master", "commit": "7ff0b8d3d21b15eb7231fcbd2acfded8987f5efd" },
"nvim-web-devicons": { "branch": "master", "commit": "c0cfc1738361b5da1cd0a962dd6f774cc444f856" },
"plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
"render-markdown": { "branch": "main", "commit": "e353f1f566195176b54e2af5b321b517ac240102" },
"rustaceanvim": { "branch": "master", "commit": "d83c8435d846d12cf3031e9d263fb78bd2239129" },
"render-markdown": { "branch": "main", "commit": "0d6ebe032367eb77082d28585c7872e93f88df01" },
"rustaceanvim": { "branch": "master", "commit": "d6d7620b66d74b3b16defcf85cbef7b3582795b3" },
"smart-open.nvim": { "branch": "0.2.x", "commit": "87626ee8748b9bba22093adec7bb58c63e7214f0" },
"sqlite.lua": { "branch": "master", "commit": "d0ffd703b56d090d213b497ed4eb840495f14a11" },
"ssr.nvim": { "branch": "main", "commit": "bb323ba621ac647b4ac5638b47666e3ef3c279e1" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" },
"telescope-fzy-native.nvim": { "branch": "master", "commit": "282f069504515eec762ab6d6c89903377252bf5b" },
"telescope.nvim": { "branch": "master", "commit": "c392f1b78eaaf870ca584bd698e78076ed301b26" },
"telescope.nvim": { "branch": "master", "commit": "7bd2f9b72f8449780b79bcf351534e2cd36ec43a" },
"todo-comments.nvim": { "branch": "main", "commit": "51e10f838e84b4756c16311d0b1ef0972c6482d2" },
"toggleterm.nvim": { "branch": "main", "commit": "fee58a0473fd92b28c34f8f724e4918b15ba30a3" },
"toggleterm.nvim": { "branch": "main", "commit": "cd55bf6aab3f88c259fa29ea86bbdcb1a325687d" },
"translate.nvim": { "branch": "main", "commit": "30cc9e9f339b61e7bd40bc1ba7af73ea193bf589" },
"treesj": { "branch": "main", "commit": "f98deb33805485b56a8d44d1a27d16874af00d7f" },
"trouble.nvim": { "branch": "main", "commit": "58a3acfc6d8d819324dab4c87068596319032e64" },
"vim-fugitive": { "branch": "master", "commit": "64d6cafb9dcbacce18c26d7daf617ebb96b273f3" },
"trouble.nvim": { "branch": "main", "commit": "e5d0e04121c662ce29190a57dd03655d43c59d44" },
"vim-fugitive": { "branch": "master", "commit": "d0c1a437536778bcc8174b7cb2ffdf98f611e6fe" },
"vim-maximizer": { "branch": "master", "commit": "2e54952fe91e140a2e69f35f22131219fcd9c5f1" },
"vim-rhubarb": { "branch": "master", "commit": "ee69335de176d9325267b0fd2597a22901d927b1" },
"vimdoc-ja": { "branch": "master", "commit": "a2b580bb0a4c715543383d210e06ec37e55bf49a" },
"vimdoc-ja": { "branch": "master", "commit": "b12e83eed20547ec0305901bc32a6fe112f833d1" },
"which-key.nvim": { "branch": "main", "commit": "0099511294f16b81c696004fa6a403b0ae61f7a0" },
"winresizer": { "branch": "master", "commit": "9bd559a03ccec98a458e60c705547119eb5350f3" }
}
6 changes: 3 additions & 3 deletions dot_config/nvim/lua/plugins/executable_lsp-zero.lua
Original file line number Diff line number Diff line change
Expand Up @@ -163,14 +163,14 @@ return {
local lsp_zero = require("lsp-zero")
require("mason-lspconfig").setup({
ensure_installed = {
"gopls",
--"gopls",
"marksman",
"lua_ls",
"terraformls",
"tflint",
"tsserver",
"yamlls",
"dagger",
--"dagger",
-- "rust_analyzer",
"jdtls",
"clangd",
Expand Down Expand Up @@ -303,7 +303,7 @@ return {
"terraform_fmt",
"terraform_validate",
"stylua",
"gofumpt",
--"gofumpt",
"golangci_lint",
-- "prettierd",
},
Expand Down
8 changes: 4 additions & 4 deletions dot_config/tmux/tmux.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set -g mouse on
set -q -g status-utf8 on # expect UTF-8 (tmux < 2.2)
setw -q -g utf8 on

set -g history-limit 5000 # boost history
set -g history-limit 10000 # boost history

set -g automatic-rename on

Expand Down Expand Up @@ -43,7 +43,7 @@ set -g visual-activity off
# -- navigation ----------------------------------------------------------------

# create session
bind C-c new-session
bind n new-session

# find session
bind C-f command-prompt -p find-session 'switch-client -t %%'
Expand Down Expand Up @@ -72,8 +72,8 @@ bind -r K resize-pane -U 10
bind -r L resize-pane -R 10

# window navigation
unbind n
unbind p
#unbind n
#unbind p

bind -r C-h previous-window # select previous window
bind -r C-l next-window # select next window
Expand Down
11 changes: 5 additions & 6 deletions dot_config/tmux/tmux.conf.local
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,13 @@ set -g window-status-bell-style default

set -g window-status-activity-style default

# Set inactive pane border color to grey
#set -g pane-border-style fg=grey
setw -g window-active-style fg=white # アクティブペインの前景色

# Set active pane border color to cyan
set -g pane-active-border-style fg=cyan
setw -g window-style fg=colour244 # 非アクティブペインの前景色

# Set active pane background color to a light black
set -g pane-active-border-style bg=colour228
set-option -g pane-active-border-style fg=colour10 # アクティブなペインの分割線の色

set-option -g pane-border-style fg=colour244 # 非アクティブなペインの分割線の色

# Customize the status line format
set -g status-left "#[fg=green]*#W"
118 changes: 63 additions & 55 deletions dot_config/zsh/defer.zsh
Original file line number Diff line number Diff line change
@@ -1,5 +1,64 @@
#!/bin/zsh

# Zoxide
(( ${+commands[zoxide]} )) && eval "$(zoxide init zsh)"

# fzf
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
(( ${+commands[fzf]} )) && eval "$(fzf --zsh)"

# Mise
(( ${+commands[mise]} )) && eval "$(mise activate zsh)"

# Go
export GO111MODULE="on"
export MISE_GO_DEFAULT_PACKAGES_FILE="$XDG_CONFIG_HOME/mise/default-go-packages"

# less
export LESSHISTFILE='-'

# Node.js
export NODE_REPL_HISTORY="$XDG_STATE_HOME/node_history"
export NODE_PATH="$XDG_DATA_HOME/npm/lib/node_modules"

# npm
export NPM_CONFIG_DIR="$XDG_CONFIG_HOME/npm"
export NPM_DATA_DIR="$XDG_DATA_HOME/npm"
export NPM_CACHE_DIR="$XDG_CACHE_HOME/npm"
export NPM_CONFIG_USERCONFIG="$NPM_CONFIG_DIR/npmrc"

# irb
export IRBRC="$XDG_CONFIG_HOME/irb/irbrc"

# Python
export PYTHONSTARTUP="$XDG_CONFIG_HOME/python/startup.py"

# pylint
export PYLINTHOME="$XDG_CACHE_HOME/pylint"

# SQLite3
export SQLITE_HISTORY="$XDG_STATE_HOME/sqlite_history"

# MySQL
export MYSQL_HISTFILE="$XDG_STATE_HOME/mysql_history"

# PostgreSQL
export PSQL_HISTORY="$XDG_STATE_HOME/psql_history"

# ripgrep
export RIPGREP_CONFIG_PATH="$XDG_CONFIG_HOME/ripgrep/config"

# tealdeer
export TEALDEER_CONFIG_DIR="$XDG_CONFIG_HOME/tealdeer"

# GPG
export GPG_TTY=$TTY
export GNUPGHOME="$XDG_CONFIG_HOME/gnupg"

#export TF_DATA_DIR="$XDG_DATA_HOME/terraform/$(pwd)"
export TF_PLUGIN_CACHE_DIR="$XDG_CACHE_HOME/terraform"
export TF_LOG_PATH="$XDG_DATA_HOME/terraform/terraform.log"

# anyframe
autoload -Uz anyframe-init && anyframe-init

Expand All @@ -26,8 +85,10 @@ function j() {
}

function jj() {
local repository=$(ghq list --full-path --vcs git | fzf-tmux -p 90%,90%)
[ -n "$repository" ] && builtin cd "$repository"
local root=$(ghq root)
local r=$(ghq list | fzf-tmux -p 90%,90% --preview-window="right,40%" --preview="git --git-dir '$root/{}/.git' log --color=always")
local repository="$root/$r"
[ -n "$repository" ] && builtin cd "$repository"
}

function awsc() {
Expand Down Expand Up @@ -111,60 +172,7 @@ if grep -qE "(Microsoft|WSL)" /proc/version &> /dev/null ; then
alias II='explorer.exe'
fi

# less
export LESSHISTFILE='-'

# Node.js
export NODE_REPL_HISTORY="$XDG_STATE_HOME/node_history"
export NODE_PATH="$XDG_DATA_HOME/npm/lib/node_modules"

# npm
export NPM_CONFIG_DIR="$XDG_CONFIG_HOME/npm"
export NPM_DATA_DIR="$XDG_DATA_HOME/npm"
export NPM_CACHE_DIR="$XDG_CACHE_HOME/npm"
export NPM_CONFIG_USERCONFIG="$NPM_CONFIG_DIR/npmrc"

# irb
export IRBRC="$XDG_CONFIG_HOME/irb/irbrc"

# Python
export PYTHONSTARTUP="$XDG_CONFIG_HOME/python/startup.py"

# pylint
export PYLINTHOME="$XDG_CACHE_HOME/pylint"

# SQLite3
export SQLITE_HISTORY="$XDG_STATE_HOME/sqlite_history"

# MySQL
export MYSQL_HISTFILE="$XDG_STATE_HOME/mysql_history"

# PostgreSQL
export PSQL_HISTORY="$XDG_STATE_HOME/psql_history"

# ripgrep
export RIPGREP_CONFIG_PATH="$XDG_CONFIG_HOME/ripgrep/config"

# tealdeer
export TEALDEER_CONFIG_DIR="$XDG_CONFIG_HOME/tealdeer"

# GPG
export GPG_TTY=$TTY
export GNUPGHOME="$XDG_CONFIG_HOME/gnupg"

#export TF_DATA_DIR="$XDG_DATA_HOME/terraform/$(pwd)"
export TF_PLUGIN_CACHE_DIR="$XDG_CACHE_HOME/terraform"
export TF_LOG_PATH="$XDG_DATA_HOME/terraform/terraform.log"

# Zoxide
(( ${+commands[zoxide]} )) && eval "$(zoxide init zsh)"
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh

# Mise
(( ${+commands[mise]} )) && eval "$(mise activate zsh)"

# fzf
(( ${+commands[fzf]} )) && eval "$(fzf --zsh)"

if (( ${+commands[brew]} )); then
FPATH="$(brew --prefix)/share/zsh/site-functions:${FPATH}"
Expand Down
4 changes: 0 additions & 4 deletions dot_config/zsh/dot_zshenv.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,6 @@ export CARGO_TARGET_DIR="$XDG_DATA_HOME/target"
{{ end }}
{{ end }}

# Go
export GOPATH="$XDG_DATA_HOME/go"
export GO111MODULE="on"

# Deno
export DENO_INSTALL="$XDG_DATA_HOME/deno"
export DENO_INSTALL_ROOT="$DENO_INSTALL"
Expand Down
1 change: 0 additions & 1 deletion dot_config/zsh/executable_dot_zshrc.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
path=(
$HOME/.local/bin (N-/)
$CARGO_HOME/bin (N-/)
$GOPATH/bin (N-/)
$DENO_INSTALL/bin (N-/)
$GEM_HOME/bin (N-/)
$GHRED_DATA_HOME/bin (N-/)
Expand Down
Loading