Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Dec 20 2020 13:23
    Anton-Latukha closed #88
  • Dec 20 2020 13:23
    Anton-Latukha commented #88
  • Dec 20 2020 11:45

    github-actions[bot] on gh-pages

    deploy: d2d346c397c507b60dd3cd4… (compare)

  • Dec 20 2020 11:43

    yyoncho on master

    Pass default folder to remove a… (compare)

  • Dec 20 2020 11:22

    github-actions[bot] on gh-pages

    deploy: 3e33e4b5bf34ad09d20afeb… (compare)

  • Dec 20 2020 11:21

    yyoncho on master

    Make lsp-headerline-arrow public (compare)

  • Dec 20 2020 08:44
    sunlin7 commented #2424
  • Dec 20 2020 07:55
    yyoncho synchronize #2411
  • Dec 20 2020 07:54

    yyoncho on master

    [lsp-lua]: Fix connection comma… (compare)

  • Dec 20 2020 07:54
    yyoncho closed #2424
  • Dec 20 2020 07:54
    yyoncho commented #2424
  • Dec 20 2020 07:52
    yyoncho commented #2425
  • Dec 20 2020 07:52

    yyoncho on master

    Fix lsp-vhdl executable PATH se… (compare)

  • Dec 20 2020 07:52
    yyoncho closed #2425
  • Dec 20 2020 04:52
    raxod502 commented #2425
  • Dec 20 2020 04:36
    github-actions[bot] labeled #2425
  • Dec 20 2020 04:36
    raxod502 opened #2425
  • Dec 20 2020 04:34
  • Dec 20 2020 03:48
    jcs090218 labeled #2423
  • Dec 20 2020 03:46
    github-actions[bot] labeled #2424
Jimmy Yuen Ho Wong
@wyuenho

As I know, Emacs has async supported already, but only one thread. So any computation intensive operations will effectively hang Emacs

You get that in JS too. But then again, skeeto has confused JS promises and Python promises. In Python, everything is basically a generator, but JS promises and generators are completely separate. You can implement promises with generators but elisp generators are useless.

kiennq
@kiennq
I'm not sure why elisp generators are useless if you can implement promises with generators.
5 replies
gagbo
@gagbo:matrix.org
[m]
Is there documentation about the keys in lsp-diagnostics table ? I've started an integration with consult and I'm having a little difficulty finding out :(
Especially as I don't know dash/don't plan to add it as a dependency, piecing out the format is a little hard. Is it just a copy/paste from LSP spec ?
as in, json-parse-string from the spec
kiennq
@kiennq
If you're requiring lsp-mode, dash already comes as dependency so just using its functions probably make it cleaner to write code.
If you're not going to use dash anyway, the (lsp-diagnostics) is returning a hash map of filename -> list of diagnostics in file.
The diagnostic format can be a plist of hash map, you can use lsp-get to get each member in it.
Ivan Yonchovski
@yyoncho
@gagbo:matrix.org as @kiennq said, the access to the fields should happen via lsp-protocol.el generated methods because you don't wont to depend on the underlying type
diagnostics are file -> List of Diagnostic where diagnostic is defined by the spec.
gagbo
@gagbo:matrix.org
[m]
I see, I'll use lsp-get then
brotzeit
@brotzeit
regarding emacs-lsp/lsp-mode#2636 is there already a matrix server ? I don't know anything about it, but maybe this could also be an option for emacs-ng
gitter is still annoying...
flux
@flux:matrix.org
[m]
you can always use the Matrix interface, if gitter feels lacking :). though the bridge AFAIK is still missing some functionality, such as private messages.
this room can be found by the name #emacs-lsp_lsp-mode:gitter.im in Matrix
brotzeit
@brotzeit
thanks for the info, but I can't find the room using the webclient
brotzeit
@brotzeit:matrix.org
[m]
ah ok it works :P
gagbo
@gagbo:matrix.org
[m]
I'm trying to make a selector for workspace symbols, and I think I don't get some subtleness of lsp-workspaces. The (relevant) snippet is here https://paste.centos.org/view/48a6aa87 and even if I M-x this function from a Rust buffer with a running rust-analyzer, ws is nil. How can I query all workspaces ?
Ivan Yonchovski
@yyoncho
@gagbo:matrix.org (-uniq (-flatten (ht-values (lsp-session-folder->servers (lsp-session)))))
this gives you all workspaces
and then with-lsp-workspaces
gagbo
@gagbo:matrix.org
[m]
so (lsp-workspaces) fail because I'm in the wrong buffer ? Technically M-x puts me in the mini buffer
Ivan Yonchovski
@yyoncho
yes
gagbo
@gagbo:matrix.org
[m]
Oh I se, lsp-workspaces work only in a with-lsp-workspace(s) macro ?
Ivan Yonchovski
@yyoncho
no, lsp-workspaces is function that runs in the context of a buffer
but if you want to pass the workspace from somewhere else you use with-lsp-workspaces
because the workspaces are buffer local
gagbo
@gagbo:matrix.org
[m]
ok, I guess I'll have to tweak my function if I need to pass only "the current workspace" then
Ivan Yonchovski
@yyoncho
yes, capture ws in the original buffer
and pass them to the section that is executed in the minibuffer context
gagbo
@gagbo:matrix.org
[m]
👍️
Ivan Yonchovski
@yyoncho
the api is not very clear because the whole workspaces thing was added later in the project
and there already was a lot of code using lsp-mode api
thus single->multi workspaces refactoring ended up being hacky
gagbo
@gagbo:matrix.org
[m]
Storing everything in a buffer-local variable seems weird at first, but I'm also not a best lisp hacker so maybe it's the best solution anyway I don't know
Evgeny Kurnevsky
@kurnevsky
Hi. Do I get it right that here lsp-package-ensure should check system rust-analyzer first: https://github.com/emacs-lsp/lsp-mode/blob/21869b6f6b08e07cb271ae23abae3d9f5d5e434f/clients/lsp-rust.el#L639-L644 ?
And if it's not installed then download it. Or why it's defined in this order?
I have installed rust-analyzer but it's downloaded anyway.
Also it seems :set-executable? t doesn't work there...
Ivan Yonchovski
@yyoncho
@kurnevsky make sense
Evgeny Kurnevsky
@kurnevsky
You mean to swap them?
Ivan Yonchovski
@yyoncho
yes
but it shouldn't matter
I mean, we should try all options before trying to download it
Evgeny Kurnevsky
@kurnevsky
Also it downloads rust-analyzer every time I execute lsp-package-ensure
But started to looking at it because I couldn't figure out how to make downloaded file executable :)
And lsp-package-ensure just downloads it, but doesn't set executable flag there...
At least for me.
Or I miss something :)
Ivan Yonchovski
@yyoncho
The last time I checked it was working fine
you may open issue report
Evgeny Kurnevsky
@kurnevsky