Commit Graph

52 Commits

Author SHA1 Message Date
316a9f06b2 completion/company: add company-prescient 2018-08-04 02:14:43 +02:00
533cb13a02 Append default backends to buffer-local backends 2018-07-30 12:57:26 +02:00
22aeaec399 Refactor how company-backends are set and stored
Company backends are now built from an alist (+company-backend-alist),
which can be manipulated through set-company-backend!. Backends can now
be set to all children of a parent mode (text-mode, prog-mode, etc),
like so:

  (set-company-backend! :derived 'text-mode 'company-dabbrev)

or only for an exact major-mode:

  (set-company-backend! 'markdown-mode 'company-dabbrev-code)

Backends cascade. So combining the two examples above will cause
company-backends in a markdown-buffer (which is derived from text-mode)
to be (company-dabbrev-code company-dabbrev).
2018-07-30 03:43:42 +02:00
80a3c9bf62 Fix company-box not showing lone candidates
Revert this once sebastiencz/company-box#40 is merged.
2018-07-05 21:45:44 +02:00
dfed54c7ad Shrink oversized company-box icons
This would cause lines in company-box frames to be too large, making the
last candidate seem cut off by the frame edge.
2018-07-05 21:40:34 +02:00
2e29455cb4 Disable company-mode in eshell-mode
It appears to be incompatible with pcomplete, causing random errors and
whitespace insertion at odd times.
2018-06-29 01:51:49 +02:00
029824b6c1 Update company-box icons
Inspired by @fuxialexander's config
2018-06-27 19:13:54 +02:00
1ef581d376 Load company (+auto) on post-self-insert-hook
This is a little later than pre-command-hook, but makes more sense.
Needs more testing though!
2018-06-05 12:04:43 +02:00
cd0e9826ac Remove company-statistics package
Was a little slow, not terribly helpful and would clash with certain
company backends (like company-lsp).
2018-06-03 23:28:44 +02:00
0018d1c809 Change default company-backends to capf+yasnippet
And list their results separately.
2018-06-03 23:27:06 +02:00
80bd587d87 Move :company-backend setting to autoload.el
This decouples the company module from module load-order.
2018-06-01 14:54:13 +02:00
3b85720c9c Fix incorrect uses of add-to-list 2018-05-28 12:26:03 +02:00
09cb4f6716 Major refactor & optimization of how modules load their packages
Now that we are loading package autoloads files (as part of the
generated doom-package-autoload-file when running make autoloads), many
:commands properties are redundant. In fact, many def-package! blocks
are redundant.

In some cases, we can do without a config.el file entirely, and can move
into the autoloads file or rely entirely on package autoloads.

Also, many settings have been moved in their module's autoloads files,
which makes them available ASAP; their use no longer depends on module
load order.

This gained me a modest ~10% boost in startup speed.
2018-05-25 00:46:16 +02:00
94f9e43f25 Rewrite :defer semantics
:defer now supports a hook, a cons cell with (SYMBOL . INTEGER) where
SYMBOL is a hook and INTEGER is a number of idle seconds before the
package is autoloaded, or just the integer (as per the default behavior
of :defer).

Also fixes an issue where switch-buffer-deffered packages (like
smartparens) wouldn't load.
2018-05-15 10:54:45 +02:00
a631c10d05 Exploit new :defer input|buffer across various modules 2018-05-14 20:45:47 +02:00
1ee9a1893f completion/company: company-frontends bug fixed upstream 2018-05-10 19:27:14 +02:00
7d7c978877 completion/company: enable company-mode in eshell-mode 2018-05-08 16:18:30 +02:00
7ee689c57c completion/company: reduce contrast of company-box icon colors 2018-04-23 04:30:44 -04:00
2b0c681d7a completion/company: refactor icons & add colors 2018-04-23 04:24:42 -04:00
779184a9ee completion/company: remove company-quickhelp
Quickhelp is unreliable and doesn't look very good. I'm searching for an
alternative.
2018-04-23 03:42:19 -04:00
5e007ada08 completion/company: use company-pseudo-tooltip-frontend instead 2018-04-23 02:37:58 -04:00
aef9724324 Add doom*shut-up advisor to core-lib 2018-04-23 00:03:28 -04:00
97812583f0 completion/company: add company-box config & +childframe flag 2018-04-22 23:41:53 -04:00
6bdaf2afbb completion/company: refactor +auto implementation 2018-04-22 23:41:20 -04:00
c583a89a15 completion/company: allow minor modes in :company-backend 2018-04-22 23:40:09 -04:00
148f0a6e34 completion/company: set variables sooner (easier to override) 2018-04-18 18:22:23 -04:00
c788224946 completion/company: company-tooltip-limit = 14 2018-02-02 20:47:32 -05:00
08b2cc8ea3 completion/company: add +auto flag (for as-you-type completion) 2018-02-01 16:38:28 -05:00
2d9e63d5bb General & minor refactoring 2018-01-07 00:15:58 -05:00
f27d1b954c disable company for gud-mode 2017-10-06 21:55:06 -07:00
1fe1758335 Ensure idempotent company-dict init 2017-06-30 03:19:09 +02:00
3801da0db1 Add company-(dabbrev|ispell) to default backends
Partially addresses #134
2017-06-30 03:18:31 +02:00
0a34d8627e Fix duplicate backends by :company-backend #135 2017-06-28 23:10:53 +02:00
451f2d6301 Ensure idempotence when setting company-transformers 2017-06-28 16:29:10 +02:00
a7dc91e7bf Improve :company-backend setting according to #125
(set! :company-backend MODES &rest BACKENDS)
2017-06-28 12:26:49 +02:00
18ad96d156 Fix :company-backend 2017-06-24 16:43:39 +02:00
c8757b85f7 Fix :company-backend not overwriting past settings
In case you want to alter a mode's company-backend later or in a private
module.
2017-06-24 02:25:15 +02:00
14e69ca830 Fix max-lisp-eval-depth in :company-backend #115
Mode was inadvertantly run like a function in the :company-backend
setting macro.
2017-06-19 12:08:38 +02:00
928812da8a Make def-setting! behave more like defmacro
set! used to aggressively evaluate its arguments (at expansion-time),
even if placed inside an after! block. This causes unavoidable errors if
those arguments use functions/variables that don't exist yet.

Fixes #112
2017-06-19 00:32:44 +02:00
c7254e7bdc Major optimization refactor, across the board
+ enable lexical-scope everywhere (lexical-binding = t): ~5-10% faster
  startup; ~5-20% general boost
+ reduce consing, function calls & garbage collection by preferring
  cl-loop & dolist over lambda closures (for mapc[ar], add-hook, and
  various cl-lib filter/map/reduce functions) -- where possible
+ prefer functions with dedicated opcodes, like assq (see byte-defop's
  in bytecomp.el for more)
+ prefer pcase & cond (faster) over cl-case
+ general refactor for code readability
+ ensure naming & style conventions are adhered to
+ appease byte-compiler by marking unused variables with underscore
+ defer minor mode activation to after-init, emacs-startup or
  window-setup hooks; a customization opportunity for users + ensures
  custom functionality won't interfere with startup.
2017-06-09 00:47:45 +02:00
fbe782df22 Heavily redesign keybinding design
+ SPC and SPC m as leader/localleader (spacemacs-ey)
+ Move all custom keybindings to private +bindings.el file
+ Redesign+rearrange keybindings
2017-05-28 02:48:20 +02:00
10ea06b661 General cleanup + refactor 2017-05-25 20:12:43 +02:00
99bf1c04fb Don't let derived modes inherit company backends 2017-05-23 21:19:15 +02:00
d20c8045ab General cleanup 2017-04-25 23:01:45 -04:00
3daa1576ba completion/company: TAB auto-completion in comint/term buffers 2017-04-22 17:12:52 -04:00
139cae6083 completion/company: silence company-statistic-mode load-file call 2017-04-17 17:05:17 -04:00
5ae94b765c PRAISE BE TO THE BYTE COMPILER FOR THY SHARP QUOTES 2017-04-17 02:17:10 -04:00
caf2b7f4f3 completion/company: general refactor + key rebinding + cleanup 2017-03-04 00:02:19 -05:00
22e3baf184 Add minor-mode-specific snippets & company-dict dictionaries 2017-03-02 18:28:46 -05:00
33c88d4f82 Revert macros to ...! name convention (elisp doesn't like @...) 2017-02-23 00:06:12 -05:00