feat(ideavim): Use intellimacs as base for ideavim

This commit is contained in:
js0ny 2025-03-20 20:01:49 +00:00
parent c3fa0c4b5c
commit 2ae16a5cf8
3 changed files with 87 additions and 19 deletions

2
.gitignore vendored
View file

@ -39,3 +39,5 @@ lazy-lock.json
# Emacs # Emacs
*.elc *.elc
common/**/*current*

View file

@ -1,26 +1,76 @@
set shell := ["fish", "-c"] set shell := ["fish", "-c"]
set windows-shell := ["pwsh", "-c"] set windows-shell := ["pwsh", "-c"]
check_info: DOTFILES := join(home_directory(), ".dotfiles")
shellcheck -x -s sh **/*.sh platforms/mac/yabairc XDG_CONFIG_HOME := \
shellcheck -x -s bash **/*.bash tools/bash/* scripts/*.{sh,zsh,bash} **/*.bashrc if env_var("XDG_CONFIG_HOME") != "" {env_var("XDG_CONFIG_HOME")} \
check: else {
shellcheck -x -s sh --severity=error **/*.sh platforms/mac/yabairc if os_family() == "windows" {
shellcheck -x -s bash --severity=error **/*.bash tools/bash/* **/*.bashrc env_var("APPDATA")
format: } else {
shfmt -w -i 2 -ci -bn -p **/*.sh join(home_directory(), ".config")
shfmt -w -i 2 -ci -bn -ln bash **/*.bash platforms/mac/sketchybar/sketchybarrc }
# Ignore syntax errors in zsh files }
shfmt -w -i 2 -ci -bn -ln bash **/*.zsh tools/zsh/**/* **/zshrc || true
pull:
git pull github master
git pull codeberg master
push: XDG_DATA_HOME := \
git push github master if env_var("XDG_DATA_HOME") != "" {env_var("XDG_DATA_HOME")} \
git push codeberg master else {
if os_family() == "windows" {
env_var("LOCALAPPDATA")
} else {
join(home_directory(), ".local/share")
}
}
test:
echo {{DOTFILES}}
echo {{XDG_CONFIG_HOME}}
echo {{XDG_DATA_HOME}}
init: init:
git remote remove origin git remote remove origin
git remote add github git@github.com:js0ny/dotfiles.git git remote add github git@github.com:js0ny/dotfiles.git
git remote add codeberg git@codeberg.org:js0ny/dotfiles.git git remote add codeberg git@codeberg.org:js0ny/dotfiles.git
check:
@just check_shell
format:
@just format_shell
push:
git push github master
git push codeberg master
setup:
@just ideavim
ideavim:
ln -sf {{DOTFILES}}/common/ideavimrc $XDG_CONFIG_HOME/ideavim/ideavimrc
git clone https://github.com/MarcoIeni/intellimacs {{join(home_directory(), ".local/share/intellimacs")}}
[private]
pull:
git pull github master
git pull codeberg master
[private]
[unix]
check_shell:
shellcheck -x -s sh --severity=error **/*.sh platforms/mac/yabairc
shellcheck -x -s bash --severity=error **/*.bash tools/bash/* **/*.bashrc
[private]
[unix]
format_shell:
shfmt -w -i 2 -ci -bn -p **/*.sh
shfmt -w -i 2 -ci -bn -ln bash **/*.bash platforms/mac/sketchybar/sketchybarrc
# Ignore syntax errors in zsh files
shfmt -w -i 2 -ci -bn -ln bash **/*.zsh tools/zsh/**/* **/zshrc || true
[private]
check_info:
shellcheck -x -s sh **/*.sh platforms/mac/yabairc
shellcheck -x -s bash **/*.bash tools/bash/* scripts/*.{sh,zsh,bash} **/*.bashrc

View file

@ -7,7 +7,16 @@
" Linking: " Linking:
" ln -sf $DOTFILES/common/ideavimrc $XDG_CONFIG_HOME/ideavim/ideavimrc " ln -sf $DOTFILES/common/ideavimrc $XDG_CONFIG_HOME/ideavim/ideavimrc
""" Basic Configs """ source ~/.local/share/intellimacs/spacemacs.vim
source ~/.local/share/intellimacs/extra.vim
source ~/.local/share/intellimacs/major.vim
source ~/.local/share/intellimacs/hybrid.vim
source ~/.local/share/intellimacs/which-key.vim
" """ Basic Configs """
let mapleader = " " " set <leader> to <space> let mapleader = " " " set <leader> to <space>
""" Colemak """ """ Colemak """
@ -25,6 +34,13 @@ noremap K N
noremap j e noremap j e
noremap J E noremap J E
noremap H :bp<CR>
noremap I :bn<CR>
noremap N 5j
noremap E 5k
" Y to yank to end of line " Y to yank to end of line
noremap Y y$ noremap Y y$
@ -95,7 +111,7 @@ nnoremap gr :action ShowUsages<CR>
nnoremap gi :action GotoImplementation<CR> nnoremap gi :action GotoImplementation<CR>
nnoremap gpi :action QuickImplementations<CR> nnoremap gpi :action QuickImplementations<CR>
nnoremap gs :action GotoSuperMethod<CR> nnoremap gs :action GotoSuperMethod<CR>
nnoremap ga :action nnoremap ga :action ShowIntentionActions<CR>
nnoremap gq :action ShowIntentionActions<CR> nnoremap gq :action ShowIntentionActions<CR>
nnoremap ge :action GotoNextError<CR> nnoremap ge :action GotoNextError<CR>