Commit graph

44 commits

Author SHA1 Message Date
Henrik Lissner
005831bfcc
refactor(lsp): let lsp-mode load lsp client packages
Most of these lsp packages are already in `lsp-client-packages`, which
lsp-mode will eagerly load the first time `lsp-mode` is activated, so we
don't need to do it ourselves, except in cases where the package isn't
in `lsp-client-packages` (like lsp-julia).
2024-09-09 17:24:45 -04:00
Henrik Lissner
3391cb76bb
fix(julia): eglot-jl: use included server
Fix: #7953
2024-07-18 19:15:58 -04:00
Henrik Lissner
881defae2d
fix(julia): duplicate popup rules
Having the same rule in two separate package configs means users must be
aware of both to modify either, which is avoidable complexity. i.e.

  (after! (:or julia-repl julia-snail)
    (set-popup-rule! "^\\*julia" ...))
2024-04-05 11:51:21 -04:00
Henrik Lissner
73f19acb66
fix(julia): revise julia-snail settings
- julia-snail-multimedia-enable is buffer-local, so setq-default is
  needed.
- julia-snail-popup-display-eval-results is already :command upstream.
- julia-snail will automatically calculate a (reasonable) value for
  julia-snail-popup-display-face in the absence of an explicit setting.
- julia-snail-popup-display-face was filled with references to
  doom-themes symbols that aren't global. It's any wonder they worked
  before this. Besidse, it's best we not couple this module with one
  specific theme (or theme pack in this case).

Close: #7625
Co-authored-by: ngharrison <ngharrison@users.noreply.github.com>
2024-03-20 00:16:29 -04:00
Edmund Miller
76c1330aa3
nit(julia): Format keybindings 2023-06-02 17:31:26 -05:00
Edmund Miller
1b3bc7b7fb
fix(julia): featurep! => modulep! 2023-06-02 17:31:26 -05:00
Edmund Miller
de434f5c29
fix(julia): use cider result face for snail popup 2023-06-02 17:31:25 -05:00
Edmund Miller
71c210050f
nit(julia): add note about send-region/buffer not working quite right 2023-06-02 17:31:25 -05:00
Edmund Miller
d10bb6dc42
feat(julia): add snail keybindings to snail repl mode 2023-06-02 17:31:25 -05:00
Edmund Miller
ed4d12df05
feat(julia): use julia-snail as repl when +snail 2023-06-02 17:31:25 -05:00
Edmund Miller
f2c75dea9a
feat(julia): add snail repl mode keybindings 2023-06-02 17:31:25 -05:00
Edmund Miller
6b9ce02433
fix(julia): add check for vterm for snail 2023-06-02 17:31:25 -05:00
Edmund Miller
5ab4527b18
fix(julia): update eglot environment discovery 2023-06-02 17:31:24 -05:00
Edmund Miller
6074fc3aa8
feat(julia): add julia-snail 2023-06-02 17:31:24 -05:00
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
Henrik Lissner
acae9f9acb
bump: :tools lsp
emacs-lsp/lsp-mode@6b6afc00de -> emacs-lsp/lsp-mode@3fa645c039
joaotavora/eglot@e835996e16 -> joaotavora/eglot@bd970be047

- There are multiple issues in the lsp-mode
  repo (emacs-lsp/lsp-mode#2722), lsp-julia repo (gdkrmr/lsp-julia#23
  and gdkrmr/lsp-julia#35), and the LanguageServer.jl
  repo (julia-vscode/LanguageServer.jl#844) about crashes of the Julia
  LSP with lsp-mode due to errors caused by the folding capabilities
  announced by the client. One can work around these issues by enabling
  folding (see gdkrmr/lsp-julia#23) but that is only a hack and does not
  fix the underlying issue. The problem is caused by a violation of the
  LSP specs in lsp-mode which was fixed in emacs-lsp/lsp-mode#3593. The
  PR updates lsp-mode to the latest commit on the master branch which
  contains this fix (and some other unrelated fixes, CI passes
  successfully again), and hence the workaround for lsp-julia can be
  removed.

Ref: emacs-lsp/lsp-mode#3593
Ref: emacs-lsp/lsp-mode#2722
Ref: gdkrmr/lsp-julia#35
Ref: gdkrmr/lsp-julia#23
Ref: julia-vscode/LanguageServer.jl#844
Close: #6516
Co-authored-by: devmotion <devmotion@users.noreply.github.com>
2022-07-05 01:35:06 +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
Kiran Shila
1f27a68ae6 tweak(julia): update lsp environment to recent LTS 2022-01-27 03:36:04 +01:00
Henrik Lissner
b98b6fdeed lang/julia: auto-detect default environment 2021-05-10 21:56:02 -04:00
Henrik Lissner
6584aa866f lang/julia: lsp-enable-folding = 1
To address non-Jedi/lsp-julia#35
2021-05-10 21:21:08 -04:00
Han
ba0f791b05
lang/julia: improve lsp support (#4012)
* lang/julia: include lsp-julia w/o language server

Use nonrecursive clone to get lsp-julia without bundled
LanguageServer.jl (plus dependencies) and include instructions in the
README on how to install the language server (bundled or otherwise).

* lang/julia: add checks for julia +lsp in doctor

Add two checks, both only for when the +lsp feature is enabled:
- Check if (:tools lsp) is selected
- Check if LanguageServer.jl is installed

* lang/julia: indicate SymbolServer.jl as dependency

It is itself a dependency of LanguageServer.jl, but it's necessary to
add it separately in order to do `using SymbolServer`.

* tools/lsp: add julia language server to list

* lang/julia: add eglot support using eglot-jl

Forcing eglot-jl to not install its own LanguageServer.jl is a bit of a
hack though.

* lang/julia: make timeout increase buffer-local

Suggestion by @benneti to use `setq-local` instead of `setq` to prevent
a timeout increase in non-Julia eglot buffers.

* Fix issues

Co-authored-by: Henrik Lissner <henrik@lissner.net>
2021-03-01 22:25:35 -05:00
Dan LaManna
08354f3316 Fix various broken links 2021-01-17 15:08:21 -05:00
Henrik Lissner
f6f90c9791
Fix lsp packages failing to load
As of emacs-lsp/lsp-mode@b9b0f34 there is no more lsp-clients, so load
these lsp packages after lsp-mode instead.
2020-08-20 03:54:44 -04:00
Ronan Arraes Jardim Chagas
e9d70c861a Fix highlighting of operator <: 2020-08-18 21:26:41 -03:00
Ronan Arraes Jardim Chagas
739ca0fd42 Improve highlighting of Julia operators 2020-08-18 21:00:33 -03:00
Henrik Lissner
eec3968802
Defer julia REPL 2020-04-08 17:43:42 -04:00
Henrik Lissner
cd156fcc0a
Refactor julia module 2020-04-08 17:34:53 -04:00
AlexLewandowski
69f5578319 rm newline 2020-04-08 14:56:31 -06:00
AlexLewandowski
b2368527d3 Julia:added LSP and repl buffername uses workspace 2020-04-08 14:34:04 -06:00
Henrik Lissner
4761a7635a
lang/julia: add julia-repl package
Mentioned in #1836
2019-10-04 22:14:05 -04:00
Henrik Lissner
2d365619cd
General refactor & cleanup, across the board 2019-09-13 22:00:34 -04:00
Henrik Lissner
0edeafadcf
lang/julia: operator highlights for ess-julia-mode
And adjust REPL handler to return the repl buffer.
2019-02-15 19:43:13 -05: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
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
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
09efa24ab8 lang/julia: stea--borrow matlab.el's fontification of math operators 2017-04-26 23:29:31 -04: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-julia.el (Browse further)