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
Caused when you have :lang web disabled, but :lang javascript enabled.
This is a stopgap until I decide what to do with typescript-tsx-mode.
Fix: #6243
lsp-mode doesn't detect the correct indentation, since it treats the
derived tsx-mode as a web-mode. This change modifies the lsp-mode
internal alist to recognize tsx-mode correctly. Ideally lsp-mode would
have a better way to modify its known mode lists but I couldn't see it.
Ref: emacs-lsp/lsp-mode#3308
+ Use rjsx-mode for all javascript files. It degrades gracefully and is
less maintenance.
+ Rethink flycheck + JS integration. You should get eslint and tslint
support in web-mode, typescript-mode, and typescript-tsx-mode now (as
well as rjsx-mode, of course).
Tide doesn't work with rjsx-mode after changing to *-mode-local-vars-hook.
Fixed by adding +javascript-init-lsp-or-tide-maybe-h for
rjsx-mode-local-vars-hook as well.
Signed-off-by: Huy Duong <huy.duong@employmenthero.com>
This package isn't hooked up to anything and has no keybinds. Its config
is so trivial that users can install it themselves, so I decided it
won't be included with the module by default.
And fix an issue where +javascript-init-lsp-or-tide-maybe-h would
reference lsp-mode in the rare case where lsp-mode isn't defined (likely
because the user forgot to run `doom refresh` after enabling the :tools
lsp module).
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"))
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.
- 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
The goal was to enable lsp (if +lsp is enabled), failing that it would
fall back on tide. This also adds lsp+tide support for tsx files opened
in web-mode.