Commit graph

37 commits

Author SHA1 Message Date
Henrik Lissner
ad6a3d0f33
refactor: deprecate featurep! for modulep!
featurep! will be renamed modulep! in the future, so it's been
deprecated. They have identical interfaces, and can be replaced without
issue.

featurep! was never quite the right name for this macro. It implied that
it had some connection to featurep, which it doesn't (only that it was
similar in purpose; still, Doom modules are not features). To undo such
implications and be consistent with its namespace (and since we're
heading into a storm of breaking changes with the v3 release anyway),
now was the best opportunity to begin the transition.
2022-08-14 20:43:35 +02:00
Henrik Lissner
a70e634ebd
refactor(:lang): move tree-sitter init
Moved add-hook calls (for tree-sitter initialization) into their
respective modes' config blocks, or nearby, to be consistent with how
other, similar tools (like lsp!) are initialized, and does so at
runtime, rather than at expansion/compile time, which eval-when! caused.
2022-07-25 17:34:44 +02:00
Jeetaditya Chatterjee
7f814e5d99
refactor(:lang): redo tree-sitter hooks
- bind to major-mode-local-vars-hook instead of major mode hook
- bind the autodef tree-sitter! instead of the functions.
2022-05-22 21:26:08 +01:00
Jeetaditya Chatterjee
0c2f986708
feat(:lang): enable ts text objs in modes 2022-05-22 21:26:03 +01:00
Jeetaditya Chatterjee
06ed5ade3f
refactor!(tree-sitter): add +tree-sitter flag
BREAKING CHANGE: break the global nature of the tree sitter
module by adding a +tree-sitter flag to every applicable module

In the background this hooks turn-on-tree-sitter-mode
to the major-mode-hook of the language.
This may also solve the eager loading of tree sitter
2022-05-22 21:26:00 +01:00
marty
bc47e72984 tweak(web): detect and set angular in web-mode
- Add @angular/core in detecting angular to set the web-angularjs minor
mode

- At the same time set the web-mode-engine to "angular" so that
`format-all` uses prettier to format ionic `*.page.html` files in
addition to `*.component.html` files.

When `format-all` sees the web-mode-engine is set to "angular", it
applies `prettier` as opposed to `html-tidy`, as `tidy` doesn't
recognise angular component tags and hence errors out. The current
web-mode only sets the engine to "angular" for "*.components.html".
However, ionic angular uses file names such as "*.page.html", setting
engine will apply prettier to these html fils.
2022-01-06 15:27:54 +01:00
Henrik Lissner
5d51d4e4a6
Fix emmet for non-evil users 2020-04-18 21:08:41 -04:00
Henrik Lissner
af3c7266d8
Extend +web-django-mode to python-mode 2020-04-10 23:20:25 -04:00
Sean Farley
5153007b2d web: add +web-django-mode
This adds support for django templates.
2020-04-08 12:56:34 -07:00
Henrik Lissner
2d365619cd
General refactor & cleanup, across the board 2019-09-13 22:00:34 -04: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
0a84d2f0a9
core-lib: add auto-minor-mode, revise def-project-mode!
- Adds the auto-minor-mode package to replace our in-house
  implementation.
- Merges associate! into the def-project-mode! macro because associate!
  on its own is less useful than auto-minor-mode-alist,
  auto-minor-mode-magic-alist or hooks.
- Changes the semantics of :modes and :add-hooks properties of
  def-project-mode!. Its arguments are evaluated as is; lists will need
  to be quoted.

squash! core-lib: remove associate! macro
2019-07-22 02:30:39 +02:00
Henrik Lissner
774956d809
lang/web: remove redundant :commands declaration
emmet-mode already autoloads this command.
2019-06-30 13:21:06 +02:00
Henrik Lissner
34c490aae5
lang/web: correct config file check for jekyll
Jekyll looks for _config.(yml|toml), not config.yml.
2018-11-07 19:22:03 -05: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
c514ad200a
Remove web-beautify from javascript & web modules
Superceded by :editor format module, which uses prettier.
2018-08-25 00:06:13 +02:00
Henrik Lissner
a876d87f5e
emmet-mode: bind to TAB & enable in reason-mode
TAB now either indents, expands the snippet at point, or expands the
emmet expression at point.

Also it now falls back to emmet-expand-line if yasnippet won't load.
2018-08-01 19:25:06 +02:00
Henrik Lissner
1a452b6842
💥 Change first arg of load! macro
load!'s first argument is no longer a symbol (that will cause
void-variable errors now) to save on unnecessary interning and simplify
compile-time logic. It accepts any valid form that evaluates to a string
now.

If you use load!, you need to change its argument to a string!

e.g. (load! +my-module) => (load! "+my-module")
2018-05-27 12:52:28 +02:00
Henrik Lissner
b701303909
lang/web: emmet-expand-jsx-className = t in rjsx-mode 2018-04-02 22:02:32 -04:00
Henrik Lissner
acb77c8407
lang/web: conditionally define js sub-modes 2018-01-28 04:28:15 -05:00
Henrik Lissner
9d81bc5a8b
Major refactor: use-package-always-defer = nil & use :hook
Possibly breaking change: packages are no longer deferred by default.

Addresses #286
2017-12-08 23:14:11 -05:00
Henrik Lissner
b825b0cd0c
lang/web: refactor +web-jekyll-mode 2017-10-04 18:02:14 +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
5ae94b765c PRAISE BE TO THE BYTE COMPILER FOR THY SHARP QUOTES 2017-04-17 02:17:10 -04:00
Henrik Lissner
53b9e92fd7 lang/{web,javascript}: remove +web-bower-mode; refactor react, phaser & angular detection 2017-04-01 23:54:30 -04:00
Henrik Lissner
ba681497ec lang/web: refactor +web-react-mode detection 2017-04-01 23:33:52 -04:00
Henrik Lissner
f213fbdf5c lang/web: improve +web-angularjs-mode detection 2017-04-01 23:33:18 -04:00
Henrik Lissner
de61d68652 rjsx-mode: remove electric <, replace with snippets; enable emmet-mode in rjsx-mode 2017-03-29 23:46:35 -04:00
Henrik Lissner
ddc77ef743 lang/web: add +web-react-mode 2017-03-25 16:43:10 -04:00
Henrik Lissner
191ddfd334 lang/web: move emmet-mode from +html.el to config.el; enable in css-mode 2017-03-23 15:47:38 -04:00
Henrik Lissner
495b0d0016 lang/{javascript,web}: add web-beautify plugin 2017-03-23 15:47:07 -04:00
Henrik Lissner
d6667a433f General cleanup + refactor 2017-03-04 20:54:13 -05:00
Henrik Lissner
3ac1d382be Fix project mode definitions 2017-03-02 18:28:46 -05:00
Henrik Lissner
a0305418ae Remove f.el references 2017-02-25 02:11:24 -05:00
Henrik Lissner
33c88d4f82 Revert macros to ...! name convention (elisp doesn't like @...) 2017-02-23 00:06:12 -05:00
Henrik Lissner
e14e25ecb4 Update modules/lang/* 2017-02-20 00:26:08 -05:00
Henrik Lissner
f453b3cee1 Reorganize modules 2017-02-20 00:23:03 -05:00
Renamed from modules/module-web.el (Browse further)