diff --git a/modules/defuns/defuns-cc.el b/modules/defuns/defuns-cc.el index f49d632f0..da38730c8 100644 --- a/modules/defuns/defuns-cc.el +++ b/modules/defuns/defuns-cc.el @@ -122,5 +122,10 @@ (when (evil-visual-state-p) (evil-normal-state)))) +;;;###autoload +(defun narf/sp-point-is-template-p (id action context) + (and (sp-in-code-p id action context) + (sp-point-after-word-p id action context))) + (provide 'defuns-cc) ;;; defuns-cc.el ends here diff --git a/modules/module-haskell.el b/modules/module-haskell.el index dcc2c7afc..29af6fc57 100644 --- a/modules/module-haskell.el +++ b/modules/module-haskell.el @@ -1,7 +1,9 @@ ;;; module-haskell.el (use-package haskell - :mode ("\\.hs$" . haskell-mode) + :mode (("\\.hs$" . haskell-mode) + ("\\.ghci$" . ghci-script-mode) + ("\\.cabal$" . haskell-cabal-mode)) :init (define-repl! haskell-mode switch-to-haskell) (add-hook! haskell-mode '(interactive-haskell-mode flycheck-mode)) diff --git a/modules/module-php.el b/modules/module-php.el index 87b2a9a8b..a82bb0370 100644 --- a/modules/module-php.el +++ b/modules/module-php.el @@ -6,7 +6,7 @@ (define-docset! php-mode "php,laravel") (define-company-backend! php-mode '(php-extras-company)) - (add-hook! php-mode 'flycheck-mode) + (add-hook 'php-mode-hook 'flycheck-mode) (setq php-template-compatibility nil php-extras-eldoc-functions-file (concat narf-temp-dir "/php-extras-eldoc-functions")) :config diff --git a/private/my-bindings.el b/private/my-bindings.el index f42a03433..727967dbf 100644 --- a/private/my-bindings.el +++ b/private/my-bindings.el @@ -256,6 +256,10 @@ :i "" 'narf/backward-kill-to-bol-and-indent :i "" 'evil-ret-and-indent + ;; Emacsien motions for insert mode + :i "C-b" 'backward-word + :i "C-f" 'forward-word + ;; escape from insert mode (more responsive than using key-chord-define) :irv "C-g" 'evil-normal-state @@ -348,8 +352,7 @@ ;; Restores "dumb" indentation to the tab key. This rustles a lot of peoples' jimmies, ;; apparently, but it's how I like it. -(map! "C-b" 'backward-word - :i "" 'narf/dumb-indent +(map! :i "" 'narf/dumb-indent :i "" 'narf/dumb-dedent :i "" 'indent-for-tab-command