Commit graph

58 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
Henrik Lissner
ad7c0876a5 refactor!(csharp): remove omnisharp-emacs
BREAKING CHANGE: omnisharp-emacs is being removed as it is no longer
maintained and was deprecated (see
https://github.com/OmniSharp/omnisharp-emacs) in favor of the
omnisharp-roslyn LSP clients. It also no longer works in Emacs
28 (throwing an error when starting the server). Users need only enable
:lang (csharp +lsp) and install omnisharp-roslyn instead.

The :lang csharp module's README.org was intentionally left un-updated
because of a larger, upcoming documentation update which will reflect
these changes.

Close #5036
2021-09-15 01:22:33 +02:00
Henrik Lissner
06392a723f refactor: rename orig-fn arg in advice to fn
A minor tweak to our naming conventions for the first argument of an
:around advice.
2021-08-04 01:53:12 -04:00
Ralf Beckmann
70967a1702 Add evil-keybindings for various sharper commands 2021-06-01 17:40:40 +02:00
Henrik Lissner
9d12761c39
Reformat for consistency and s/:bind/:general 2021-02-25 12:30:13 -05:00
Sam Precious
645fde6b42 merge conflict 2021-02-21 20:36:28 +00:00
Henrik Lissner
e2784d6f4f lang/csharp: add sln-mode 2021-02-21 14:44:59 -05:00
Sam Precious
d5d241b36e Merge remote-tracking branch 'upstream/develop' into develop
merge upsteam
2021-02-04 18:51:12 +00:00
M. Yas. Davoodeh
784acaa64d
Set ligratures for csharp-mode 2020-12-12 22:10:24 +03:30
Sam Precious
41b1a7800a Updated ordering 2020-12-08 19:39:32 +00:00
Sam Precious
871096533f Added in Dotnet interface with sharper through module flag 2020-12-08 19:21:54 +00:00
Henrik Lissner
4d77314df2
Fix string fontification in csharp-mode
A temporary fix for josteink/csharp-mode#151
2020-06-20 03:02:05 -04:00
Albert Fong
d419e88540
Update hook to match rename from refactoring 2020-04-16 22:34:09 -07:00
Henrik Lissner
169f9a6121
General, minor refactor & reformatting 2020-03-27 01:25:30 -04:00
Henrik Lissner
cb67aa00b9
Refactor lang/csharp 2020-02-25 20:03:14 -05:00
Henrik Lissner
4dc3f0956a
lang/csharp: move omnisharp-cache-directory to doom-etc-dir
It deceptively uses this directory to store the omnisharp server, rather
than just its cache files. Servers belong in doom-etc-dir.
2019-11-16 20:55:53 -05:00
Henrik Lissner
051bceb0a8
Refactor localleader keybinds #1270
Introduces a select few of the localleader keybind standards proposed in
issue #1270, corrects a few typos and introduces more localleader
keybinds in general.

Co-authored-by: yuhan0 <>
2019-10-04 22:04:47 -04:00
Henrik Lissner
d51cc0879d
lang/csharp: add +lsp flag & support 2019-09-26 14:26:47 -04:00
Henrik Lissner
2d365619cd
General refactor & cleanup, across the board 2019-09-13 22:00:34 -04:00
oreodave
ff1b210469 lang/csharp: Fix code issues keybind does not work
<localleader>ri : omnisharp-fix-code-issue-at-point
This function does not exist, thus the keybind doesn't work
2019-08-23 23:29:46 +01:00
oreodave
c35c704de8 lang/csharp: updated bindings
Specifically:
- `t-a` -> `t-s` ("unit test all" is now "unit test buffer")
- `t-r` -> `t-l` ("unit test ?" is now "unit test last")
- `t-s` is the same (couldn't think of anything better)
2019-08-23 23:28:50 +01:00
oreodave
da0f3afb12 lang/csharp: -Remove old bindings
These bindings use older omnisharp functions that no longer work. Should
be replaced by new omnisharp functions
2019-08-23 23:28:28 +01:00
Henrik Lissner
a3e262c7ac
💥 Refactor add-hook! macro & change arg order
This update may potentially break your usage of add-hook! if you pass
the :local or :append properties to it. This is how they used to work:

  (add-hook! :append 'some-mode-hook #'do-something)

Thsoe properties must now follow the hooks, e.g.

  (add-hook! 'some-mode-hook :append #'do-something)

Other changes:
- Various add-hook calls have been renamed to add-hook! because I
  incorrectly assumed `defun` always returned its definition's symbol,
  when in fact, its return value is "undefined" (so sayeth the
  documentation). This should fix #1597.
- This update adds the ability to add multiple functions to hooks
  without a list:

    (add-hook! 'some-mode-hook
               #'do-something
               #'do-something-else)

- The indentation logic has been changed so that consecutive function
  symbols at indented at the same level as the first argument, but forms
  are indent like a defun.

    (add-hook! 'some-mode-hook
               #'do-something
               #'do-something-else)

    (add-hook! 'some-mode-hook
      (message "Hello"))
2019-07-26 20:17:29 +02: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
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
883fcffc97
lang/csharp: use omnisharp cleanup hook 2019-02-18 17:42:21 -05:00
Henrik Lissner
e01781a3d9
lang/csharp: minor refactor
Ensure csharp-mode specific config can work without omnisharp.
2019-02-18 17:40:57 -05:00
Henrik Lissner
ed0a4bc5ca
lang/csharp: add electric/autopairing behavior 2019-02-18 15:38:26 -05:00
Henrik Lissner
937252af4e
lang/csharp: add +unity flag
And group shader-mode & +csharp-unity-mode under it.
2018-12-29 00:09:17 -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
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
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
c0251aacee
Replace :lookup with set-lookup-handlers! autodef
And update all internal references.
2018-06-15 17:27:48 +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
947fe345c3
Minor, general refactor
In some contexts, map-put is superior to add-to-list.
2018-05-29 15:34:13 +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
d67496e007
Fix vestigial references to warn! macro
This macro was removed some time ago (and moved to doom-doctor). Where
necessary, these warnings have been moved to that module's doctor.el
file.
2018-04-28 03:49:46 -04:00
Henrik Lissner
135ebd925f
Enable global-eldoc-mode; less work for me! 2018-04-23 00:34:03 -04:00
Henrik Lissner
8af46aad5a
lang/csharp: fix omnisharp detection when server is installed locally #422 2018-02-18 21:31:16 -05:00
Henrik Lissner
6c4e048c23
General refactor & cleanup 2018-02-14 07:47:22 -05:00
Henrik Lissner
bac73ec938
Replace warn => warn! 2018-02-14 07:46:38 -05:00
Henrik Lissner
fb5fbf69dc
lang/csharp: clean up omnisharp server when killing last csharp-mode buffer 2018-02-04 05:32:43 -05:00
Henrik Lissner
6650dcf6e7
lang/csharp: fix omnisharp server integration 2018-02-04 05:05:40 -05:00
Henrik Lissner
6b164a6103
lang/csharp: adapt to :lookup 2018-01-19 04:17:19 -05:00