Commit graph

58 commits

Author SHA1 Message Date
Ting Zhou cffd90080b only use javascript-typescript-langserver for javascript, react, typescript
layer, and purge other langservers
2018-08-03 01:37:36 +03:00
Roy Choo 43f0b4d617 typescript: remap keybinding to use tide function
- As described in #10870, typescript/jump-to-type-def function is removed,
but the keybinding is still calling it.

- Mapping the keybind to call tide jump to definition directly.
2018-07-11 00:20:07 +03:00
Daniel Perez Alvarez ce1d1a19c4 change En -> Ed 2018-07-04 00:53:38 +03:00
Daniel Perez Alvarez 75e192c897 [typescript] En -> tide-add-tslint-disable-next-line 2018-07-04 00:53:38 +03:00
syl20bnr 19b478efbd Lazy load flycheck 2018-06-11 02:14:12 -04:00
syl20bnr 49b1659a18 Lazy load lsp-mode 2018-06-11 00:28:11 -04:00
Aaron Jensen 95a40af341 Revert "Move yas-activate-extra-mode setup to javascript layer" (#10746)
This reverts commit e4eca01e82.
2018-06-01 20:34:48 -04:00
syl20bnr e4eca01e82 Move yas-activate-extra-mode setup to javascript layer 2018-05-18 01:25:29 -04:00
syl20bnr 1a0e5e34e3 javascript: add safe values for javascript backend 2018-05-13 02:14:09 -04:00
syl20bnr 1a5664e436 typescript: add safe values for typescript-backend variable 2018-05-12 02:51:42 -04:00
syl20bnr f4223543e1 typescript: fix usage of hooks in multiple backends setup
This is necessary as we use hack-local-variables-hook to setup the backends,
at this time it is too late to setup hooks, we need to call the function right
away.
2018-05-12 02:46:51 -04:00
syl20bnr 883f57ee74 typescript: fix hooks to take into account directory variables
Also use spacemacs/add-hooks when applicable.
2018-05-12 02:33:10 -04:00
syl20bnr 14a5b8c21a typescript: use spacemacs/add-to-hooks function 2018-05-12 00:23:10 -04:00
Andrea Moretti 3a516438cd add smartparens mode 2018-05-12 00:23:10 -04:00
Andrea Moretti 8081d51560 typescript: avoid 0 char autocomplete 2018-05-12 00:10:36 -04:00
Ting Zhou 5c14486b62 Fix: remove buggy hooks in javascript and typescript 2018-05-11 01:48:03 -04:00
Ting Zhou 59e0c5683a Add: lsp-typescript support 2018-05-07 23:47:24 -04:00
syl20bnr ebe4c60264 Revert "Defer packages by default using use-package-always-defer"
This reverts commit 29c78ce841 and all other fixes
that have been made afterwards.

The motivation is that use-package is seen by many as a replacement for
`require`. Is use-package always defer the loading of packages then is breaks
this use case, this does not respect POLA so even if it was making Spacemacs
loading faster (up to 3s faster on some startup on my machine) we just cannot
use it, it would be irresponsible. Spacemacs should be easy to use, loading
performance will come with time but it is not a priority.
2018-03-03 23:40:10 -05:00
Aaron Jensen 31dc961ef8 typescript: Fix eldoc hooks 2018-03-03 22:46:47 -05:00
syl20bnr baf154b0c3 typescript: isolate el-doc configuration
also ensure that eldoc-mode is called after tide-setup
2018-03-03 16:53:42 -05:00
Aaron Jensen e1e4aeb5a4 typescript: Fix eldoc
eldoc cannot be enabled until after tide-setup is run.
2018-03-03 16:47:41 -05:00
syl20bnr 3731d0d3fc Move major specific error key bindings to SPC m E prefix
Also add a convention for it.
2018-03-03 16:45:00 -05:00
Simon Altschuler ed1cccd319 Rename typescript "rename" bindings to "refactor" 2018-03-03 16:30:13 -05:00
Simon Altschuler 93c24c3cc7 Add tide-fix binding to typescript layer 2018-03-03 16:30:09 -05:00
syl20bnr 29c78ce841 Defer packages by default using use-package-always-defer
Warning now `:defer t` is implied, to force a package to load `:demand t` is
now necessary.
2018-02-27 23:32:52 -05:00
Aaron Jensen 6ec6af84d0 typescript: create derived mode for tsx 2018-02-24 19:49:39 -05:00
syl20bnr 326965d4ce Happy New Year 2018! 2018-01-04 02:00:25 -05:00
syl20bnr 27a3684e3b typescript: rename functions with spacemacs prefix 2017-07-14 16:50:34 -04:00
syl20bnr 20bafdbb92 typescript: rewrite hooks for web-mode 2017-07-14 16:47:15 -04:00
George Miller 74ca54ad40 Adds tide keybindings to tsx web mode
Currently, when a tsx file is edited, the typescript layer puts it into web
mode so we can properly edit/format the html that's inside. However, with this
you lose the awesome ", g g" keybinding which takes you to a definition of
the current function/variable. You also lose the ", g u" keybinding which
gives you all references of current function/variable. This PR adds
all the tide bindings that are in typescript mode into web mode while using the typescript layer.

NOTE:
I must add ("gg" tide-jump-to-definition) to the webList because spacemacs-jump-handlers-web-mode does not exist.
2017-07-14 14:14:15 -04:00
syl20bnr 70e5a10537 typescript: declare tide-jump-to-definition as async.
Fixes #8963
2017-07-14 14:08:37 -04:00
syl20bnr e2e532bb49 core: change <function>p to <function>-p suffixes for consistency
Also defined aliases for backward compatibility with `usedp` functions.
2017-07-02 10:09:39 -04:00
jupl 09ce56df3d Use add-node-modules-path to automatically find local executables 2017-06-07 16:49:11 +02:00
syl20bnr f45ce1a88e syntax-checking: rename function add-flycheck-hook to enable-flycheck
spacemacs/add-flycheck-hook was not really hooking anything, change the name
to better reflect what it does.
Also changed the push for a add-to-list to avoid duplicates.
2017-03-19 12:40:36 -04:00
syl20bnr fb27ede558 Bump year in copyright headers
Happy New Year 2017!
2017-01-05 23:08:17 -05:00
Steven Allen 9fb2634817
Fix eldoc initialization in typescript layer. 2017-01-04 22:04:25 +02:00
syl20bnr 74fdbb6795 Refactor and simplify company backends declaration
Enabling a company backend for a specific mode was a tedious tasks with code
scattered at different locations, one for local variable definitions, one for
company hook function definitions and another where the backends were pushed to
the local variables (which was problematic, since we ended up pushing the same
backends over and over again with `SPC f e R`, pushes have been replaced by
add-to-list calls in the new macro).

All these steps are now put together at one place with the new macro
spacemacs|add-company-backends, check its docstring for more info on its
arguments.

This macro also allows to define arbitrary buffer local variables to tune
company for specific modes (similar to layer variables via a keyword :variables)

The code related to company backends management has been moved to the
auto-completion layer in the funcs.el file. A nice side effect of this move is
that it enforces correct encapsulation of company backends related code. We can
now easily detect if there is some configuration leakage when the
auto-completion layer is not used. But we loose macro expansion at file loading
time (not sue it is a big concern though).

The function spacemacs|enable-auto-complete was never used so it has been
deleted which led to the deletion of the now empty file core-auto-completion.el.

The example in LAYERS.org regarding auto-completion is now out of date and has
been deleted. An example to setup auto-completion is provided in the README.org
file of the auto-completion layer.
2017-01-02 00:39:04 -05:00
syl20bnr bdd4e6c23f typescript: move eldoc config to init function 2017-01-02 00:12:51 -05:00
Eivind Fonn f0803bc7f9 Explicitly add company-tide as backend 2016-10-13 10:55:17 +02:00
Eivind Fonn 669dce7c2d Handle typescript FIXME 2016-10-08 19:36:50 +02:00
Eivind Fonn ff95f2a9ab typescript: Fix potential nil buffer-file-name 2016-10-07 12:14:29 +02:00
syl20bnr 9066d073b2 Fix (void-variable spacemacs-jump-handlers-....)
Move the variable definitions to config.el and eval-after-load the
key binding on SPC m g g.
2016-09-04 22:31:47 -04:00
syl20bnr c6a6c41d92 Replace hooks by regular list for jump lists
Hook semantic is to be used with run-hooks API and run all hooks
sequentially, jump list semantic is different since the running
functions are not guaranteed to be executed so we prefer using regular
list API to manage jump-lists.
2016-09-04 12:28:40 -04:00
Eivind Fonn 928983da47 Refactor jump to definition
This commit defines:

- spacemacs-default-jump-handlers: a list of functions that can jump to
  definition in ALL modes.

- spacemacs-jump-handlers-MODE: a list of functions that can jump to
  definition in MODE.

- spacemacs-jump-handlers: a buffer-local list of functions that can
  jump to definition. This is made up of the values of the two previous
  variables whenever a given major mode is activated.

- spacemacs/jump-to-definition: a function that tries each function in
  spacemacs-jump-handlers in order, and stops when one of them takes us
  somewhere new.

- spacemacs|define-jump-handlers: a macro that
  * defines spacemacs-jump-handlers-MODE, possibly filled with initial
    functions
  * defines a function that is added to the hook of the given MODE
  * binds “SPC m g g” of that MODE to spacemacs/jump-to-definition

This is an attempt to harmonize all the different approaches to jumping.
Specifically,

- Existing intelligent jump packages that work for only a single mode
  should go to the beginning of spacemacs-jump-handlers-MODE. E.g.
  anaconda for python, ensime for scala, etc.

- Packages like gtags that work for several modes (but potentially not
  all) and which is dumber than the intelligent jumpers should go the
  the END of spacemacs-jump-handlers-MODE.

- Packages like dumb-jump that work for all modes should go to
  spacemacs-default-jump-handlers.

In all cases the order of the jump handlers in each list should be from
most to least intelligent.

Fixes #6619
2016-08-22 15:08:25 +02:00
zilongshanren bbfb4a0ea7 typescript: swap c-j/c-k in tide reference mode 2016-07-05 00:23:16 -04:00
syl20bnr a2de9a63af Use :toggle keyword instead of when forms 2016-05-29 22:39:21 -04:00
JAremko 73d48338c8 remove tslint package 2016-05-11 20:59:05 -04:00
JAremko 75754a3a9e Make tide formatter default 2016-05-11 20:59:05 -04:00
JAremko bf4baf0646 make tsfmt use config file 2016-05-11 20:59:00 -04:00
JAremko adebb01358 Add 'send to playground'
remove unnecessary init

refactoring

typo
2016-05-11 20:58:20 -04:00