Commit graph

9 commits

Author SHA1 Message Date
Colin Woodbury
d9f18e6040 fix(sh): eagerly load sh-script mode when opening a REPL
This is to bring the `sh-shell` variable in scope, when it otherwise
would not be if a `Sh` buffer hadn't yet been opened in the current
Emacs session.
2023-03-08 20:31:25 -05:00
Henrik Lissner
63daee4b94
fix(sh): docs lookup handler must be invoked twice
Invoking +lookup/documentation in shell-script-mode will yield an "X man
page formatted" in the minibuffer with no man page popup. It must be
invoked a second time to see it. This commit fixes that.
2023-02-23 01:34:55 -05:00
Henrik Lissner
813f5da263 lang/sh: use (wo)man for docs lookup handler
i.e. Press K to look symbol at point up in man pages.
2021-02-23 20:32:34 -05:00
Henrik Lissner
661290e8d7
lang/sh: fix +sh/open-repl 2019-10-04 22:04:47 -04:00
Henrik Lissner
94b16cba6c
Standardize REPL commands & improve SPC o r
- SPC o r now prompts for a REPL to open when none was found for the
  current buffer.
- REPL handlers must now follow the naming convention "*/open*-repl".
  e.g. +python/open-ipython-repl, +emacs-lisp/open-repl, etc.
- +eval/open-repl has been split in two:
  - +eval/open-repl-other-window
  - +eval/open-repl-same-window
2019-02-18 01:59:56 -05:00
Henrik Lissner
988ae683dd
lang/sh: improve variable highlighting in quotes 2017-10-18 00:02:13 +02:00
Henrik Lissner
02bfb73264
lang/sh: improve fontification for sh-mode
+ Fontify variables in double quotes (better)
+ Fontify command substitution in double quotes
+ Fontify built-in/common commands (see `+sh-builtin-keywords`)
2017-06-20 16:25:46 +02:00
Henrik Lissner
c7254e7bdc
Major optimization refactor, across the board
+ enable lexical-scope everywhere (lexical-binding = t): ~5-10% faster
  startup; ~5-20% general boost
+ reduce consing, function calls & garbage collection by preferring
  cl-loop & dolist over lambda closures (for mapc[ar], add-hook, and
  various cl-lib filter/map/reduce functions) -- where possible
+ prefer functions with dedicated opcodes, like assq (see byte-defop's
  in bytecomp.el for more)
+ prefer pcase & cond (faster) over cl-case
+ general refactor for code readability
+ ensure naming & style conventions are adhered to
+ appease byte-compiler by marking unused variables with underscore
+ defer minor mode activation to after-init, emacs-startup or
  window-setup hooks; a customization opportunity for users + ensures
  custom functionality won't interfere with startup.
2017-06-09 00:47:45 +02:00
Henrik Lissner
e14e25ecb4 Update modules/lang/* 2017-02-20 00:26:08 -05:00