Commit graph

56 commits

Author SHA1 Message Date
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
Diego Berrocal f8ecf0cb1b Add null-check for filename before calling file-name-extension func 2018-01-08 02:11:19 -05:00
syl20bnr 326965d4ce Happy New Year 2018! 2018-01-04 02:00:25 -05:00
AlexandrosKotzias cebb3b9ff2 Fix documentation issues with typescript 2017-11-19 11:38:17 +02:00
JAremko 06301b2212 Improve exporting/testing 2017-08-18 20:50:21 +03:00
syl20bnr e09385d29e typescript: mention tide-tsserver-executable variable in doc 2017-07-14 16:58:30 -04: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
Victor Andrée 110419fd01 Call tsfmt with extension of current buffer for TSX formatting
Addresses #8297 for the tsfmt backend. However, does not fix tide issue, and
automatic major mode formatting (`SPC m =`) does not work in TSX files as they
are opened in web mode.
2017-05-23 15:08:12 +02:00
JAremko 6c5a0b2b14 update docs to the new toc-org format 2017-05-22 18:35:37 +03: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
Francesc Elies 29049dd3ac
Update README.org
Uses flycheck instead of flycheck-typescript-tslint
2016-11-03 19:00:53 +02:00
Eivind Fonn f0803bc7f9 Explicitly add company-tide as backend 2016-10-13 10:55:17 +02:00
Eivind Fonn 7869154e9d Define typescript company backends 2016-10-13 08:49:13 +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 81fbb9a292 Format README files with spacefmt 2016-06-10 00:09:42 -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
JAremko 0f36dd44d7 fmt typescript docs
formatting

formatting
2016-05-11 20:58:20 -04:00
Overmind JIANG 5eac955cd3 Allow tsfmt to use the local project's config.
By adding `--baseDir=.` to the command line arguments.
2016-05-11 20:58:12 -04:00
syl20bnr 07852abad5 Format documenation files with doc-fmt tool 2016-04-12 23:31:38 -04:00
syl20bnr 3b0c1fd93d Convert org doc files with doc-fmt 2016-03-30 22:59:55 -04:00
JAremko 8628e45fd3 add typescript fmt
fixed typo

reordered packages

made formatting off by the default

fixed docs

fixed docs... Again

fixed docs... Like 3-d time

fixed docs... Did I?

I CAN DO IT!

hooked named function instead of lambda
2016-02-17 00:05:47 -05:00
syl20bnr d924f036f9 TypeScript: change key bindings to be more conventional
To follow conventions and omnisharp bindings the following changes have
been made:
SPC g m --> SPC g t
SPC r --> SPC g u
SPC h d --> SPC h h
SPC s --> SPC s r
SPC n r --> SPC r r
2016-02-01 00:04:49 -05:00
JAremko 7a80049fa4 replaced typescript layer
fixed docs

Better docs, added linter and tsx mode

fixed typo

made TSX optional
2016-01-31 23:56:14 -05:00
syl20bnr 046d86800c Clean copyrights and update for year 2016 2016-01-11 21:42:17 -05:00