purescript-emacs / purescript-mode

Emacs major mode and related tools for Purescript
20 stars 10 forks source link

popup *help* when `enter` key pressed at any source file #17

Closed kalxd closed 6 months ago

kalxd commented 6 months ago

Hi, all.

I am using emacs 28.2 on debian stable (bookworm), and purescript-mode is installed via use-package:

(use-package purescript-mode
  :ensure t)

(use-package psc-ide
  :ensure t)

then I open a fresh spago project, and type enter or return key on the source file, the help popups, it shows below:

purescript-mode-hook is a variable defined in ‘purescript-mode.el’.

Its value is nil

Hook run after entering ‘purescript-mode’.

Some of the supported modules that can be activated via this hook:

   ‘purescript-indentation’, Kristof Bastiaensen
     Intelligent semi-automatic indentation Mk2

   ‘purescript-indent’, Guy Lapalme
     Intelligent semi-automatic indentation.

   ‘purescript-simple-indent’, Graeme E Moss and Heribert Schuetz
     Simple indentation.

Module X is activated using the command ‘turn-on-X’.  For example,
‘purescript-indent’ is activated using ‘turn-on-purescript-indent’.
For more information on a specific module, see the help for its ‘X-mode’
function.  Some modules can be deactivated using ‘turn-off-X’.

See Info node ‘(purescript-mode)purescript-mode-hook’ for more details.

Warning: do not enable more than one of the three indentation
modes. See Info node ‘(purescript-mode)indentation’ for more
details.

  This variable may be risky if used as a file-local variable.
  You can customize this variable.

[back]

however, I tried add hook to the purescript-mode-hook, but it did not work also. so how can I fix the problem? thanks.

kritzcreek commented 6 months ago

Hey, for a config example check out: https://github.com/kritzcreek/a-whole-new-world/blob/4410b70528d731bccb3e0b833d717b1eff57a1e9/init.el#L409-L425 Hope that helps.

kalxd commented 6 months ago

Hey, for a config example check out: https://github.com/kritzcreek/a-whole-new-world/blob/4410b70528d731bccb3e0b833d717b1eff57a1e9/init.el#L409-L425 Hope that helps.

great, thanks.