Commit graph

46 commits

Author SHA1 Message Date
Henrik Lissner
91a4311a17
Fix #4202: svg files opening as text 2020-11-02 14:54:51 -05:00
Henrik Lissner
e24b8cd1d1
Slim down from lang/data
+ Removes jsonnet, graphql, dhall & protobuf packages from the module.
+ Removes +data-vagrant-mode project minor mode (unused).

I'm phasing out the lang/data module. Its original purpose was to be for
data interchange formats, like JSON, but over time it became the dumping
ground for languages with no clear defining feature.

These packages are being removed first because their configs are
non-existent or so trivial that it offers nothing a user couldn't set up
themselves.

graphql and jsonnet might get heir own modules (or jsonnet might be
gated behind a flag in the :lang json module), but for now they gotta
go.

fixup! Remove jsonnet, graphql, dhall & protobuf modes from lang/data
2020-04-23 23:56:17 -04:00
Henrik Lissner
4a8c4815f1
Add :lang yaml module
Removes yaml-mode from :lang data and adds LSP support (#2502).

Closes #2502

Co-authored-by: Seong Yong-ju <sei40kr@gmail.com>
2020-04-23 23:56:14 -04:00
Henrik Lissner
b151abfd34
Add :lang json module
Removes json-mode from :lang data and adds LSP support (#2502).
2020-04-23 23:28:50 -04:00
Henrik Lissner
af7f75089f
lang/data: sync tab-width with mode indent vars 2019-10-21 09:39:54 -04:00
Henrik Lissner
3b7711420f
General comment revision & cleanup 2019-09-06 00:25:35 -04:00
vikigenius
28a2d718c6 defer loading jsonnet-mode 2019-08-06 14:42:46 -04:00
vikigenius
df9509a298 minor fixes 2019-08-06 14:34:22 -04:00
vikigenius
f95c8bf2c8 Feature: Added support for jsonnet 2019-08-06 13:53:04 -04:00
Henrik Lissner
76cacb5bfe
💥 Rename def-package! -> use-package!
Calling this pivotal macro "def-package!" has frequently been a source
of confusion. It is a thin wrapper around use-package, and it should be
obvious that it is so. For this reason, and to match the naming
convention used with other convenience macros/wrappers, it is now
use-package!.

Also changes def-package-hook! -> use-package-hook!

The old macros are now marked obsolete and will be removed when straight
integration is merged.
2019-07-23 12:50:45 +02:00
Henrik Lissner
10c808466f
lang/data: improve nxml-mode support 2019-07-22 02:37:45 +02:00
Henrik Lissner
060ede0e2e
General, minor reformatting across the board
And an offering of blood to our great lord Byte Compiler-sama.
2019-07-22 02:37:45 +02:00
Henrik Lissner
0a84d2f0a9
core-lib: add auto-minor-mode, revise def-project-mode!
- Adds the auto-minor-mode package to replace our in-house
  implementation.
- Merges associate! into the def-project-mode! macro because associate!
  on its own is less useful than auto-minor-mode-alist,
  auto-minor-mode-magic-alist or hooks.
- Changes the semantics of :modes and :add-hooks properties of
  def-project-mode!. Its arguments are evaluated as is; lists will need
  to be quoted.

squash! core-lib: remove associate! macro
2019-07-22 02:30:39 +02:00
Henrik Lissner
c82faf7f10
General reformatting & minor refactors 2019-02-19 15:53:26 -05:00
Henrik Lissner
43975d3cd4
lang/data: remove vimrc-mode
This package/mode isn't "data".

Relevant to #973
2019-02-19 15:53:23 -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
Ruslan Kamashev
62212a4b94 Add tools/ansible 2018-09-11 22:42:05 +03: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
f6dc6ac74e
Refactor out map.el usage
After some profiling, it turns out map-put and map-delete are 5-7x
slower (more on Emacs 25) than delq, setf/alist-get and add-to-list for
small lists (under 250 items), which is exactly how I've been using
them.

The only caveat is alist-get's signature is different on Emacs 25, thus
a polyfill is necessary in core-lib.
2018-06-23 19:53:54 +02:00
Henrik Lissner
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
Henrik Lissner
9f0ebe42e8
Replace :electric with set-electric-rules!
And general refactor of the emacs/electric-indent module.

Also updates (set! :electric ...) references in various :lang modules
2018-06-15 13:32:07 +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
3bdb3d4e5d
Update uses of associate! 2018-06-01 02:20:00 +02:00
Henrik Lissner
27cee0bf5a
Remove redundant hexl-mode block 2018-05-25 18:33:30 +02:00
Henrik Lissner
4456907ad0
Merge branch 'develop' into patch-csv 2018-05-25 18:31:38 +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
Aria
48c65c2a2d Add csv mode to data 2018-05-17 08:47:38 +10:00
Henrik Lissner
6b573bc66b
Refactor :lang auto-mode-alist entries 2018-05-07 19:26:31 +02:00
Henrik Lissner
23d887303d
lang/data: .gql => graphql-mode 2018-05-07 19:26:31 +02:00
Henrik Lissner
fd3d2ebf0d
lang/data: alphabetize package configs 2018-04-03 04:18:11 -04:00
Henrik Lissner
7c5832c285
lang/data: add graphql-mode 2018-04-03 04:16:40 -04:00
Henrik Lissner
6c4e048c23
General refactor & cleanup 2018-02-14 07:47:22 -05:00
Henrik Lissner
294f858875
lang/data: enable flycheck-mode for json-mode 2018-01-28 04:29:10 -05:00
Henrik Lissner
d0fcb23314
Replace feature/eval build system with def-menu! 2017-10-03 02:58:09 +02:00
Henrik Lissner
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
Henrik Lissner
89db7ac2b9 lang/data: fix hexl-mode 2017-06-08 11:16:44 +02:00
Henrik Lissner
0e7254d312 General cleanup + refactor 2017-04-17 02:20:07 -04:00
Henrik Lissner
648c4c1d3b Update lang modules' :build settings 2017-04-07 01:46:33 -04:00
Henrik Lissner
0abc4cc60d Fix #37: remove aggressive electric indentation 2017-03-15 12:57:54 -04:00
Henrik Lissner
3ac1d382be Fix project mode definitions 2017-03-02 18:28:46 -05:00
Henrik Lissner
c037c325a1 Refactor add-hook! and associate!; associate! only for minor modes now 2017-03-02 18:28:46 -05:00
Henrik Lissner
33c88d4f82 Revert macros to ...! name convention (elisp doesn't like @...) 2017-02-23 00:06:12 -05:00
Henrik Lissner
afc5b622bb Refactor :electric setting 2017-02-20 20:55:21 -05:00
Henrik Lissner
e14e25ecb4 Update modules/lang/* 2017-02-20 00:26:08 -05:00
Henrik Lissner
f453b3cee1 Reorganize modules 2017-02-20 00:23:03 -05:00
Renamed from modules/module-data.el (Browse further)