Commit graph

38 commits

Author SHA1 Message Date
Henrik Lissner
ad6a3d0f33
refactor: deprecate featurep! for modulep!
featurep! will be renamed modulep! in the future, so it's been
deprecated. They have identical interfaces, and can be replaced without
issue.

featurep! was never quite the right name for this macro. It implied that
it had some connection to featurep, which it doesn't (only that it was
similar in purpose; still, Doom modules are not features). To undo such
implications and be consistent with its namespace (and since we're
heading into a storm of breaking changes with the v3 release anyway),
now was the best opportunity to begin the transition.
2022-08-14 20:43:35 +02:00
Henrik Lissner
a70e634ebd
refactor(:lang): move tree-sitter init
Moved add-hook calls (for tree-sitter initialization) into their
respective modes' config blocks, or nearby, to be consistent with how
other, similar tools (like lsp!) are initialized, and does so at
runtime, rather than at expansion/compile time, which eval-when! caused.
2022-07-25 17:34:44 +02:00
Jeetaditya Chatterjee
7f814e5d99
refactor(:lang): redo tree-sitter hooks
- bind to major-mode-local-vars-hook instead of major mode hook
- bind the autodef tree-sitter! instead of the functions.
2022-05-22 21:26:08 +01:00
Jeetaditya Chatterjee
0c2f986708
feat(:lang): enable ts text objs in modes 2022-05-22 21:26:03 +01:00
Jeetaditya Chatterjee
06ed5ade3f
refactor!(tree-sitter): add +tree-sitter flag
BREAKING CHANGE: break the global nature of the tree sitter
module by adding a +tree-sitter flag to every applicable module

In the background this hooks turn-on-tree-sitter-mode
to the major-mode-hook of the language.
This may also solve the eager loading of tree sitter
2022-05-22 21:26:00 +01:00
Henrik Lissner
d58d084774
tweak(:lang,:tools): start eglot/lsp-mode later
To ensure lsp/eglot settings have precedence over local servers (e.g.
cider and lookup handlers).

Ref: clojure-emacs/cider#3170
2022-03-30 17:32:47 +02:00
Bryan Gilbert
ff3248d022 Disable lsp indentation in scala mode 2020-10-27 09:28:11 -04:00
Henrik Lissner
7081d833f6
Move :ui pretty-code to :ui ligatures
Includes a major refactor of the module.
2020-08-20 02:14:32 -04:00
Henrik Lissner
fa1743eee8
Add pretty-symbols-alist support to scala
Closes #2705

Co-authored-by: Ashkan <ashkan.aleali@gmail.com>
2020-06-07 14:25:06 -04:00
Henrik Lissner
a10f3e2670
Persist scala/sbt repl; don't delete it when popup closes 2020-02-25 20:49:26 -05:00
Henrik Lissner
200fed337c
Conform scala comment function to naming conventions 2020-02-25 20:47:37 -05:00
Henrik Lissner
9b25582be1
Reduce list of root files projectile searches for
And define them on a per-module basis. This reduces the number of file
checks it performs, particularly for non-project files.

Might help #1317
2019-10-19 22:22:49 -04:00
Henrik Lissner
e1edbcb3d9
Remove dtrt-indent entries for crystal, rust & scala
They were merged upstream in jscheid/dtrt-indent/pull/49
2019-10-19 15:01:37 -04:00
Oleksii Filonenko
d2aa2443c2
lang/scala: replace ensime with metals
Ensime just went missing from everywhere.
On [[ensime.github.io]], they encourage to switch to metals -
a new Scala language server already supported by lsp-mode.

This commit:
- removes ensime completely
- adds a doctor.el to check for metals-emacs binary

Original issue: 6288099561
Metals: https://scalameta.org/metals/docs/editors/emacs.html
2019-10-02 10:38:11 +03:00
Henrik Lissner
2d365619cd
General refactor & cleanup, across the board 2019-09-13 22:00:34 -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
d2b694ed53
lang/scala: fix REPL command for non-project files
run-scala errors out if you're not in a valid project.
2019-07-11 01:24:28 +02:00
Henrik Lissner
5c7c62ad22
lang/scala: move lsp! to local-vars hook
Start lsp as late as possible so users have more time to inject
file/dir-local vars or customization hooks before it is started.
2019-07-10 11:33:46 +02:00
Henrik Lissner
9752cc005c
lang/scala: minor reformatting 2019-06-28 17:28:28 +02:00
Henrik Lissner
08e125d3d0
lang/scala: fix comment continuation #1515
On Doom's modded newline-and-indent.
2019-06-28 17:28:10 +02:00
James Ravn
a639d36a92 remove lsp-scala
lsp-scala is deprecated. It's now bundled in lsp-mode as lsp-metals.
2019-06-27 18:27:39 +01: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
f25a5942e8
lang/scala: fix void-variable dtrt-indent-hook-mapping-list 2018-09-19 00:01:33 -04:00
Henrik Lissner
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
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
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
6b573bc66b
Refactor :lang auto-mode-alist entries 2018-05-07 19:26:31 +02:00
Henrik Lissner
135ebd925f
Enable global-eldoc-mode; less work for me! 2018-04-23 00:34:03 -04:00
Henrik Lissner
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
Jean-Baptiste Giraudeau
c8f7f149f2 Fix invalid default for ensime-eldoc-hints (now set to 'all)
See valid values at f1ca2bd6de/ensime-vars.el (L51)
Alternatively, could be set to nil (to avoid slowdown for complex project by default).
2017-07-23 15:07:57 +02:00
Henrik Lissner
3643d9e16d
Refactor lang/scala #125
+ Autoload ensime after scala-mode
+ Don't let ensime initialize company; let :company-backend do it
+ Fix void-variable imenu-auto-rescan error caused by
  ensime--setup-imenu.
2017-06-28 12:26:32 +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
8a70e47e6d lang/scala: refactor + fix ensime-mode init 2017-06-04 02:29:39 +02:00
Henrik Lissner
5ae94b765c PRAISE BE TO THE BYTE COMPILER FOR THY SHARP QUOTES 2017-04-17 02:17:10 -04:00
Henrik Lissner
33c88d4f82 Revert macros to ...! name convention (elisp doesn't like @...) 2017-02-23 00:06:12 -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-scala.el (Browse further)