Skip to content

Commit 361daba

Browse files
committed
use helm
1 parent 21d5de5 commit 361daba

File tree

4 files changed

+110
-68
lines changed

4 files changed

+110
-68
lines changed

config/interface.el

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
(fringe-mode '(0 . 4))
116116
;; Set default font
117117
(set-face-attribute 'default nil
118-
:family "Source Code Pro"
118+
:family "Envy Code R"
119119
:height 120
120120
:weight 'normal
121121
:width 'normal)
@@ -131,11 +131,11 @@
131131
telephone-line-secondary-left-separator 'telephone-line-nil
132132
telephone-line-primary-right-separator 'telephone-line-gradient
133133
telephone-line-secondary-right-separator 'telephone-line-nil)
134-
(setq telephone-line-height 10
134+
(setq telephone-line-height 15
135135
telephone-line-evil-use-short-tag t)
136136
(telephone-line-mode 1))
137137
;; Display startup message
138-
(setq initial-scratch-Message
138+
(setq initial-scratch-message
139139
"
140140
I give up everything or I will have nothing
141141
@@ -164,4 +164,5 @@ I give up everything or I will have nothing
164164
(setq scroll-conservatively most-positive-fixnum)
165165

166166

167+
167168
(provide 'interface)

config/navigative.el

Lines changed: 97 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,21 @@
77
(global-set-key [remap goto-line] 'goto-line-preview))
88
(setq mac-option-modifier 'super)
99

10+
11+
(when (eq system-type 'darwin)
12+
(require 'ls-lisp)
13+
(setq ls-lisp-use-insert-directory-program nil)
14+
(setq insert-directory-program "/bin/ls")
15+
;; (setq dired-listing-switches "your settings"))
16+
)
17+
18+
(show-paren-mode 1)
19+
(setq show-paren-delay 0)
20+
21+
(electric-pair-mode 1)
22+
(setq electric-pair-preserve-balance nil)
23+
24+
1025
(use-package projectile
1126
:ensure t)
1227
(projectile-mode +1)
@@ -16,79 +31,102 @@
1631
(counsel-projectile-mode +1)
1732
(define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map)
1833

19-
(show-paren-mode 1)
20-
(setq show-paren-delay 0)
21-
22-
(electric-pair-mode 1)
23-
(setq electric-pair-preserve-balance nil)
24-
2534
(use-package treemacs-projectile
2635
:ensure t)
2736

2837
(use-package restart-emacs
2938
:ensure t)
3039

3140

32-
;; Config navigative for emacs
33-
34-
35-
(when (eq system-type 'darwin)
36-
(require 'ls-lisp)
37-
(setq ls-lisp-use-insert-directory-program nil)
38-
(setq insert-directory-program "/bin/ls")
39-
;; (setq dired-listing-switches "your settings"))
40-
)
41-
42-
(use-package ivy
41+
;; ;; Config navigative for emacs
42+
43+
;; (use-package ivy
44+
;; :ensure t
45+
;; :config
46+
;; (ivy-mode 1))
47+
48+
49+
;; (defun vuvoth/ivy-format-function-arrow (cands)
50+
;; "Transform CANDS into a string for minibuffer."
51+
;; (ivy--format-function-generic
52+
;; (lambda (str)
53+
;; (concat " -> " (ivy--add-face (concat str "\n") 'ivy-current-match)))
54+
;; (lambda (str)
55+
;; (concat " " str "\n"))
56+
;; cands
57+
;; ""))
58+
59+
;; (defun vuvoth/ivy-format-function-line (Cands)
60+
;; "Transform CANDS into a string for minibuffer."
61+
;; (ivy--format-function-generic
62+
;; (lambda (str)
63+
;; (ivy--add-face (concat str "\n") 'ivy-current-match))
64+
;; (lambda (str)
65+
;; (concat str "\n"))
66+
;; cands
67+
;; ""))
68+
69+
70+
;; (set-face-attribute 'ivy-current-match nil :underline nil :foreground nil :background "gray15")
71+
72+
;; (setcdr (assq t ivy-format-functions-alist) #'vuvoth/ivy-format-function-arrow)
73+
74+
;; (use-package smex
75+
;; :ensure t)
76+
;; (use-package counsel
77+
;; :ensure t)
78+
;; (global-set-key (kbd "M-s s") 'swiper)
79+
;; (global-set-key (kbd "C-c C-r") 'ivy-resume)
80+
;; (global-set-key (kbd "<f6>") 'ivy-resume)
81+
;; (global-set-key (kbd "M-x") 'counsel-M-x)
82+
;; (global-set-key (kbd "C-x C-f") 'counsel-find-file)
83+
;; (global-set-key (kbd "<f1> f") 'counsel-describe-function)
84+
;; (global-set-key (kbd "<f1> v") 'counsel-describe-variable)
85+
;; (global-set-key (kbd "<f1> l") 'counsel-find-library)
86+
;; (global-set-key (kbd "<f2> i") 'counsel-info-lookup-symbol)
87+
;; (global-set-key (kbd "<f2> u") 'counsel-unicode-char)
88+
;; (global-set-key (kbd "C-c g") 'counsel-git)
89+
;; (global-set-key (kbd "C-c j") 'counsel-git-grep)
90+
;; (global-set-key (kbd "C-c k") 'counsel-ag)
91+
;; (global-set-key (kbd "C-x l") 'counsel-locate)
92+
93+
;; (define-key minibuffer-local-map (kbd "C-r") 'counsel-minibuffer-history)
94+
95+
96+
(use-package helm
4397
:ensure t
4498
:config
45-
(ivy-mode 1))
46-
47-
48-
(defun vuvoth/ivy-format-function-arrow (cands)
49-
"Transform CANDS into a string for minibuffer."
50-
(ivy--format-function-generic
51-
(lambda (str)
52-
(concat " -> " (ivy--add-face (concat str "\n") 'ivy-current-match)))
53-
(lambda (str)
54-
(concat " " str "\n"))
55-
cands
56-
""))
99+
(helm-mode +1)
100+
;; (require 'helm-config)
101+
(setq helm-split-window-inside-p t)
102+
(setq helm-use-frame-when-more-than-two-windows nil)
103+
(setq helm-autoresize-max-height 0)
104+
(setq helm-autoresize-min-height 30)
105+
(setq helm-display-buffer-default-height 23)
106+
(setq helm-default-display-buffer-functions '(display-buffer-in-side-window))
107+
(helm-autoresize-mode 1)
108+
:bind
109+
("C-x C-f" . helm-find-files)
110+
("M-x" . helm-M-x)
111+
("C-x b" . helm-mini))
112+
113+
(global-visual-line-mode t)
57114

58-
(defun vuvoth/ivy-format-function-line (Cands)
59-
"Transform CANDS into a string for minibuffer."
60-
(ivy--format-function-generic
61-
(lambda (str)
62-
(ivy--add-face (concat str "\n") 'ivy-current-match))
63-
(lambda (str)
64-
(concat str "\n"))
65-
cands
66-
""))
115+
;disable backup
116+
(setq backup-inhibited t)
117+
;disable auto save
118+
(setq auto-save-default nil)
67119

120+
(setq mac-command-modifier 'meta)
121+
(setq mac-right-option-modifier 'control)
68122

69-
(setcdr (assq t ivy-format-functions-alist) #'vuvoth/ivy-format-function-arrow)
70123

71-
(use-package smex
72-
:ensure t)
73-
(use-package counsel
74-
:ensure t)
75-
(global-set-key (kbd "M-s s") 'swiper)
76-
(global-set-key (kbd "C-c C-r") 'ivy-resume)
77-
(global-set-key (kbd "<f6>") 'ivy-resume)
78-
(global-set-key (kbd "M-x") 'counsel-M-x)
79-
(global-set-key (kbd "C-x C-f") 'counsel-find-file)
80-
(global-set-key (kbd "<f1> f") 'counsel-describe-function)
81-
(global-set-key (kbd "<f1> v") 'counsel-describe-variable)
82-
(global-set-key (kbd "<f1> l") 'counsel-find-library)
83-
(global-set-key (kbd "<f2> i") 'counsel-info-lookup-symbol)
84-
(global-set-key (kbd "<f2> u") 'counsel-unicode-char)
85-
(global-set-key (kbd "C-c g") 'counsel-git)
86-
(global-set-key (kbd "C-c j") 'counsel-git-grep)
87-
(global-set-key (kbd "C-c k") 'counsel-ag)
88-
(global-set-key (kbd "C-x l") 'counsel-locate)
89-
90-
(define-key minibuffer-local-map (kbd "C-r") 'counsel-minibuffer-history)
124+
(setq scroll-preserve-screen-position 1)
125+
;;scroll window up/down by one line
126+
(global-set-key (kbd "M-n") (kbd "C-u 1 C-v"))
127+
(global-set-key (kbd "M-p") (kbd "C-u 1 M-v"))
91128

129+
(provide 'navigative)
92130

93131
(global-visual-line-mode t)
94132

config/programming-config.el

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
:config
66
(setq
77
company-minimum-prefix-length 2
8-
company-idle-delay 0.1))
8+
company-idle-delay 0.2))
99

1010
(use-package lsp-mode
1111
:ensure t
@@ -16,13 +16,15 @@
1616
(javascript-mode . lsp)
1717
;; if you want which-key integration
1818
(lsp-mode . lsp-enable-which-key-integration))
19-
:commands lsp)
19+
:commands lsp
20+
:config
21+
(setq lsp-ui-doc-enable nil))
2022

2123

2224
;; optionally
23-
(use-package lsp-ui
24-
:ensure t
25-
:commands lsp-ui-mode)
25+
;; (use-package lsp-ui
26+
;; :ensure t
27+
;; :commands lsp-ui-mode)
2628
;; lsp company backend
2729
(use-package company-lsp
2830
:ensure t

init.el

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,14 @@
2727
(require 'git-configure)
2828
(require 'org-config)
2929
(require 'utils)
30+
3031
(custom-set-variables
3132
;; custom-set-variables was added by Custom.
3233
;; If you edit it by hand, you could mess it up, so be careful.
3334
;; Your init file should contain only one such instance.
3435
;; If there is more than one, they won't work right.
3536
'(package-selected-packages
36-
'(command-log-mode w3m org-bullets vimrc-mode goto-line-preview window-jump color-theme-sanityinc-tomorrow json-mode yasnippet yaml-mode xresources-theme which-key use-package ubuntu-theme treemacs-projectile telephone-line tango-2-theme solarized-theme smex smeargle slime-theme seti-theme restart-emacs prettier-js planet-theme neotree magit lsp-ui lsp-treemacs lsp-ivy linum-relative helm google-this exec-path-from-shell doom-modeline dockerfile-mode diff-hl counsel-projectile company-lsp)))
37+
'(helm-lsp zenburn-theme yasnippet yaml-mode xresources-theme window-jump which-key w3m vimrc-mode use-package ubuntu-theme treemacs-projectile telephone-line tango-2-theme sr-speedbar spaceline solarized-theme smex smeargle slime-theme seti-theme restart-emacs prettier-js planet-theme org-bullets neotree mongo magit lsp-ui lsp-treemacs lsp-ivy linum-relative json-mode imenu-list helm-projectile goto-line-preview google-this gitignore-mode exec-path-from-shell doom-modeline dockerfile-mode diff-hl counsel-projectile company-lsp command-log-mode color-theme-sanityinc-tomorrow)))
3738
(custom-set-faces
3839
;; custom-set-faces was added by Custom.
3940
;; If you edit it by hand, you could mess it up, so be careful.

0 commit comments

Comments
 (0)