Commit graph

75 commits

Author SHA1 Message Date
Basil Sh
0a12ccae49
fix(web): web-mode-attribute-transpose on wrong key 2022-03-19 16:39:34 +01:00
Christian Kruse
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
Sven Fischer
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
Henrik Lissner
0ad7874a28 feat(web): make web-mode recognize *.[lh]eex 2021-09-16 00:29:21 +02:00
aswinmohanme
25c7f347cb feat(web): add *.[lh]?eex support 2021-09-15 18:56:46 +02:00
Henrik Lissner
bc2a90dd15
Merge pull request #4905 from davydog187/patch-1
Syntax highlight .sface files as html
2021-07-24 18:32:43 -04:00
Daanturo
3ebda88aec :lang web: Recognize .ejs files as web-mode 2021-06-08 02:59:30 +07:00
Dave Lucia
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
Henrik Lissner
a4392b2c0d
Fix #4431: don't use // in [JT]SX markup 2020-12-14 16:50:40 -05:00
Carlos Feliciano
ecd7e21a52 Associate .eco files with web-mode 2020-10-30 21:51:35 -04:00
Henrik Lissner
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
Seong Yong-ju
63113ff6ce lang/javascript: Enable TSLint and ESLint for TypeScript-TSX 2020-05-31 00:57:38 +09:00
Justin Smestad
cf535e42fb
Support LiveView templates for Elixir
This was added in fxbois/web-mode#1070
2020-05-29 18:04:37 -06:00
Henrik Lissner
d5d0ec3c91
Prioritize vue-mode over web-mode for *.vue files 2020-05-18 14:38:02 -04:00
Henrik Lissner
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
Axel Soll
3f6cf65c14
Add .jinja2 file extension to supported web files. (#2977) 2020-04-26 15:51:01 -04:00
Henrik Lissner
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
yoavm448
6bd7eb8639 Associate xhtml files with web-mode 2020-03-05 13:10:01 +02:00
Henrik Lissner
e14bf2f87b
Set --show-body-only=true for html-tidy formatter
To facilitate formatting partial templates.
2020-02-27 21:54:18 -05:00
Henrik Lissner
1ab9f8b99d
Fix commenting JS in web-mode 2020-02-19 19:03:46 -05:00
Henrik Lissner
4b8986cac4
Add *.eex to web-mode-engines-alist #2564 2020-02-19 19:01:38 -05:00
Henrik Lissner
f0bc835d19
Fix #2564: associate *.eex with web-mode
And expand :mode declarations for readability.
2020-02-19 17:54:29 -05:00
Henrik Lissner
5c45a9eff9
Fall back to typescript-mode for *.tsx #2252 2019-12-26 15:00:44 -05:00
Henrik Lissner
2b36740325
lang/web: fix duplicate closing delimiters 2019-11-15 02:14:06 -05:00
Henrik Lissner
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
Henrik Lissner
110ce6f150
lang/web: fix *.html? association with web-mode 2019-11-05 10:33:24 -05:00
Henrik Lissner
3388fa028d
lang/web: compress web-mode :mode's into one 2019-10-18 21:35:30 -04:00
Henrik Lissner
33bc15788c
lang/web: enable company-css in web-mode 2019-10-10 16:11:42 -04:00
Henrik Lissner
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
Evan Lecklider
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
Henrik Lissner
2d365619cd
General refactor & cleanup, across the board 2019-09-13 22:00:34 -04:00
Nollo
3161ae59d3 [ADD] description for web prefix bindings 2019-07-29 09:21:16 +02:00
Henrik Lissner
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
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
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
Henrik Lissner
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
Henrik Lissner
eb3c569e1d
Replace +lsp|init with lsp! autodef 2019-03-02 01:34:19 -05:00
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
412063f452 lang/web: fix 'pair was never defined' error
Caused by recent change upstream, in smartparens
2018-11-12 02:38:09 -05:00
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
001f90df2f
lang/web: update set-docsets! & general refactor 2018-09-09 09:58:21 -04:00
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
fd8f8c5108
feature/lookup: rewrite dash docset integration
+ Uses alist variable to store config, rather than hooks
+ Added check for installed docsets in +lookup/documentation
+ Set docsets for various language modules (c-mode, c++-mode, css-mode,
  scss-mode, sass-mode, web-mode, go-mode, racket-mode, emacs-lisp-mode,
  js2-mode, rjsx-mode, typescript-mode, rust-mode, and php-mode)
+ Made *eww* popups for dash docsets larger
+ Renamed set-docset! => set-docsets! (set-docset! is aliased to
  set-docsets!)
+ New +lookup/install-docset alias
2018-08-31 02:49:48 +02:00
Henrik Lissner
3cddbd1949
Fix void-variable string #809 2018-08-16 02:18:44 +02:00
Henrik Lissner
40a900f533
lang/web: fix Emacs<26 incompatibility #806
The regexp argument for string-trim-right was introduced in 26.1.
2018-08-15 21:19:59 +02:00
Henrik Lissner
8248e80570
Improve web-mode + smartparens compatibility
This addresses two edge cases:

1. if web-mode-auto-close-style == 3, <'s behavior may insert an extra
   >
2. Some web-mode engines have pairs that end with smartparens pairs,
   which will result in web-mode inserting its closing pairs _and_
   smartparens inserting its closing pairs; resulting in extra
   characters.

Reported by @ar1a
2018-08-04 13:43:15 +02:00
Henrik Lissner
0ee42c1df0
Improve smartparens+web-mode compatibility
+ Enables web-mode's autopairing functionality
+ Prevents duplicate >'s after web-mode autopairing.
+ Leave longer-than-3-character pairs to smartparens (there was only
  <!-- -->)
+ Remove <?p -> <?php | ?> autopairer. Leave that to snippets (web-mode
  doesn't support prefixes longer than 3 letters, and <?php ?> is too
  much of a performance drain to have smartparens support it, so I added
  a "php" snippet that expands to <?php | ?>).
+ Tags now auto-close when you finish typing the opening
  tag. (web-mode-auto-close-style = 2)
2018-06-24 16:31:13 +02:00