Commit Graph

63 Commits

Author SHA1 Message Date
12ea77f937 Updated to prefered gocode fork (again) 2018-10-15 09:26:47 +02:00
c9aca5a81e Updated documentation to use better gocode fork (supports Go 1.11+) 2018-10-06 14:47:06 +02:00
6a44cf0124 editor/reformat: refactor & fixes
+ Change +format-type to +format-region-p (now a boolean)
+ Add PRESERVE-INDENT-P boolean argument to +format-buffer
+ Add +format-preserve-indentation variable (only controls indent
  preservation during +format/buffer, not +format/region, where it's
  always enabled).
+ Fix error arising from +format|buffer hook when no formatter is
  defined for the current mode #893
+ Change +format|buffer to alias for +format/buffer.
2018-09-18 15:19:50 -04:00
08d9c02218 lang/go: fix formatter
`use-region-p` is not a reliable mechanism for detecting region-type
formatting, so +format-type was added to the editor/format module.
2018-09-10 08:25:48 -04:00
bc092acaee lang/go: use gofmt for partials
goimports (if available) doesn't play well with partial code
reformatting.
2018-09-09 09:58:23 -04:00
6767bb926e lang/go: rebind conflicting keybinds for go-play-*
Fixes a startup error regarding binding to a non-prefix key.
2018-09-09 09:58:22 -04:00
7d3ffdff06 Remove third line in section headers
This is truly important stuff. We've saved many lives with this update.
2018-09-09 09:58:19 -04:00
84abac6b69 Remove def-menu!; use :localleader keys instead
def-menu was clumsy. We could use a better UI for refactoring commands,
but they should be available via localleader keybinds in any case.
2018-09-09 09:58:18 -04:00
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
f51f2948af New :editor format module
Centralized code formatting with built-in support for a variety of
languages. Provides the set-formatter! function for defining your own.

Still experimental and needs more testing!
2018-08-22 02:20:11 +02:00
e05d7cfee0 Change flycheck initialization strategy
Initialize it globally and turn it off where needed, instead of enabling
it on demand. Also fixes void-function: flycheck-mode errors when
:feature syntax-checker is disabled. This is experimental.

Indirectly fixes #710
2018-06-22 01:49:20 +02:00
c0251aacee Replace :lookup with set-lookup-handlers! autodef
And update all internal references.
2018-06-15 17:27:48 +02:00
588359cc5f Replace :eval/:repl with autodef functions
+ :eval => set-eval-handler!
+ :repl => set-repl-handler!
+ Updates all internal references.
2018-06-15 16:20:20 +02:00
98d2f1de3f Add set-env! autodef; make :env obsolete 2018-06-15 03:42:01 +02:00
d8b1e469bc Introduce autodefs to replace some settings
+ :popup -> set-popup-rule!
+ :popups -> set-popup-rules!
+ :company-backend -> set-company-backend!
+ :evil-state -> set-evil-initial-state!

I am slowly phasing out the setting system (def-setting! and set!),
starting with these.

What are autodefs? These are functions that are always defined, whether
or not their respective modules are enabled. However, when their modules
are disabled, they are replaced with macros that no-op and don't
waste time evaluating their arguments.

The old set! function will still work, for a while.
2018-06-15 03:42:01 +02:00
67eb749d1e lang/go: group flycheck config & use add-hook 2018-05-26 10:33:55 +02:00
e51e483c86 Small fixes for go-mode:
- Fixed typo for gocode command in `doctor.el`
- Only enable flycheck mode if the syntax-checker feature is enabled
2018-05-25 21:17:13 -04: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
adef00aa7c Don't byte-compile doctor.el files 2018-03-20 21:19:37 -04:00
82bead5ae4 Refactor & fix doom-doctor module checkups 2018-03-20 21:12:35 -04:00
74c8b1d113 Rewrite doctor; move warn! blocks out in doctor.el files 2018-03-12 13:32:01 -04:00
738f39d21a Change how shell env is injected #449
Changes the behavior of the :env setting to fetch the shell variables
immediately on call.
2018-03-02 19:55:05 -05:00
a9cbfc7f4e New :env setting for pulling shell envvars into MacOS sessions
:env lets you specify what environment variables exec-path-from-shell
should pull in from your shell environment at startup. As such, these
need to be defined at startup. :env is useless post-init.

May address #433
2018-03-01 01:03:03 -05:00
bac73ec938 Replace warn => warn! 2018-02-14 07:46:38 -05:00
d634a7e69d lang/go: put keybinds in evil maps to fix hijacked SPC in go-mode 2018-02-14 05:53:53 -05:00
38903d07e8 lang/go: relax warnings
+ Don't default to goimports unless it's available.
+ No warning if goimports is missing.
2018-02-14 05:52:08 -05:00
eaeb495b18 lang/go: show annotations in code-completion popups 2018-02-02 20:47:32 -05:00
ec7f20589a lang/go: don't popup gofmt errors (use flycheck instead) 2018-02-02 03:00:57 -05:00
31a4244686 Rethink what Doom loads at startup and manually
Better to simply load what we need, when we need it, rather than set up
autoloads for every litte thing.
2018-01-07 00:15:57 -05:00
42cee2e046 Update :jump => :lookup 2018-01-05 23:57:48 -05:00
9d81bc5a8b Major refactor: use-package-always-defer = nil & use :hook
Possibly breaking change: packages are no longer deferred by default.

Addresses #286
2017-12-08 23:14:11 -05:00
c45e2c4918 General & minor refactor+cleanup 2017-11-05 19:54:44 +01:00
ed76cfda99 General lang refactor; new refactor, help, build & test menus 2017-10-03 02:58:09 +02:00
d0fcb23314 Replace feature/eval build system with def-menu! 2017-10-03 02:58:09 +02:00
cbabf6849c Standardize module READMEs 2017-08-21 20:13:31 +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
77dc22f2f4 lang/go: add missing command-go-gocode-command variable 2017-06-02 23:54:07 +03:00
9a4a196b69 Refactor lang/go 2017-05-26 20:22:45 +02:00
009d7c9d49 lang/go: add goimports & godoc + more warnings 2017-05-26 20:22:45 +02:00
10ea06b661 General cleanup + refactor 2017-05-25 20:12:43 +02:00
e1f60b2bfd Update READMEs & add new ones 2017-05-25 20:09:12 +02:00
505d515dd8 Add README.org's for lang/cc, app/email; update other README.org's 2017-05-04 10:40:57 +02:00
0ded668d85 lang/go: update README 2017-05-03 22:36:16 +02:00
ac10ebbf71 lang/go: remove bootstrap 2017-04-27 18:15:08 -04:00
58597e4d5d More readme corrections 2017-04-27 18:14:06 -04:00
37c4b0f11a Fix TODO.org & lang/go/README.org links 2017-04-27 18:12:44 -04:00
27fc145ee9 lang/go: replace bootstrap with README.org 2017-04-27 18:02:54 -04:00
d20c8045ab General cleanup 2017-04-25 23:01:45 -04:00
5ae94b765c PRAISE BE TO THE BYTE COMPILER FOR THY SHARP QUOTES 2017-04-17 02:17:10 -04:00
648c4c1d3b Update lang modules' :build settings 2017-04-07 01:46:33 -04:00