Reenable vterm+fish, improvements to ideavim

This commit is contained in:
Joseph Ferano 2022-12-01 01:25:23 +04:00
parent 52ce9cda96
commit 94eb22829d
5 changed files with 73 additions and 52 deletions

View File

@ -62,20 +62,20 @@ abbr -a -g gd "git diff"
complete -f -c dotnet -a "(dotnet complete)" complete -f -c dotnet -a "(dotnet complete)"
# function vterm_printf; function vterm_printf;
# printf "\e]%s\e\\" "$argv" printf "\e]%s\e\\" "$argv"
# end end
# function vterm_prompt_end; function vterm_prompt_end;
# vterm_printf '51;A'(whoami)'@'(hostname)':'(pwd) vterm_printf '51;A'(whoami)'@'(hostname)':'(pwd)
# end end
# functions --copy fish_prompt vterm_old_fish_prompt functions --copy fish_prompt vterm_old_fish_prompt
# function fish_prompt --description 'Write out the prompt; do not replace this. Instead, put this at end of your file.' function fish_prompt --description 'Write out the prompt; do not replace this. Instead, put this at end of your file.'
# # Remove the trailing newline from the original prompt. This is done # Remove the trailing newline from the original prompt. This is done
# # using the string builtin from fish, but to make sure any escape codes # using the string builtin from fish, but to make sure any escape codes
# # are correctly interpreted, use %b for printf. # are correctly interpreted, use %b for printf.
# printf "%b" (string join " \n" (vterm_old_fish_prompt)) printf "%b" (string join " \n" (vterm_old_fish_prompt))
# vterm_prompt_end vterm_prompt_end
# end end
set -q GHCUP_INSTALL_BASE_PREFIX[1]; or set GHCUP_INSTALL_BASE_PREFIX $HOME ; set -gx PATH $HOME/.cabal/bin $PATH /home/joe/.ghcup/bin # ghcup-env set -q GHCUP_INSTALL_BASE_PREFIX[1]; or set GHCUP_INSTALL_BASE_PREFIX $HOME ; set -gx PATH $HOME/.cabal/bin $PATH /home/joe/.ghcup/bin # ghcup-env

View File

@ -86,7 +86,7 @@
:tools :tools
;;ansible ;;ansible
;;biblio ; Writes a PhD for you (citation needed) ;;biblio ; Writes a PhD for you (citation needed)
;;debugger ; FIXME stepping through code, to help you add bugs (debugger +lsp) ; FIXME stepping through code, to help you add bugs
;;direnv ;;direnv
;;docker ;;docker
;;editorconfig ; let someone else argue about tabs vs spaces ;;editorconfig ; let someone else argue about tabs vs spaces
@ -94,7 +94,7 @@
(eval +overlay) ; run code, run (also, repls) (eval +overlay) ; run code, run (also, repls)
;;gist ; interacting with github gists ;;gist ; interacting with github gists
lookup ; navigate your code and its documentation lookup ; navigate your code and its documentation
lsp ; M-x vscode (lsp +peek) ; M-x vscode
magit ; a git porcelain for Emacs magit ; a git porcelain for Emacs
;;make ; run make tasks from Emacs ;;make ; run make tasks from Emacs
;;pass ; password manager for nerds ;;pass ; password manager for nerds
@ -161,7 +161,7 @@
;;rest ; Emacs as a REST client ;;rest ; Emacs as a REST client
;;rst ; ReST in peace ;;rst ; ReST in peace
;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"} ;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
;;rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap() (rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
;;scala ; java, but good ;;scala ; java, but good
;;(scheme +guile) ; a fully conniving family of lisps ;;(scheme +guile) ; a fully conniving family of lisps
sh ; she sells {ba,z,fi}sh shells on the C xor sh ; she sells {ba,z,fi}sh shells on the C xor

View File

@ -221,9 +221,12 @@ Setup other stuff
(setq-default display-line-numbers 'relative) (setq-default display-line-numbers 'relative)
(make-variable-buffer-local 'global-hl-line-mode) (make-variable-buffer-local 'global-hl-line-mode)
(dolist (mode '( dashboard-mode-hook org-mode-hook term-mode-hook eww-mode-hook vterm-mode-hook (dolist (mode '( dashboard-mode-hook org-mode-hook term-mode-hook eww-mode-hook vterm-mode-hook dirvish-directory-view-mode-hook
eshell-mode-hook dired-mode-hook shell-mode-hook magit-mode-hook compilation-mode-hook)) eshell-mode-hook dired-mode-hook shell-mode-hook magit-mode-hook compilation-mode-hook))
(add-hook mode (lambda () (display-line-numbers-mode 0)))) (add-hook mode (lambda () (display-line-numbers-mode 0))))
;; (dolist (mode '(dashboard-mode-hook org-mode-hook term-mode-hook eww-mode-hook vterm-mode-hook
;; eshell-mode-hook shell-mode-hook magit-mode-hook compilation-mode-hook))
;; (add-hook mode (lambda () (display-line-numbers-mode 0))))
(set-window-margins nil 0) (set-window-margins nil 0)
(setq-default right-fringe-width 10) (setq-default right-fringe-width 10)
@ -252,21 +255,14 @@ Setup other stuff
(straight-use-package 'highlight-quoted) (straight-use-package 'highlight-quoted)
(add-hook 'emacs-lisp-mode-hook 'highlight-quoted-mode) (add-hook 'emacs-lisp-mode-hook 'highlight-quoted-mode)
;; (straight-use-package 'nano-modeline)
;; (nano-modeline-mode)
;; (setq nano-modeline-prefix 'icon)
;; (straight-use-package 'mini-modeline)
(straight-use-package 'doom-modeline) (straight-use-package 'doom-modeline)
(doom-modeline-mode) (doom-modeline-mode)
;; (straight-use-package 'mood-line)
;; (mood-line-mode 1) ;; (straight-use-package 'centaur-tabs)
(straight-use-package 'centaur-tabs) ;; (setq centaur-tabs-set-bar 'under)
(setq centaur-tabs-set-bar 'under) ;; (setq x-underline-at-descent-line t)
;; Note: If you're not using Spacmeacs, in order for the underline to display ;; (setq centaur-tabs-set-close-button t)
;; correctly you must add the following line: ;; (setq centaur-tabs-show-navigation-buttons t)
(setq x-underline-at-descent-line t)
(setq centaur-tabs-set-close-button t)
(setq centaur-tabs-show-navigation-buttons t)
#+end_src #+end_src
** Text ** Text
@ -291,6 +287,14 @@ Emacs is an great operating system, if only it had a good text editor...
*** Text editing *** Text editing
#+begin_src emacs-lisp #+begin_src emacs-lisp
;; TODO Find out what to do with this
(defun joe/bookmark-set-and-save ()
"Save the current buffer as a bookmark"
(interactive)
(bookmark-set)
(bookmark-save))
(global-set-key (kbd "M-z") #'zap-up-to-char) (global-set-key (kbd "M-z") #'zap-up-to-char)
(global-set-key (kbd "M-Z") #'zap-to-char) (global-set-key (kbd "M-Z") #'zap-to-char)
@ -342,6 +346,7 @@ Emacs is an great operating system, if only it had a good text editor...
;; TODO: We need 3 bindings; 1.) close buffer 2.) close window 3.) close buffer and window ;; TODO: We need 3 bindings; 1.) close buffer 2.) close window 3.) close buffer and window
;; To disable a keybinding just bind it to nil ;; To disable a keybinding just bind it to nil
(evil-set-leader nil (kbd "C-SPC"))
(evil-set-leader 'normal (kbd "SPC")) (evil-set-leader 'normal (kbd "SPC"))
(evil-define-key 'normal 'global (evil-define-key 'normal 'global
@ -379,17 +384,14 @@ Emacs is an great operating system, if only it had a good text editor...
(kbd "<leader>cy") 'consult-yank-from-kill-ring (kbd "<leader>cy") 'consult-yank-from-kill-ring
(kbd "<leader>cg") 'consult-ripgrep (kbd "<leader>cg") 'consult-ripgrep
(kbd "<leader>cF") 'consult-find (kbd "<leader>cF") 'consult-find
(kbd "<leader>co") 'consult-outline) (kbd "<leader>co") 'consult-outline
(kbd "C-h") 'evil-window-left
(kbd "C-h") 'evil-window-left) (kbd "C-j") 'evil-window-down
(kbd "C-j") 'evil-window-down) (kbd "C-k") 'evil-window-up
(kbd "C-k") 'evil-window-up) (kbd "C-l") 'evil-window-right
(kbd "C-l") 'evil-window-right) (kbd "<leader>tn") 'tab-new
(kbd "C-p") 'tab-previous) (kbd "<leader>tc") 'tab-close
(kbd "C-n") 'tab-next) (kbd "<leader>tr") 'tab-rename)
(kbd "<leader>tn") 'tab-new)
(kbd "<leader>tc") 'tab-close)
(kbd "<leader>tr") 'tab-rename)
(evil-define-key 'normal 'global (kbd "q") 'avy-goto-word-0) (evil-define-key 'normal 'global (kbd "q") 'avy-goto-word-0)
@ -407,6 +409,14 @@ Emacs is an great operating system, if only it had a good text editor...
;; (define-key evil-consult-map "c" 'evil-window-delete) ;; (define-key evil-consult-map "c" 'evil-window-delete)
;; (define-key evil-normal-state-map "," 'evil-consult-map) ;; (define-key evil-normal-state-map "," 'evil-consult-map)
(defun joe/evil-select-line ()
(interactive)
"Select line starting first character"
(evil-first-non-blank)
(evil-visual-char)
(evil-last-non-blank))
;; (evil-define-key 'normal 'global (kbd "vv") #'joe/evil-select-line)
(defvar global-evil-leader-map (make-sparse-keymap)) (defvar global-evil-leader-map (make-sparse-keymap))
(evil-define-key 'normal 'global-evil-leader-map (kbd "SPC") 'evil-send-leader) (evil-define-key 'normal 'global-evil-leader-map (kbd "SPC") 'evil-send-leader)
@ -823,6 +833,8 @@ targets."
(org-bullets-mode) (org-bullets-mode)
(org-indent-mode)) (org-indent-mode))
(add-hook 'org-mode-hook 'joe/org-hook) (add-hook 'org-mode-hook 'joe/org-hook)
(straight-use-package 'org-kanban)
#+end_src #+end_src
** Avy ** Avy
@ -930,11 +942,12 @@ startup. Reason we have to call this is so the vterm fucntion can call `vterm--i
;; (straight-use-package 'yasnippet) ;; (straight-use-package 'yasnippet)
(straight-use-package 'markdown-mode) (straight-use-package 'markdown-mode)
;; (straight-use-package 'lsp-mode) ;; (straight-use-package 'lsp-mode)
;; (straight-use-package 'lsp-ui)
;; (setq lsp-keymap-prefix "C-c c") ;; (setq lsp-keymap-prefix "C-c c")
;; (lsp-enable-which-key-integration t)
;; (require 'lsp) ;; (require 'lsp)
;; (lsp-enable-which-key-integration t)
;; (straight-use-package 'eglot) ;; (straight-use-package 'eglot)
@ -973,7 +986,9 @@ startup. Reason we have to call this is so the vterm fucntion can call `vterm--i
company-tooltip-idle-delay 20 company-tooltip-idle-delay 20
company-require-match nil company-require-match nil
company-frontends '(company-preview-frontend company-echo-metadata-frontend) company-frontends '(company-preview-frontend company-echo-metadata-frontend)
;; company-frontends '(company-text-icons-margin company-echo-metadata-frontend) ;; company-frontends
;; '(company-pseudo-tooltip-unless-just-one-frontend
;; company-echo-metadata-frontend)
company-backends '((company-capf company-files))) company-backends '((company-capf company-files)))
(setq company-transformers '(company-sort-by-occurrence))) (setq company-transformers '(company-sort-by-occurrence)))
(add-hook 'after-init-hook (lambda () (global-company-mode))) (add-hook 'after-init-hook (lambda () (global-company-mode)))
@ -1058,12 +1073,17 @@ it doesn't close it.
(straight-use-package 'go-mode) (straight-use-package 'go-mode)
;; (straight-use-package 'go-imports) ;; (straight-use-package 'go-imports)
#+end_src #+end_src
*** FSharp ** FSharp
#+begin_src emacs-lisp #+begin_src emacs-lisp
;; (straight-use-package 'eglot) ;; (straight-use-package 'eglot)
(straight-use-package 'fsharp-mode) (straight-use-package 'fsharp-mode)
;; (straight-use-package 'eglot-fsharp) ;; (straight-use-package 'eglot-fsharp)
#+end_src
*** Rust
#+begin_src emacs-lisp
(straight-use-package 'rust-mode)
;; (straight-use-package 'flycheck)
#+end_src #+end_src
** Magit ** Magit

View File

@ -196,7 +196,7 @@ all of the evil keybindings in buffers like magit, without compromises."
(call-process "xdg-open" nil 0 nil file))) (call-process "xdg-open" nil 0 nil file)))
(defun joe/bookmark-set-and-save () (defun joe/bookmark-set-and-save ()
"In dired, open the file named on this line." "Save the current buffer as a bookmark"
(interactive) (interactive)
(bookmark-set) (bookmark-set)
(bookmark-save)) (bookmark-save))

View File

@ -10,6 +10,7 @@ set ideajoin
set idearefactormode=visual set idearefactormode=visual
set ignorecase set ignorecase
set commentary set commentary
set NERDTree
set highlightedyank set highlightedyank
" TODO Find bindings for these " TODO Find bindings for these
@ -64,7 +65,6 @@ nnoremap <C-e> 2<C-e>
nnoremap <C-y> 2<C-y> nnoremap <C-y> 2<C-y>
nnoremap gt :action GotoTypeDeclaration<CR> nnoremap gt :action GotoTypeDeclaration<CR>
nnoremap <Leader>s :action KJumpAction.Word0<CR>
nnoremap <Leader>h :action HideAllWindows<CR> nnoremap <Leader>h :action HideAllWindows<CR>
nnoremap <Leader>q :action CloseContent<CR> nnoremap <Leader>q :action CloseContent<CR>
nnoremap <Leader>d :action QuickImplementations<CR> nnoremap <Leader>d :action QuickImplementations<CR>
@ -74,9 +74,9 @@ nnoremap <Leader>u :action FindUsages<CR>
nnoremap <Leader>rn :action RenameElement<CR> nnoremap <Leader>rn :action RenameElement<CR>
nnoremap <Leader>c :action ChangeColorScheme<CR> nnoremap <Leader>c :action ChangeColorScheme<CR>
nnoremap <Leader>; :actionlist<Space> nnoremap <Leader>; :actionlist<Space>
vnoremap <Leader>a :action StringManipulation.AlignToColumns<CR>
nnoremap <Leader>bb :action BuildCurrentProject<CR> nnoremap <Leader>bb :action BuildCurrentProject<CR>
nnoremap <Leader>br :action Run<CR> nnoremap <Leader>br :action Run<CR>
nnoremap <Leader>bc :action RunClass<CR>
nnoremap <Leader>bd :action Debug<CR> nnoremap <Leader>bd :action Debug<CR>
nnoremap <Leader>bs :action BuildSolutionAction<CR> nnoremap <Leader>bs :action BuildSolutionAction<CR>
@ -85,6 +85,7 @@ nnoremap <Leader>w :action SaveDocument<CR>
nnoremap <Leader>or :action ManageRecentProjects<CR> nnoremap <Leader>or :action ManageRecentProjects<CR>
noremap - :action LocateInSolutionView<CR> noremap - :action LocateInSolutionView<CR>
noremap - :action SelectInProjectView<CR>
noremap = :action ReformatCode<CR> noremap = :action ReformatCode<CR>
vnoremap = :action ReformatCode<CR> vnoremap = :action ReformatCode<CR>
nnoremap <Leader>/ :nohlsearch<CR> nnoremap <Leader>/ :nohlsearch<CR>
@ -114,16 +115,16 @@ nnoremap <C-k> :action MoveLineUp<CR>
nnoremap <C-h> <c-w>h nnoremap <C-h> <c-w>h
nnoremap <C-l> <c-w>l nnoremap <C-l> <c-w>l
noremap <C-S-s> :action SurroundWithLiveTemplate<CR> noremap <C-S-s> :action SurroundWithLiveTemplate<CR>
nnoremap <A-h> gT
nnoremap <A-l> gt
nnoremap <A-j> :action EditorCloneCaretBelow<CR> nnoremap <A-j> :action EditorCloneCaretBelow<CR>
nnoremap <A-k> :action EditorCloneCaretAbove<CR> nnoremap <A-k> :action EditorCloneCaretAbove<CR>
nnoremap <A-;> A;<Esc> nnoremap <A-;> A;<Esc>
inoremap <A-;> <Esc>A;<Esc> inoremap <A-;> <Esc>A;<Esc>
nnoremap <A-d> :action ToggleDistractionFreeMode<CR> " nnoremap <A-d> :action ToggleDistractionFreeMode<CR>
nnoremap <A-f> :action ToggleFullScreen<CR> " nnoremap <A-f> :action ToggleFullScreen<CR>
nnoremap <A-e> :action GotoNextError<CR> nnoremap <A-e> :action GotoNextError<CR>
nnoremap <S-A-e> :action GotoPreviousError<CR> nnoremap <S-A-e> :action GotoPreviousError<CR>
nnoremap <A-o> moo<Esc>'o nnoremap <A-o> moo<Esc>'o
nnoremap <A-S-o> moO<Esc>'o nnoremap <A-S-o> moO<Esc>'o
nnoremap <S-A-h> :action ParameterNameHints<CR> nnoremap <S-A-h> :action ParameterNameHints<CR>