Commit graph

108 commits

Author SHA1 Message Date
Henrik Lissner
c399c07694
Add :tools lsp checks for +lsp flag
Also:
- Reorganizes some :lang modules' packages.el file.
- Adds setuptools check in lang/python
- Adds javac check in lang/java
- Removes the depends-on! macro
2019-04-24 18:16:05 -04:00
Henrik Lissner
77e4cc4d58
💥 Remove :feature category
:feature was a "catch-all" category. Many of its modules fit better in
other categories, so they've been moved:

- feature/debugger -> tools/debugger
- feature/evil -> editor/evil
- feature/eval -> tools/eval
- feature/lookup -> tools/lookup
- feature/snippets -> editor/snippets
- feature/file-templates -> editor/file-templates
- feature/workspaces -> ui/workspaces

More potential changes in the future:

- A new :term category for terminal emulation modules (eshell, term and
  vterm).
- A new :os category for modules dedicated to os-specific functionality.
  The :tools macos module would fit here, but so would modules for nixos
  and arch.
- A new :services category for web-service integration, like wakatime,
  twitter, elfeed, gist and pastebin services.
2019-04-24 18:16:04 -04:00
Henrik Lissner
6cf6825a4d
lang/web: fix typo
Pushing to the wrong variable!
2019-04-08 23:07:29 -04:00
Henrik Lissner
742687a51e
Add delq! and pushnew! macros
And move projectile configs to their respective modules (and out of
package configs).
2019-04-08 23:01:30 -04:00
Henrik Lissner
eb3c569e1d
Replace +lsp|init with lsp! autodef 2019-03-02 01:34:19 -05:00
Henrik Lissner
cb923eadcc
Add basic LSP support
Still needs to be documented, but includes support for the following
languages:

+ C/C++/ObjC
+ Go
+ Java
+ Javascript
+ OCaml
+ PHP
+ Python
+ Ruby
+ Scala
+ Swift
+ HTML/CSS

Relevant to #460, #716, #1186
2019-02-21 19:13:35 -05:00
Henrik Lissner
3f195614d9
Normalize :leader/:localleader keybinds
Evil states no longer apply to them. Also removes x-alt-keysym.
2018-12-23 23:54:27 -05:00
Henrik Lissner
954b0f9c5d
Minor tweaks to map! calls for correctness
+ :map arguments shouldn't be quoted
+ :localleader keys default to all states in the absence of state
  modifiers. This is preferred, rather than restricting their use to
  normal state.
+ :map* is deprecated (there is no difference between it and :map)
2018-12-22 17:01:00 -05:00
Henrik Lissner
412063f452 lang/web: fix 'pair was never defined' error
Caused by recent change upstream, in smartparens
2018-11-12 02:38:09 -05:00
Henrik Lissner
34c490aae5
lang/web: correct config file check for jekyll
Jekyll looks for _config.(yml|toml), not config.yml.
2018-11-07 19:22:03 -05:00
Henrik Lissner
cdf745e72a
map!: remove buffer-local :desc properties
which-key labels are registered globally, and will not work for
buffer-local keybinds. Until general is brought in, we'll have to suffer
label-less localleader keybinds.
2018-10-07 21:34:24 -04:00
Henrik Lissner
523c2a114b lang/web (tests): Remove empty before-each block 2018-09-28 21:13:27 -04:00
Henrik Lissner
15991b5639 Refactor quiet! to be less destructive
It's possible for the debugger to be invoked from inside code wrapped in
a (quiet! ...) call. The debugger pauses Emacs in a broken state where
the functions locally rebound by quiet! (e.g. message, load-file,
write-region, etc) are never returned to their original definitions.

This attempts to reduce that probabilityby changing how quiet! silences
code. Rather than silencing them completely, they will be logged
to *Messages* but not displayed in the echo area.

Also, quiet! is now used less, where it isn't strictly needed (or where
inhibit-message is sufficient).
2018-09-28 21:13:27 -04:00
Henrik Lissner
29ad900c1f
lang/css: refactor +css/toggle-inline-or-block
Replaces instances of replace-regexp (interactive-only functions),
removing the need for with-no-warnings and quiet!.

Improves regexp responsible for compacting whitespace in between
properties, which reduces compaction of whitespace in string arguments.
2018-09-27 22:44:07 -04:00
Henrik Lissner
c7032cf8b0
lang/web: fully remove nil autopair group
This removes the nil autopair group, rather than just setting it to nil.
No functional different, it's [slightly] more performant.
2018-09-26 20:38:47 -04:00
Henrik Lissner
001f90df2f
lang/web: update set-docsets! & general refactor 2018-09-09 09:58:21 -04:00
Henrik Lissner
c58077810d
General refactor of modules
General code and comment improvements.

Also, removed the :desc's for csv-mode because map! is currently unable
to set which-key descriptions mode-locally, and should be avoided for
anything but global keybinds. This will be fixed when General is
introduced into Doom.
2018-09-09 09:58:20 -04:00
Henrik Lissner
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
Henrik Lissner
48c77b1126
Move helm-css-scss package to lang/web/+css 2018-09-09 09:58:18 -04:00
Henrik Lissner
b697ad982e
lang/web: more sensible html-tidy formatter config
+ No longer inserts html/body tags unless they're detected in the buffer
+ Respect tab-width and indent-tab-mode
+ Don't auto-remove empty elements
2018-09-03 03:59:24 +02:00
Henrik Lissner
0cf9d1f2f2
Minor refactor & revision across the board 2018-08-31 02:53:50 +02:00
Henrik Lissner
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
Henrik Lissner
2df2622329
lang/web/autoload/css: escape braces
Prevents auto-formatting of braces by tools like parinfer.
2018-08-31 02:40:15 +02:00
Henrik Lissner
c514ad200a
Remove web-beautify from javascript & web modules
Superceded by :editor format module, which uses prettier.
2018-08-25 00:06:13 +02:00
Henrik Lissner
3cddbd1949
Fix void-variable string #809 2018-08-16 02:18:44 +02:00
Henrik Lissner
40a900f533
lang/web: fix Emacs<26 incompatibility #806
The regexp argument for string-trim-right was introduced in 26.1.
2018-08-15 21:19:59 +02:00
Henrik Lissner
8248e80570
Improve web-mode + smartparens compatibility
This addresses two edge cases:

1. if web-mode-auto-close-style == 3, <'s behavior may insert an extra
   >
2. Some web-mode engines have pairs that end with smartparens pairs,
   which will result in web-mode inserting its closing pairs _and_
   smartparens inserting its closing pairs; resulting in extra
   characters.

Reported by @ar1a
2018-08-04 13:43:15 +02:00
Henrik Lissner
a876d87f5e
emmet-mode: bind to TAB & enable in reason-mode
TAB now either indents, expands the snippet at point, or expands the
emmet expression at point.

Also it now falls back to emmet-expand-line if yasnippet won't load.
2018-08-01 19:25:06 +02:00
Aria
90d09e6f93 Highlight-numbers on every prog-mode 2018-07-29 12:19:56 +10:00
Henrik Lissner
0ee42c1df0
Improve smartparens+web-mode compatibility
+ Enables web-mode's autopairing functionality
+ Prevents duplicate >'s after web-mode autopairing.
+ Leave longer-than-3-character pairs to smartparens (there was only
  <!-- -->)
+ Remove <?p -> <?php | ?> autopairer. Leave that to snippets (web-mode
  doesn't support prefixes longer than 3 letters, and <?php ?> is too
  much of a performance drain to have smartparens support it, so I added
  a "php" snippet that expands to <?php | ?>).
+ Tags now auto-close when you finish typing the opening
  tag. (web-mode-auto-close-style = 2)
2018-06-24 16:31:13 +02:00
Henrik Lissner
c78c6495f1
Apply /* and /** pairs to more modes
Including js, ts, rjsx, rust, all C modes, php, and all css modes (scss,
less, and stylus).

Requested by @ar1a
2018-06-24 16:31:13 +02:00
Henrik Lissner
b99ab59578
Replace :docset with set-docset! autodef 2018-06-15 16:20:20 +02:00
Henrik Lissner
eaca8c58fa
Move unit tests from ert to buttercup
Easier to organize and write. Now I can hopefully strive for better
coverage!
2018-06-15 03:42:01 +02:00
Henrik Lissner
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
Henrik Lissner
1a452b6842
💥 Change first arg of load! macro
load!'s first argument is no longer a symbol (that will cause
void-variable errors now) to save on unnecessary interning and simplify
compile-time logic. It accepts any valid form that evaluates to a string
now.

If you use load!, you need to change its argument to a string!

e.g. (load! +my-module) => (load! "+my-module")
2018-05-27 12:52:28 +02:00
Jeff Jewiss
68c0d228bc
support handlebars templates 2018-05-25 18:13:28 +01:00
Henrik Lissner
9a8b6a82e2
lang/web: add doctor.el 2018-05-25 01:01:25 +02:00
Henrik Lissner
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
Henrik Lissner
80adb9c1f6
General refactor for consistency & idempotency
Also updated comments
2018-05-18 01:26:41 +02:00
Henrik Lissner
bed5a2f305
lang/web: add *.jinja to web-mode 2018-05-17 12:26:42 +02:00
Henrik Lissner
803511c771
lang/web: disable company-css in Emacs 26+
css-mode's built-in completion is superior in Emacs 26+. The
company-capf backend will take advantage of it.
2018-05-17 12:22:27 +02:00
Benjamin Reynolds
9ac15aa0c1 Add [slim-mode] to :lang web +html
[slim-mode]: https://github.com/slim-template/emacs-slim
2018-05-14 20:30:28 -05:00
Henrik Lissner
8cab2f19fd
Remove redundant config & auto-mode-alist entries
Much of this config is done in package autoloads, and now that
auto-mode-alist is cached in doom-package-alist (after reading autoload
files), we can save some space by removing redundant config.
2018-05-14 20:48:14 +02:00
Henrik Lissner
fbb2a710b5
lang/web: add css library tests 2018-05-08 15:19:27 +02:00
Henrik Lissner
399f3538ce
lang/web: fix +css/toggle-inline-or-block 2018-05-08 15:19:09 +02:00
Henrik Lissner
168cb74794
Replace add-hook! with setq-hook! where possible 2018-05-07 22:37:19 +02:00
Henrik Lissner
6b573bc66b
Refactor :lang auto-mode-alist entries 2018-05-07 19:26:31 +02:00
Henrik Lissner
45bc6e49d3
lang/web: web-mode-enable-auto-quoting = nil 2018-04-28 15:54:39 -04:00
Henrik Lissner
33ad8ba4a4
lang/web: reformat whitespace in keybinds 2018-04-05 02:26:19 -04:00
Henrik Lissner
7699c3d2ce
lang/web: restore smartparens-mode in web-mode 2018-04-04 06:58:18 -04:00