Add delq! and pushnew! macros

And move projectile configs to their respective modules (and out of
package configs).
This commit is contained in:
Henrik Lissner 2019-04-08 23:01:30 -04:00
parent f934f38627
commit 742687a51e
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
5 changed files with 33 additions and 21 deletions

View file

@ -237,13 +237,14 @@ This is ignored by ccls.")
(def-package! ccls
:when (featurep! +lsp)
:hook ((c-mode-local-vars c++-mode-local-vars objc-mode-local-vars) . +cc|init-ccls)
:init
(after! projectile
(add-to-list 'projectile-globally-ignored-directories ".ccls-cache")
(add-to-list 'projectile-project-root-files-bottom-up ".ccls-root")
(add-to-list 'projectile-project-root-files-top-down-recurring "compile_commands.json"))
:config
(defun +cc|init-ccls ()
(setq-local company-transformers nil)
(setq-local company-lsp-async t)
(setq-local company-lsp-cache-candidates nil)
(lsp))
(after! projectile
(add-to-list 'projectile-globally-ignored-directories ".ccls-cache")
(add-to-list 'projectile-project-root-files-bottom-up ".ccls-root")
(add-to-list 'projectile-project-root-files-top-down-recurring "compile_commands.json")))
(lsp)))

View file

@ -23,6 +23,10 @@
;; Other
:yield "import"))
(after! projectile
(pushnew! projectile-project-root-files "package.json")
(pushnew! projectile-globally-ignored-directories "node_modules" "flow-typed"))
;;
;; Major modes
@ -54,10 +58,6 @@
(set-electric! 'js2-mode :chars '(?\} ?\) ?. ?:))
(set-repl-handler! 'js2-mode #'+javascript/open-repl)
(after! projectile
(add-to-list 'projectile-project-root-files "package.json")
(add-to-list 'projectile-globally-ignored-directories "node_modules"))
(map! :map js2-mode-map
:localleader
"S" #'+javascript/skewer-this-buffer))

View file

@ -12,6 +12,14 @@
"CSS" "HTML" "Bourbon" "Compass"
["Sass" (memq major-mode '(scss-mode sass-mode))]))
(after! projectile
(pushnew! projectile-project-root-files
'("css" "scss" "sass" "less" "styl")
'("scss" "css")
'("sass" "css")
'("less" "css")
'("styl" "css")))
;;
;; Major modes