Commit Graph

69 Commits

Author SHA1 Message Date
Henrik Lissner
a9402cfb55
Fix #2373: bring back package pinning
This needs some serious refactoring...
2020-01-25 19:02:00 -05:00
Henrik Lissner
49636beb21
Update lang/sh readme to new format #1166 2020-01-24 05:16:09 -05:00
Henrik Lissner
4cc14389e8
PIN ALL THE PACKAGES 2020-01-14 22:32:11 -05:00
Henrik Lissner
12094788d7
Fix references to :tools fly{spell,check} 2020-01-14 03:04:26 -05:00
Dinko
3530f19ef5 Add lsp support to sh-mode. 2020-01-07 14:50:13 +02:00
Henrik Lissner
8b18604b63
lang/sh: remove /bin/* fallback mode assocation
Now that doom-guess-mode-h exists (which will set the major mode when
you save a file in fundamental-mode), this association isn't needed
anymore (because doom-guess-mode-h will deduce the mode from the
shebang line).
2019-10-20 15:14:38 -04:00
Henrik Lissner
e972c97b2e
lang/sh: remove zsh detection
sh-mode already does its own detection for zsh, so this is unnecessary.
2019-10-19 13:52:27 -04:00
Henrik Lissner
661290e8d7
lang/sh: fix +sh/open-repl 2019-10-04 22:04:47 -04:00
Henrik Lissner
01c9ec0c7f
Merge pull request #1716 from flatwhatson/sh-keywords
Add ln to +sh-builtin-keywords
2019-09-06 00:50:04 -04:00
Henrik Lissner
81ee250c09
Minor refactor & revision across the board 2019-09-03 00:59:46 -04:00
Andrew Whatson
4f7adcca7c Add ln to +sh-builtin-keywords 2019-08-28 00:15:33 +10:00
Henrik Lissner
19ecf8e46a
Correct last inline hook defuns
See a3e262c7 for rationale
2019-07-28 16:10:53 +02:00
Henrik Lissner
5cc0e92a48
lang/sh: append "/bin/*" rule in auto-mode-alist
It's too aggressive. Rather, it should be a fallback.
2019-07-26 03:12:06 +02:00
Henrik Lissner
b24d7506e6
lang/sh: conform to new hook conventions 2019-07-26 03:12:05 +02:00
Henrik Lissner
76cacb5bfe
💥 Rename def-package! -> use-package!
Calling this pivotal macro "def-package!" has frequently been a source
of confusion. It is a thin wrapper around use-package, and it should be
obvious that it is so. For this reason, and to match the naming
convention used with other convenience macros/wrappers, it is now
use-package!.

Also changes def-package-hook! -> use-package-hook!

The old macros are now marked obsolete and will be removed when straight
integration is merged.
2019-07-23 12:50:45 +02:00
Henrik Lissner
51d3b1b424
💥 revise advice naming convention (1/2)
This is first of three big naming convention updates that have been a
long time coming. With 2.1 on the horizon, all the breaking updates will
batched together in preparation for the long haul.

In this commit, we do away with the asterix to communicate that a
function is an advice function, and we replace it with the '-a' suffix.
e.g.

  doom*shut-up -> doom-shut-up-a
  doom*recenter -> doom-recenter-a
  +evil*static-reindent -> +evil--static-reindent-a

The rationale behind this change is:

1. Elisp's own formatting/indenting tools would occasionally struggle
   with | and * (particularly pp and cl-prettyprint). They have no
   problem with / and :, fortunately.
2. External syntax highlighters (like pygmentize, discord markdown or
   github markdown) struggle with it, sometimes refusing to highlight
   code beyond these symbols.
3. * and | are less expressive than - and -- in communicating the
   intended visibility, versatility and stability of a function.
4. It complicated the regexps we must use to search for them.
5. They were arbitrary and over-complicated to begin with, decided
   on haphazardly way back when Doom was simply "my private config".

Anyhow, like how predicate functions have the -p suffix, we'll adopt the
-a suffix for advice functions, -h for hook functions and -fn for
variable functions.

Other noteable changes:
- Replaces advice-{add,remove}! macro with new def-advice!
  macro. The old pair weren't as useful. The new def-advice! saves on a
  lot of space.
- Removed "stage" assertions to make sure you were using the right
  macros in the right place. Turned out to not be necessary, we'll
  employ better checks later.
2019-07-22 02:27:45 +02:00
Henrik Lissner
3a2f156acd
lang/sh: extract extra fontification into hook
So it can apply to sh-mode derivatives, like direnv-envrc-mode.
2019-07-10 02:28:01 +02:00
Henrik Lissner
e17e9a5c53
lang/sh: associate bin/[^/]$ files with sh-mode 2019-07-10 02:27:27 +02:00
chrunchyjesus
c692848cc3
update readme 2019-05-04 08:26:13 +02:00
chrunchyjesus
110c2ffeb9
improve readme, remove comments about dependencies 2019-05-04 08:16:49 +02:00
chrunchyjesus
032568e308
update table of contents, remove commands doc 2019-05-04 08:07:43 +02:00
chrunchyjesus
ae11d92042
ony search for shellcheck executable when flycheck is enabled 2019-04-23 20:08:52 +02:00
chrunchyjesus
e5e05f9d51
Merge branch 'develop' into add_shellcheck 2019-04-23 19:44:02 +02:00
chrunchyjesus
9d76d983c4
add doctor for shell and update readme 2019-04-23 19:28:41 +02: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
d6cb0ec5f5
General cleanup & minor refactoring 2018-12-22 04:25:15 -05:00
Henrik Lissner
4067c8937e Remove doom-major-mode-names & doom|set-mode-name
And replace it with buffer-local mode-name setters. This is more
explicit and less magical, which is easier for users to discover and
change, if they'd like.
2018-09-18 15:19:50 -04:00
Henrik Lissner
7d3ffdff06
Remove third line in section headers
This is truly important stuff. We've saved many lives with this update.
2018-09-09 09:58:19 -04:00
Henrik Lissner
f51f2948af
New :editor format module
Centralized code formatting with built-in support for a variety of
languages. Provides the set-formatter! function for defining your own.

Still experimental and needs more testing!
2018-08-22 02:20:11 +02:00
Henrik Lissner
ee73d6c9af
Minor reformatting & comment tweaks 2018-08-21 03:34:39 +02:00
Henrik Lissner
ecf9c14229
Enable rainbow-delimiters-mode in sh-mode 2018-08-20 12:43:48 +02:00
Aria
90d09e6f93 Highlight-numbers on every prog-mode 2018-07-29 12:19:56 +10:00
Brett Mandler
8ff5543d3b
Moved lang/fish into lang/sh +fish 2018-07-18 15:56:55 -04:00
Henrik Lissner
f6dc6ac74e
Refactor out map.el usage
After some profiling, it turns out map-put and map-delete are 5-7x
slower (more on Emacs 25) than delq, setf/alist-get and add-to-list for
small lists (under 250 items), which is exactly how I've been using
them.

The only caveat is alist-get's signature is different on Emacs 25, thus
a polyfill is necessary in core-lib.
2018-06-23 19:53:54 +02:00
Henrik Lissner
e05d7cfee0
Change flycheck initialization strategy
Initialize it globally and turn it off where needed, instead of enabling
it on demand. Also fixes void-function: flycheck-mode errors when
:feature syntax-checker is disabled. This is experimental.

Indirectly fixes #710
2018-06-22 01:49:20 +02:00
Henrik Lissner
588359cc5f
Replace :eval/:repl with autodef functions
+ :eval => set-eval-handler!
+ :repl => set-repl-handler!
+ Updates all internal references.
2018-06-15 16:20:20 +02:00
Henrik Lissner
9f0ebe42e8
Replace :electric with set-electric-rules!
And general refactor of the emacs/electric-indent module.

Also updates (set! :electric ...) references in various :lang modules
2018-06-15 13:32:07 +02:00
Henrik Lissner
d8b1e469bc
Introduce autodefs to replace some settings
+ :popup -> set-popup-rule!
+ :popups -> set-popup-rules!
+ :company-backend -> set-company-backend!
+ :evil-state -> set-evil-initial-state!

I am slowly phasing out the setting system (def-setting! and set!),
starting with these.

What are autodefs? These are functions that are always defined, whether
or not their respective modules are enabled. However, when their modules
are disabled, they are replaced with macros that no-op and don't
waste time evaluating their arguments.

The old set! function will still work, for a while.
2018-06-15 03:42:01 +02:00
Henrik Lissner
ae95b9e8d5
lang/sh: improve zsh shebang detection regexp 2018-05-25 00:52:37 +02:00
Henrik Lissner
09cb4f6716
Major refactor & optimization of how modules load their packages
Now that we are loading package autoloads files (as part of the
generated doom-package-autoload-file when running make autoloads), many
:commands properties are redundant. In fact, many def-package! blocks
are redundant.

In some cases, we can do without a config.el file entirely, and can move
into the autoloads file or rely entirely on package autoloads.

Also, many settings have been moved in their module's autoloads files,
which makes them available ASAP; their use no longer depends on module
load order.

This gained me a modest ~10% boost in startup speed.
2018-05-25 00:46:16 +02:00
Henrik Lissner
aef9724324
Add doom*shut-up advisor to core-lib 2018-04-23 00:03:28 -04:00
Henrik Lissner
8c5286f2dc
lang/sh: silence indentation messages 2018-02-02 20:47:34 -05:00
Henrik Lissner
8428433898
lang/sh: tweak interpolation + builtin fontification 2017-11-05 21:25:49 +01:00
Henrik Lissner
d7a562faf5
lang/sh: remove tail & tee from +sh-builtin-keywords 2017-11-05 21:25:01 +01:00
Henrik Lissner
2b13451ea8
lang/sh: recognize functions w/ dashes in imenu 2017-10-21 14:49:57 +02:00
Henrik Lissner
d0484c2ae7
lang/sh: fix unfontified character next to subshells 2017-10-18 18:24:25 +02:00
Henrik Lissner
988ae683dd
lang/sh: improve variable highlighting in quotes 2017-10-18 00:02:13 +02:00
Henrik Lissner
1e95dc530a
Add zunit file template & file extension 2017-10-06 02:37:24 +02:00
Henrik Lissner
bb5907cadb
Rethink smartparens config #181
+ Parts of my smartparens config that were personal preference have been
  moved to my private module.
+ The css-mode config was redundant and was removed
+ Moved lang-specific config to their respective modules
+ Markdown config was redundant with native electric support, and thus
  removed.
2017-09-02 16:11:21 +02:00
Henrik Lissner
1b8970786d
lang/sh: remove unused setup.sh 2017-08-21 21:55:34 +02:00