Commit graph

33 commits

Author SHA1 Message Date
Henrik Lissner
16a17ad970
tools/lsp: start lsp server unconditionally
Part 2 of f6d3ee588, in order for server restarting to work, since
shutting down the server doesn't turn off lsp-mode.
2019-11-02 15:50:26 -04:00
Henrik Lissner
f6d3ee5889
tools/lsp: fix lsp-workspace-restart 2019-11-02 15:50:02 -04:00
Henrik Lissner
196c716c74
tools/lsp: fix void-function (setf lsp--workspace-shutdown-action)) #1965 2019-10-29 11:36:46 -04:00
Henrik Lissner
1030f66c24
Revert 438caf276 (#1943)
This was fixed upstream in emacs-lsp/lsp-mode#1135
2019-10-24 13:31:08 -04:00
Henrik Lissner
438caf276b
tools/lsp: fix lsp in js scripts w/ no file ext #1943 2019-10-23 18:29:30 -04:00
Henrik Lissner
b7e2c7509f
tools/lsp: deregister workspace shutdown action
...if workspace buffers are present during the deferred shutdown.
2019-10-23 00:51:09 -04:00
Henrik Lissner
cba645be00
tools/lsp: defer server shutdown
To give theu ser a chance to open othe rproject files before the server
is auto-killed.
2019-10-21 19:01:57 -04:00
Henrik Lissner
c034bfdc87
tools/lsp: minor refactor & comment variables
Also moves lsp-fsharp-server-install-dir to
~/.emacs.d/.local/etc/lsp-fsharp
2019-10-21 19:01:06 -04:00
Henrik Lissner
8dfc4b3033
tools/lsp: prompt for project if one can't be guessed #1928
And don't recognize $HOME as a valid project root.
2019-10-21 18:29:11 -04:00
Henrik Lissner
0cca037448
tools/lsp: log project root when starting lsp #1928 2019-10-21 18:28:45 -04:00
Henrik Lissner
2d2413d293
tools/lsp: defer lsp init until buffer is visible 2019-10-18 21:10:56 -04:00
Henrik Lissner
9026efcf5a
tools/lsp: enable flymake or flycheck, not both
And only enable flycheck if it is installed.
2019-09-30 12:50:26 -04:00
Henrik Lissner
364cec34e0
tools/lsp: revert lsp-eldoc-enable-hover to default (t) 2019-09-26 14:26:48 -04:00
Henrik Lissner
67b15041bc
Add +lsp-company-backend variable
To allow users to customize what backend(s) to use for lsp-mode buffers.
2019-08-15 14:59:53 -04:00
Henrik Lissner
05f7565a57
Merge pull request #1597 from ar1a/straight-lsp-company
tools/lsp: cache company candidates automagically
2019-07-26 20:33:28 +02:00
Aria Edmonds
21f1a50436
tools/lsp: cache company candidates automatically 2019-07-27 04:28:22 +10: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
8aa7772e4e
tools/lsp: prevent ~/.emacs.d/lsp-cache creation #1587
And prefix lsp folders with "lsp-".
2019-07-23 16:51:57 +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
951a414ca4
tools/lsp: disable unneeded sideline/eldoc features 2019-07-22 02:37:47 +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
149b2617b0
💥 revise hook/var fns naming convention (2/2)
This is second of three big naming convention changes. In this commit,
we change the naming conventions for hook functions and variable
functions:

1. Replace the bar | to indicate a hook function with a -h suffix, e.g.

     doom|init-ui -> doom-init-ui-h
     doom|run-local-var-hooks -> doom-run-local-var-hooks-h

2. And add a -fn suffix for functions meant to be set on variables,
   e.g.

     (setq magit-display-buffer-function #'+magit-display-buffer-fn)

See ccf327f8 for the reasoning behind these changes.
2019-07-22 02:30:38 +02:00
Henrik Lissner
5cabbef6ef
tools/lsp: fix company-lsp not being enabled
Due to a load-order issue between company and lsp.
2019-07-05 23:42:06 +02:00
Henrik Lissner
2f268e80bb
tools/lsp: fall back to lsp-find-{definitions,references} #1521
When lsp-ui-mode is disabled.
2019-06-29 01:36:24 +02:00
Henrik Lissner
a9ca62070c
tools/lsp: reduce lsp's self-configuring eagerness
The original `lsp' initializes too much, too quickly. Things like
flycheck, company, and yasnippet. Doom's modules already handle these
just fine, so we advice it to leave it to us to handle. I intentionally
avoid disabling lsp-auto-configure because doing so is much more
destructive than I'd like.

This update prevents lsp-ui-mode from being auto-enabled on lsp-mode.
You can now (remove-hook 'lsp-mode-hook #'lsp-ui-mode) to disable
lsp-ui.

This update also adds these two hooks:

+ +lsp|init-company (on `lsp-mode-hook')
+ +lsp|init-ui-flycheck-or-flymake (on `lsp-ui-mode-hook')
2019-06-29 01:36:24 +02:00
Henrik Lissner
87899124ab
Disable lsp-ui-doc by default
In the interest of performance and simplicity. lsp-ui-doc is redundant
with +lookup/documentation and eldoc (which are less imposing than
lsp-ui-doc's childframe).

Also sets lsp-groovy-server-install-dir.
2019-05-17 02:05:33 -04:00
Henrik Lissner
96ca04d488
Set lsp lookup handlers rather than remapping them
Now that the lookup module has beter deferred handler support.
2019-05-03 20:03:32 -04:00
Henrik Lissner
d811f58ed2
+lookup/documentation -> lsp-describe-thing-at-point
More reliable in lsp-mode
2019-04-19 20:55:44 -04:00
Henrik Lissner
e7e1383b08
tools/lsp: replace lookup commands w/ lsp-ui-peek 2019-04-16 20:56:52 -04:00
Henrik Lissner
94a57f695e
Fix LSP restart prompt when killing Emacs 2019-02-28 13:50:59 -05:00
Henrik Lissner
5ee4f03ce7
tools/lsp: no prompt for project root & autokill servers 2019-02-26 22:57:34 -05:00
Henrik Lissner
5e24c93d4c
tools/lsp: move lsp-session-file to doom-etc-dir 2019-02-24 13:52:02 -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