Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
emacs.d
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
为了安全,强烈建议开启2FA双因子认证:User Settings -> Account -> Enable two-factor authentication!!!
Show more breadcrumbs
Liu Miao
emacs.d
Commits
4b79fe15
Commit
4b79fe15
authored
4 years ago
by
Liu Miao
Browse files
Options
Downloads
Patches
Plain Diff
format parentheses
parent
5d38fe78
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
init.el
+3
-7
3 additions, 7 deletions
init.el
lisp/completion.el
+9
-23
9 additions, 23 deletions
lisp/completion.el
lisp/core-libs.el
+4
-8
4 additions, 8 deletions
lisp/core-libs.el
lisp/init-org.el
+4
-8
4 additions, 8 deletions
lisp/init-org.el
lisp/prog-common.el
+5
-9
5 additions, 9 deletions
lisp/prog-common.el
with
25 additions
and
55 deletions
init.el
+
3
−
7
View file @
4b79fe15
...
...
@@ -53,8 +53,7 @@
(
require
'package
)
(
setq
package--init-file-ensured
t
package-enable-at-startup
nil
package-archives
user/package-mirror
)
package-archives
user/package-mirror
)
;; Evaluate the correct package subdirectory of packages.
(
setq
package-user-dir
...
...
@@ -65,9 +64,7 @@
emacs-major-version
version-separator
emacs-minor-version
)))
(
expand-file-name
subdir
elpa-pack-dir
))
)
))
(
expand-file-name
subdir
elpa-pack-dir
)))))
;; Load Emacs packages and initialize them.
(
package-initialize
)
...
...
@@ -76,8 +73,7 @@
(
or
(
package-installed-p
'use-package
)
(
progn
(
package-refresh-contents
)
(
package-install
'use-package
))
)
(
package-install
'use-package
)))
(
require
'editor
)
(
require
'completion
)
...
...
This diff is collapsed.
Click to expand it.
lisp/completion.el
+
9
−
23
View file @
4b79fe15
...
...
@@ -20,8 +20,7 @@
:defer
t
:commands
(
projectile-project-root
projectile-project-name
projectile-project-p
)
projectile-project-p
)
:init
(
progn
(
setq
projectile-indexing-method
'alien
...
...
@@ -33,16 +32,14 @@
(
setq
projectile-sort-order
'recentf
projectile-cache-file
user/projectile-cache-file
projectile-known-projects-file
user/projectile-known-projects-file
)
)
projectile-known-projects-file
user/projectile-known-projects-file
))
:config
(
projectile-mode
+1
)
(
setq
projectile-project-root-files-bottom-up
(
append
'
(
".projectile"
; projctiles's root marker
".project"
; doom project marker
".git"
)
; Git
)
".git"
))
; Git
;; This will be filled by other pakages
projectile-project-root-files
'
()
projectile-project-root-files-top-down-recurring
'
(
"Makefile"
))
...
...
@@ -55,8 +52,7 @@
:bind
((
"C-c p f"
.
'counsel-projectile-find-file
)
(
"C-c p p"
.
'counsel-projectile-switch-project
)
(
"C-c p b"
.
'counsel-projectile-switch-to-buffer
)
(
"C-c p k"
.
'projectile-kill-buffers
))
)
(
"C-c p k"
.
'projectile-kill-buffers
)))
(
use-package
ivy
:ensure
t
...
...
@@ -67,14 +63,11 @@
(
setq
ivy-more-chars-alist
`
((
counsel-rg
.
1
)
(
counsel-search
.
2
)
(
t
.
3
))
)
(
t
.
3
)))
(
setq
ivy-re-builders-alist
`
((
counsel-rg
.
,
standard-seaarch-fn
)
(
swiper
.
,
standard-seaarch-fn
)
(
swiper-isearch
.
,
standard-seaarch-fn
)))
;; (t . ,alt-search-fn)) ;; Error when use this line
)
(
swiper-isearch
.
,
standard-seaarch-fn
))))
(
add-to-list
'user/evil-collection-mode-list
'ivy
)
:config
(
setq
ivy-sort-max-size
7500
)
...
...
@@ -88,8 +81,7 @@
ivy-use-virtual-buffers
nil
ivy-virtual-abbreviate
'full
ivy-on-del-error-function
#'
ignore
ivy-use-selectable-prompt
t
)
ivy-use-selectable-prompt
t
)
(
global-set-key
"\C-s"
'swiper
)
...
...
@@ -103,9 +95,7 @@
:bind
((
"C-c s s"
.
'swiper
)
(
"C-c s p"
.
'user/counsel-search-project
)
(
"C-c s d"
.
'user/counsel-search-dir
)
)
)
(
"C-c s d"
.
'user/counsel-search-dir
)))
(
use-package
counsel
:ensure
t
...
...
@@ -138,8 +128,6 @@
:config
;; Don't use ^
(
setq
ivy-initial-inputs-alist
nil
)
)
(
use-package
counsel-projectile
...
...
@@ -168,9 +156,7 @@
:config
(
progn
(
setq
ivy-rich-parse-remote-buffer
nil
)
(
ivy-rich-mode
)
)
)
(
ivy-rich-mode
)))
(
provide
'completion
)
;;; completion.el ends here
This diff is collapsed.
Click to expand it.
lisp/core-libs.el
+
4
−
8
View file @
4b79fe15
...
...
@@ -11,8 +11,7 @@
(
defun
load-init-file
()
"Load init.el."
(
interactive
)
(
load-file
(
concat
user-emacs-directory
"init.el"
))
)
(
load-file
(
concat
user-emacs-directory
"init.el"
)))
(
defun
open-userconfig-file
()
"Open userconfig."
...
...
@@ -25,10 +24,8 @@ If INITIAL-DIRECTORY is non nil start in that directory."
(
interactive
)
(
require
'counsel
)
(
let*
((
default-directory
(
or
initial-directory
(
read-directory-name
"Start from directory: "
)))
)
(
counsel-rg
""
default-directory
nil
"rg: "
))
)
(
or
initial-directory
(
read-directory-name
"Start from directory: "
))))
(
counsel-rg
""
default-directory
nil
"rg: "
)))
(
defun
user/counsel-search-project
()
"Seraching project with rg."
...
...
@@ -44,8 +41,7 @@ If INITIAL-DIRECTORY is non nil start in that directory."
"Load after everything."
(
interactive
)
(
setq
evil-collection-mode-list
nil
)
(
evil-collection-init
user/evil-collection-mode-list
)
)
(
evil-collection-init
user/evil-collection-mode-list
))
(
provide
'core-libs
)
;;; core-libs.el ends here
This diff is collapsed.
Click to expand it.
lisp/init-org.el
+
4
−
8
View file @
4b79fe15
...
...
@@ -10,8 +10,7 @@
(
"\\subsection{%s}"
.
"\\subsection*{%s}"
)
(
"\\subsubsection{%s}"
.
"\\subsubsection*{%s}"
)
(
"\\paragraph{%s}"
.
"\\paragraph*{%s}"
)
(
"\\subparagraph{%s}"
.
"\\subparagraph*{%s}"
))
)
(
"\\subparagraph{%s}"
.
"\\subparagraph*{%s}"
)))
(
defvar
org-complex-ctexbook-class
'
(
"cctexbook"
...
...
@@ -20,8 +19,7 @@
(
"\\chapter{%s}"
.
"\\chapter*{%s}"
)
(
"\\section{%s}"
.
"\\section*{%s}"
)
(
"\\subsection{%s}"
.
"\\subsection*{%s}"
)
(
"\\subsubsection{%s}"
.
"\\subsubsection*{%s}"
))
)
(
"\\subsubsection{%s}"
.
"\\subsubsection*{%s}"
)))
(
defvar
org-simple-ctexbook-class
'
(
"sctexbook"
...
...
@@ -29,8 +27,7 @@
(
"\\chapter{%s}"
.
"\\chapter*{%s}"
)
(
"\\section{%s}"
.
"\\section*{%s}"
)
(
"\\subsection{%s}"
.
"\\subsection*{%s}"
)
(
"\\subsubsection{%s}"
.
"\\subsubsection*{%s}"
))
)
(
"\\subsubsection{%s}"
.
"\\subsubsection*{%s}"
)))
(
defvar
org-user-latex-class
(
list
org-ctexart-class
org-complex-ctexbook-class
org-simple-ctexbook-class
))
...
...
@@ -84,8 +81,7 @@
(
make-face
'width-font-face
)
(
set-face-attribute
'width-font-face
nil
:font
"Sarasa Mono SC 12"
)
;; 13, 14, 16等会出现不等宽
(
setq
buffer-face-mode-face
'width-font-face
)
(
buffer-face-mode
))
))
(
buffer-face-mode
))))
(
provide
'init-org
)
;;; init-org.el ends here
This diff is collapsed.
Click to expand it.
lisp/prog-common.el
+
5
−
9
View file @
4b79fe15
...
...
@@ -14,21 +14,17 @@
:config
(
setq
nox-server-programs
user/nox-server-programs
)
(
dolist
(
hook
user/nox-list
)
(
add-hook
hook
'
(
lambda
()
(
nox-ensure
)))))
)
(
add-hook
hook
'
(
lambda
()
(
nox-ensure
))))))
;; Use lsp-mode as client
((
eq
'lsp-mode
user/lsp-client
)
(
use-package
lsp-mode
:ensure
t
:init
(
setq
lsp-keymap-prefix
"C-c l"
)
:hook
(
(
c-mode
.
lsp-deferred
)
(
c++-mode
.
lsp-deferred
)
(
python-mode
.
lsp-deferred
)
(
lsp-mode
.
lsp-enable-which-key-integration
)
)
:hook
((
c-mode
.
lsp-deferred
)
(
c++-mode
.
lsp-deferred
)
(
python-mode
.
lsp-deferred
)
(
lsp-mode
.
lsp-enable-which-key-integration
))
:config
(
setq
lsp-enable-snippet
nil
)
(
setq
lsp-modeline-diagnostics-enable
nil
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment