Commit Graph

80 Commits

Author SHA1 Message Date
4ecd616cd8 refactor(format): replace with apheleia
Initial refactor of format module to replace format-all with apheleia
2023-09-13 20:19:59 +01:00
04fa5fb948 fix(web): remove .sface from web mode autolist
elixir-mode can now handle .sface files from surface-ui.org

Ref: #4905
2022-09-30 22:35:07 +02:00
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
9cb4c8b637 fix(:lang): ensure lsp! is always appended to hooks 2022-07-25 18:12:03 +02:00
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
0a12ccae49 fix(web): web-mode-attribute-transpose on wrong key 2022-03-19 16:39:34 +01:00
53504c55b9 fix(web): web-mode-buffer-highlight -> web-mode-reload
This function was renamed upstream.

Ref: fxbois/web-mode@4341d9fa1a
2022-02-09 15:54:51 +01:00
595a5e665c tweak(web): add nxml mode to LSP enabled modes
Since lsp-mode supports XML (see
https://emacs-lsp.github.io/lsp-mode/page/lsp-xml/), it makes sense to
add nxml-mode to the list of automatically enabled lsp mode clients.
2021-09-23 11:41:49 +02:00
0ad7874a28 feat(web): make web-mode recognize *.[lh]eex 2021-09-16 00:29:21 +02:00
25c7f347cb feat(web): add *.[lh]?eex support 2021-09-15 18:56:46 +02:00
bc2a90dd15 Merge pull request #4905 from davydog187/patch-1
Syntax highlight .sface files as html
2021-07-24 18:32:43 -04:00
3ebda88aec :lang web: Recognize .ejs files as web-mode 2021-06-08 02:59:30 +07:00
211ef8c93c Syntax highlight .sface files as html
[Phoenix.LiveView](https://hexdocs.pm/phoenix_live_view) has a project called [Surface](https://surface-ui.org/) that adds a `.sface` extension to files. These should be syntax highlighted as html.

First PR!
2021-04-21 15:53:34 -04:00
a4392b2c0d Fix #4431: don't use // in [JT]SX markup 2020-12-14 16:50:40 -05:00
ecd7e21a52 Associate .eco files with web-mode 2020-10-30 21:51:35 -04:00
912961b46d Merge pull request #3258 from sei40kr/tslint-and-eslint-for-tsx
lang/javascript: Enable TSLint and ESLint for TypeScript-TSX
2020-06-07 14:19:13 -04:00
63113ff6ce lang/javascript: Enable TSLint and ESLint for TypeScript-TSX 2020-05-31 00:57:38 +09:00
cf535e42fb Support LiveView templates for Elixir
This was added in fxbois/web-mode#1070
2020-05-29 18:04:37 -06:00
d5d0ec3c91 Prioritize vue-mode over web-mode for *.vue files 2020-05-18 14:38:02 -04:00
9de445c189 Enable lsp-mode a little later in {html,web}-mode
Gives the user more time to customize the mode before they load, either
through {html,web}-mode-hook or file/dir-local variables.
2020-05-01 19:53:19 -04:00
3f6cf65c14 Add .jinja2 file extension to supported web files. (#2977) 2020-04-26 15:51:01 -04:00
9839aec1b2 Make html-tidy conditionally set --show-body-only
Fixes an issue where tidy was aggressively removing parent tags from
non-partial html file.
2020-03-27 15:09:19 -04:00
6bd7eb8639 Associate xhtml files with web-mode 2020-03-05 13:10:01 +02:00
e14bf2f87b Set --show-body-only=true for html-tidy formatter
To facilitate formatting partial templates.
2020-02-27 21:54:18 -05:00
1ab9f8b99d Fix commenting JS in web-mode 2020-02-19 19:03:46 -05:00
4b8986cac4 Add *.eex to web-mode-engines-alist #2564 2020-02-19 19:01:38 -05:00
f0bc835d19 Fix #2564: associate *.eex with web-mode
And expand :mode declarations for readability.
2020-02-19 17:54:29 -05:00
5c45a9eff9 Fall back to typescript-mode for *.tsx #2252 2019-12-26 15:00:44 -05:00
2b36740325 lang/web: fix duplicate closing delimiters 2019-11-15 02:14:06 -05:00
99cd52e70f 💥 Drop Emacs 25.x support
Emacs 26.1 is Doom's new minimum supported version

Closes #2026
2019-11-08 16:02:06 -05:00
110ce6f150 lang/web: fix *.html? association with web-mode 2019-11-05 10:33:24 -05:00
3388fa028d lang/web: compress web-mode :mode's into one 2019-10-18 21:35:30 -04:00
33bc15788c lang/web: enable company-css in web-mode 2019-10-10 16:11:42 -04:00
051bceb0a8 Refactor localleader keybinds #1270
Introduces a select few of the localleader keybind standards proposed in
issue #1270, corrects a few typos and introduces more localleader
keybinds in general.

Co-authored-by: yuhan0 <>
2019-10-04 22:04:47 -04:00
de43b499da Add .svelte to web-mode
With the merge of https://github.com/fxbois/web-mode/pull/1074, web-mode now supports Svelte templates. This change activates web mode when opening a `.svelte` file.
2019-09-20 13:50:43 -07:00
2d365619cd General refactor & cleanup, across the board 2019-09-13 22:00:34 -04:00
3161ae59d3 [ADD] description for web prefix bindings 2019-07-29 09:21:16 +02:00
a3e262c7ac 💥 Refactor add-hook! macro & change arg order
This update may potentially break your usage of add-hook! if you pass
the :local or :append properties to it. This is how they used to work:

  (add-hook! :append 'some-mode-hook #'do-something)

Thsoe properties must now follow the hooks, e.g.

  (add-hook! 'some-mode-hook :append #'do-something)

Other changes:
- Various add-hook calls have been renamed to add-hook! because I
  incorrectly assumed `defun` always returned its definition's symbol,
  when in fact, its return value is "undefined" (so sayeth the
  documentation). This should fix #1597.
- This update adds the ability to add multiple functions to hooks
  without a list:

    (add-hook! 'some-mode-hook
               #'do-something
               #'do-something-else)

- The indentation logic has been changed so that consecutive function
  symbols at indented at the same level as the first argument, but forms
  are indent like a defun.

    (add-hook! 'some-mode-hook
               #'do-something
               #'do-something-else)

    (add-hook! 'some-mode-hook
      (message "Hello"))
2019-07-26 20:17:29 +02:00
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
0b6d21649e lang/web: web-mode-auto-close-style = 1
< could be part of an emmet expression or inline script. Closing tags on
</ is less ambiguous.
2019-05-04 19:13:26 -04:00
1c976dc0e4 Minor, general refactors
Also rename custom lookup handlers for consistency and use the new
inline :async property instead.
2019-05-02 17:57:31 -04:00
eb3c569e1d Replace +lsp|init with lsp! autodef 2019-03-02 01:34:19 -05:00
cb923eadcc Add basic LSP support
Still needs to be documented, but includes support for the following
languages:

+ C/C++/ObjC
+ Go
+ Java
+ Javascript
+ OCaml
+ PHP
+ Python
+ Ruby
+ Scala
+ Swift
+ HTML/CSS

Relevant to #460, #716, #1186
2019-02-21 19:13:35 -05:00
3f195614d9 Normalize :leader/:localleader keybinds
Evil states no longer apply to them. Also removes x-alt-keysym.
2018-12-23 23:54:27 -05:00
412063f452 lang/web: fix 'pair was never defined' error
Caused by recent change upstream, in smartparens
2018-11-12 02:38:09 -05:00
cdf745e72a map!: remove buffer-local :desc properties
which-key labels are registered globally, and will not work for
buffer-local keybinds. Until general is brought in, we'll have to suffer
label-less localleader keybinds.
2018-10-07 21:34:24 -04:00
c7032cf8b0 lang/web: fully remove nil autopair group
This removes the nil autopair group, rather than just setting it to nil.
No functional different, it's [slightly] more performant.
2018-09-26 20:38:47 -04:00
001f90df2f lang/web: update set-docsets! & general refactor 2018-09-09 09:58:21 -04:00
c58077810d General refactor of modules
General code and comment improvements.

Also, removed the :desc's for csv-mode because map! is currently unable
to set which-key descriptions mode-locally, and should be avoided for
anything but global keybinds. This will be fixed when General is
introduced into Doom.
2018-09-09 09:58:20 -04:00
b697ad982e lang/web: more sensible html-tidy formatter config
+ No longer inserts html/body tags unless they're detected in the buffer
+ Respect tab-width and indent-tab-mode
+ Don't auto-remove empty elements
2018-09-03 03:59:24 +02:00