feat(lib): backport find-sibling-file
I will slowly phase out projectile in favor of project.el, starting with projectile-find-other-file, which -- as of Emacs 29 -- has a native alternative: `find-sibling-file`. Ref: doomemacs/community#1
This commit is contained in:
parent
3b405c8d81
commit
198fe82b6d
5 changed files with 77 additions and 9 deletions
|
@ -677,7 +677,7 @@
|
|||
:desc "Configure project" "g" #'projectile-configure-project
|
||||
:desc "Invalidate project cache" "i" #'projectile-invalidate-cache
|
||||
:desc "Kill project buffers" "k" #'projectile-kill-buffers
|
||||
:desc "Find other file" "o" #'projectile-find-other-file
|
||||
:desc "Find sibling file" "o" #'find-sibling-file
|
||||
:desc "Switch project" "p" #'projectile-switch-project
|
||||
:desc "Find recent project files" "r" #'projectile-recentf
|
||||
:desc "Run project" "R" #'projectile-run-project
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
(evil-ex-define-cmd "pop[up]" #'+popup/buffer)
|
||||
|
||||
;;; Project navigation
|
||||
(evil-ex-define-cmd "a" #'projectile-find-other-file)
|
||||
(evil-ex-define-cmd "a" #'find-sibling-file)
|
||||
(evil-ex-define-cmd "cd" #'+evil:cd)
|
||||
(evil-ex-define-cmd "pwd" #'+evil:pwd)
|
||||
|
||||
|
|
|
@ -78,6 +78,8 @@ This is ignored by ccls.")
|
|||
:return "return"
|
||||
:yield "#require")
|
||||
|
||||
(add-to-list 'find-sibling-rules '("/\\([^/]+\\)\\.c\\(c\\|pp\\)\\'" "\\1.\\(h\\|hh\\|hpp\\)"))
|
||||
|
||||
(when (modulep! +tree-sitter)
|
||||
(add-hook! '(c-mode-local-vars-hook
|
||||
c++-mode-local-vars-hook)
|
||||
|
|
|
@ -8,13 +8,7 @@ be aligned.
|
|||
|
||||
If set to `nil', disable all the above behaviors.")
|
||||
|
||||
(after! projectile
|
||||
(pushnew! projectile-other-file-alist
|
||||
'("css" "scss" "sass" "less" "styl")
|
||||
'("scss" "css")
|
||||
'("sass" "css")
|
||||
'("less" "css")
|
||||
'("styl" "css")))
|
||||
(add-to-list 'find-sibling-rules '("/\\([^/]+\\)\\.\\(\\(s[ac]\\|le\\)ss\\|styl\\)\\'" "\\1\\.css"))
|
||||
|
||||
|
||||
;;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue