profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/nbfalcon/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.

emacs-lsp/dap-mode 857

Emacs :heart: Debug Adapter Protocol

js-emacs/js2-refactor.el 370

A JavaScript refactoring library for emacs

nbfalcon/flycheck-projectile 8

Project-wide flycheck errors

nbfalcon/better-jumper 0

A configurable jump list implementation for Emacs

nbfalcon/C-hello-world 0

A small C program that prints "Hello World!" to stdout, for use in bug reports.

nbfalcon/cargo 0

The Rust package manager

nbfalcon/ccls 0

C/C++/ObjC language server supporting cross references, hierarchies, completion and semantic highlighting

nbfalcon/company-box 0

A company front-end with icons

nbfalcon/company-mode 0

Modular in-buffer completion framework for Emacs

nbfalcon/dap-mode 0

Emacs :heart: Debug Adapter Protocol

PR opened emacs-lsp/lsp-mode

Add Roblox Lua Language Server

Hey all :wave:

This PR bases the Roblox Lua LS on the lua-language-server from sumneko, which is already a client of lsp-mode. The Roblox LS source code is actually based on the work from sumneko, as well. The Roblox Lua LS can be found here: https://github.com/NightrainsRbx/RobloxLsp

This PR adds the lsp-mode Roblox Lua client as well as the client configuration in docs/lsp-clients.json. I ran this code in my local emacs installation and didn't find any issues.

Thanks!

+75 -0

0 comment

2 changed files

pr created time in 3 hours

issue commentemacs-lsp/lsp-mode

LSP response processing broken when responses span messages

The filter function seems to be called re-entrantly in my real scenario. It looks like it gets called recursively via lsp--parser-on-message somehow, but I'm not sure. The recursive call appears to come from the textDocument/didOpen for the file I am looking at.

muirdm

comment created time in 3 hours

issue commentemacs-lsp/lsp-mode

LSP response processing broken when responses span messages

There are issues and pr about tramp and line endings, maybe your issue is related

muirdm

comment created time in 4 hours

issue commentemacs-lsp/lsp-mode

LSP response processing broken when responses span messages

Yes, I still don't quite seem to know what is wrong. Let me look some more.

muirdm

comment created time in 4 hours

issue closedemacs-lsp/lsp-mode

Tramp stderr still messes things up.

Thank you for the bug report

  • [X] I am using the latest version of lsp-mode related packages.
  • [X] I checked FAQ and Troubleshooting sections
  • [ ] You may also try reproduce the issue using clean environment using the following command
emacs -q -l lsp-start-plain.el

where lsp-start-plain.el can be downloaded here. Alternatively, it will be great if you can reproduce the issue using lsp-docker which provides the minimal configurations for lsp-mode and ships with most of the language servers.

Bug description

Emacs 28.0.50

I still see stderr from the server (hack) coming back and messing things up. I think only stderr produced right at the beginning of server startup makes it through, but not sure.

I changed the tramp command to what eglot does:

(append '("stty" "raw" ">" "/dev/null" ";") final-command)))

and it seems to resolve it (but stderr doesn't go anywhere).

Steps to reproduce

Connect to LSP server over tramp that produces stderr right at startup.

Expected behavior

Stderr isn't seen by lsp-mode.

Which Language Server did you use?

hack

OS

MacOS

Error callstack

No response

Anything else?

No response

closed time in 4 hours

muirdm

issue commentemacs-lsp/lsp-mode

Tramp stderr still messes things up.

This doesn't seem to make sense. I'm not sure I know what is going on. Closing for now.

muirdm

comment created time in 4 hours

issue commentemacs-lsp/lsp-mode

LSP response processing broken when responses span messages

I tested it out and it seems like parsing function can handle that input: (lsp--create-process-message is defined lsp-io-test.el)

(let* ((fn (lsp--create-process-message)))
  (--map (lsp--read-json it)
         (nconc (funcall fn "Content-Length: 834\r\n\r\n{\"jsonrpc\":\"2.0\",\"id\":47,\"result\":{\"capabilities\":{\"textDocumentSync\":{\"openClose\":true,\"change\":2,\"willSave\":false,\"willSaveWaitUntil\":true,\"save\":{\"includeText\":false}},\"hoverProvider\":true,\"completionProvider\":{\"resolveProvider\":true,\"triggerCharacters\":[\"$\",\">\",\"\\\\\",\":\",\"<\",\"[\",\"'\",\"\\\"\",\"{\",\"#\"]},\"signatureHelpProvider\":{\"triggerCharacters\":[\"(\",\",\"]},\"definitionProvider\":true,\"typeDefinitionProvider\":true,\"referencesProvider\":true,\"documentHighlightProvider\":true,\"documentSymbolProvider\":true,\"workspaceSymbolProvider\":true,\"codeActionProvider\":false,\"documentFormattingProvider\":true,\"documentRangeFormattingProvider\":true,\"documentOnTypeFormattingProvider\":{\"firstTriggerCharacter\":\";\",\"moreTriggerCharacter\":[\"}\"]},\"renameProvider\":true,\"implementationProvider\":true,\"typeCoverageProvider\":true,\"rageProvider\":true}}}\r\n\r\nContent-Length: 279\r\n\r\n{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"client/registerCapability\",\"params\":{\"registrations\":[{\"id\":\"did-change-watched-files\",\"method\":\"workspace/did")
                (funcall fn "ChangeWatchedFiles\",\"registerOptions\":{\"watchers\":[{\"globPattern\":\"**/*.{php,phpt,hack,hackpartial,hck,hh,hhi,xhp}\",\"kind\":7}]}}]}}\r\n\r\nContent-Length: 118\r\n\r\n{\"jsonrpc\":\"2.0\",\"method\":\"telemetry/event\",\"params\":{\"type\":4,\"message\":\"Version in hhconfig and switch=5.12.0\"}}\r\n\r\n"))))
muirdm

comment created time in 5 hours

issue openedemacs-lsp/lsp-mode

Tramp stderr still messes things up.

Thank you for the bug report

  • [X] I am using the latest version of lsp-mode related packages.
  • [X] I checked FAQ and Troubleshooting sections
  • [ ] You may also try reproduce the issue using clean environment using the following command
emacs -q -l lsp-start-plain.el

where lsp-start-plain.el can be downloaded here. Alternatively, it will be great if you can reproduce the issue using lsp-docker which provides the minimal configurations for lsp-mode and ships with most of the language servers.

Bug description

Emacs 28.0.50

I still see stderr from the server (hack) coming back and messing things up. I think only stderr produced right at the beginning of server startup makes it through, but not sure.

I changed the tramp command to what eglot does:

(append '("stty" "raw" ">" "/dev/null" ";") final-command)))

and it seems to resolve it (but stderr doesn't go anywhere).

Steps to reproduce

Connect to LSP server over tramp that produces stderr right at startup.

Expected behavior

Stderr isn't seen by lsp-mode.

Which Language Server did you use?

hack

OS

MacOS

Error callstack

No response

Anything else?

No response

created time in 7 hours

issue commentemacs-lsp/lsp-mode

LSP response processing broken when responses span messages

ok, thanks, I will handle it.

muirdm

comment created time in 7 hours

issue commentemacs-lsp/lsp-mode

LSP response processing broken when responses span messages

I just switched jobs and don't have permission yet.

muirdm

comment created time in 7 hours

issue commentemacs-lsp/lsp-mode

LSP response processing broken when responses span messages

The proposed fix makes sense. Willing to make a PR? (FTR we have a test suite for io handling, it will be nice if you add test for that scenario).

muirdm

comment created time in 7 hours

issue openedemacs-lsp/lsp-mode

LSP resposne processing broken when responses span messages

Thank you for the bug report

  • [X] I am using the latest version of lsp-mode related packages.
  • [X] I checked FAQ and Troubleshooting sections
  • [ ] You may also try reproduce the issue using clean environment using the following command
emacs -q -l lsp-start-plain.el

where lsp-start-plain.el can be downloaded here. Alternatively, it will be great if you can reproduce the issue using lsp-docker which provides the minimal configurations for lsp-mode and ships with most of the language servers.

Bug description

Handling in lsp--create-filter-function is not correct for certain cases where response messages are split across messages. The underlying issue is leftovers is set to nil when a message is parsed and chunk is overwritten as well (so nothing contains the leftovers).

To fix I think we can just get rid of leftovers variable and just not set chunk to nil in the call to lsp--parser-on-message.

Steps to reproduce

I experience this using the hack server over tramp (which probably affects the message size somehow). Here are the two messages that broke the parseing:

Content-Length: 834

{"jsonrpc":"2.0","id":47,"result":{"capabilities":{"textDocumentSync":{"openClose":true,"change":2,"willSave":false,"willSaveWaitUntil":true,"save":{"includeText":false}},"hoverProvider":true,"completionProvider":{"resolveProvider":true,"triggerCharacters":["$",">","\\",":","<","[","'","\"","{","#"]},"signatureHelpProvider":{"triggerCharacters":["(",","]},"definitionProvider":true,"typeDefinitionProvider":true,"referencesProvider":true,"documentHighlightProvider":true,"documentSymbolProvider":true,"workspaceSymbolProvider":true,"codeActionProvider":false,"documentFormattingProvider":true,"documentRangeFormattingProvider":true,"documentOnTypeFormattingProvider":{"firstTriggerCharacter":";","moreTriggerCharacter":["}"]},"renameProvider":true,"implementationProvider":true,"typeCoverageProvider":true,"rageProvider":true}}}

Content-Length: 279

{"jsonrpc":"2.0","id":1,"method":"client/registerCapability","params":{"registrations":[{"id":"did-change-watched-files","method":"workspace/did
ChangeWatchedFiles","registerOptions":{"watchers":[{"globPattern":"**/*.{php,phpt,hack,hackpartial,hck,hh,hhi,xhp}","kind":7}]}}]}}

Content-Length: 118

{"jsonrpc":"2.0","method":"telemetry/event","params":{"type":4,"message":"Version in hhconfig and switch=5.12.0"}}

Expected behavior

Messages are parsed and processed properly.

Which Language Server did you use?

hack

OS

MacOS

Error callstack

No response

Anything else?

No response

created time in 8 hours

issue commentemacs-lsp/lsp-mode

LSP :: Sending to process failed with the following error: Process pyright-remote not running

I get stuck like this sometimes as well. Maybe lsp-shutdown needs to clear out all metadata even if the server process isn't currently running?

yes, cleanup is buggy.

tshu-w

comment created time in 8 hours

issue commentemacs-lsp/lsp-mode

LSP :: Sending to process failed with the following error: Process pyright-remote not running

I get stuck like this sometimes as well. Maybe lsp-shutdown needs to clear out all metadata even if the server process isn't currently running?

tshu-w

comment created time in 8 hours

issue commentemacs-lsp/lsp-mode

Problems with Clangd

I'm facing the same issue with emacs flatpak installation, I think this is because a flatpak is somehow containerized. Installing emacs using snap solved this for me.

GiulioCocconi

comment created time in 12 hours

PR opened emacs-lsp/lsp-mode

Add lsp-load/save-vscode-workspace
  • related to gitpod effort, we need standartized way to load workspace folders
+29 -0

0 comment

1 changed file

pr created time in 15 hours

issue commentemacs-lsp/lsp-mode

make lsp sessions store in plain text & utils about session management

I am about to post a PR that will allow loading/saving vscode workspaces which are json files(here is sample one https://github.com/gitpod-io/gitpod/blob/main/gitpod-ws.code-workspace )

PS. Does the name v1 hints at a new session management system? How's the progress so far?

When we change lsp-session object we also change the file name because it breaks the deserialization.

dwuggh

comment created time in 16 hours

issue openedemacs-lsp/lsp-mode

make lsp sessions store in plain text & utils about session management

Is your feature related or already mentioned on the wishlist?

The session system, I think.

Currently, the lsp sessions are stored in .lsp-session-v1 if I'm not guessing wrong. However, the session objects are directly stored in an elisp hash table instead of a plain text file. Plus, I couldn't find any session management utility such as deleting/modifying sessions other than edit the file by hand. I wonder perhaps we should store sessions in a plain text file, or adding some simple elisp function such as lsp-session-delete?

PS. Does the name v1 hints at a new session management system? How's the progress so far?

created time in 17 hours

issue commentemacs-lsp/lsp-mode

LSP :: Sending to process failed with the following error: Process pyright-remote not running

I already had this with clojure-lsp, but is not easy to repro, any thoughts @yyoncho?

tshu-w

comment created time in a day

issue commentemacs-lsp/lsp-mode

A var for disabling auto-install of language servers

check https://emacs-lsp.github.io/lsp-mode/page/faq/#how-do-i-disable-automatic-installation-for-particular-language-server

mineo

comment created time in a day

issue openedemacs-lsp/lsp-mode

A var for disabling auto-install of language servers

Is your feature related or already mentioned on the wishlist? -- No.

Let me preface this feature request with the note that I'm using spacemacs, which - unless otherwise configured - tries to enable lsp-mode in all all enabled modes that support it. I can understand if this feature request is deemed not appropriate for lsp-mode :)

Being able to install language servers automatically is a super great feature!

I find myself in a position where I'm working on different machines with different binaries installed, so some of the language can't be installed automatically on some machines: for example bash-lsp fails to install with Unable to install bash-language-server vianpm' because it is not presentinlsp-logwhenever I open a shell script. I'm OK with using lsp-mode only for the main codebase I'm working on via clangd, but I'm fine with not having lsp-mode support me in shell scripts. Then again, on other machines, I do not have clangd available and that's OK, too. This whole situation is made more annoying by the call tolsp--completing-read` in the auto-install code: https://github.com/emacs-lsp/lsp-mode/blob/b294e745e254c410a1fa352b97f748d1d5bd2bf2/lsp-mode.el#L8186-L8195, popping up a question about which language server to install automatically.

Ideally, lsp (the function) would check whether a var (lsp-auto-install-lsp-servers?) is t before trying to install language servers. I see the following benefit to this over other solutions, like removing lsp-mode from *-mode-hook (or whatever spacemacs uses to automatically run lsp-mode): for users with a config that's used on different machines - some of which have language servers (or pre-requisites to auto-install them) pre-installed, some don't - there's no need for perform any checks (does clangd exist? does npm exist?) before adding lsp-mode to *-mode-hook. Instead, they can simply enable lsp-mode, knowing that it falls back to unobtrusively doing nothing if the machine is not set up for the language servers.

created time in a day

issue commentemacs-lsp/lsp-mode

completion does not work on a language server with completion on characters

@yyoncho I guess I found the offender: https://github.com/glynnforrest/salt-mode/blob/c46b24e7fdf4a46df5507dc9c533bbc0064a46fa/salt-mode.el#L50

dcermak

comment created time in a day

issue commentemacs-lsp/lsp-mode

completion does not work on a language server with completion on characters

@dcermak yes. My guess is that salt-mode (or yaml-mode) is doing stuff that breaks company-mode.

dcermak

comment created time in a day

issue commentemacs-lsp/lsp-mode

completion does not work on a language server with completion on characters

@yyoncho Indeed! Thanks a lot!

So I guess this is then not a bug in lsp-mode, right?

dcermak

comment created time in 2 days

issue commentemacs-lsp/lsp-mode

completion does not work on a language server with completion on characters

can you upload everything from the server startup?

Certainly: https://fpaste.me/w5XdPoChiL

That output has been created in emacs -Q using lsp-start-plain.el and installing salt-mode into there. I have opened the file salt-states/salt/master.sls, removed everything but the first dictionary in that yaml file so that it looks like this:

saltmaster.packages:
  pkg.installed:
    - pkgs:
      - salt-master

Then I removed the installed and tried to trigger completions manually via completion-at-point (the completion requests would otherwise not show up in the log). Unfortunately that does not send a trigger character and thereby my language server does not respond to these (I could change this, so that it is more lenient in this regard). However, for some reason lsp-mode does not send any completion requests by itself.

dcermak

comment created time in 2 days

issue openedemacs-lsp/dap-mode

LaTeX support of dap-mode.

Does the dap-mode has LaTeX support, i.e., used by the settings similar to the following:

(use-package dap-mode)
(use-package dap-latex)

Regards, HY

created time in 3 days

issue commentemacs-lsp/lsp-mode

JSON-Parsing error that prompts the workspace to be restarted endlessly

I would do best, but it may take quite a time

tmythicator

comment created time in 3 days

issue commentemacs-lsp/lsp-mode

JSON-Parsing error that prompts the workspace to be restarted endlessly

Steps to reproduce

Cannot provide with sample file/project because of sensitive information

You can try to narrow down a reproducer without sensitive information?

tmythicator

comment created time in 3 days

issue openedemacs-lsp/lsp-mode

JSON-Parsing error that prompts the workspace to be restarted endlessly

Thank you for the bug report

  • [X] I am using the latest version of lsp-mode related packages.
  • [X] I checked FAQ and Troubleshooting sections
  • [ ] You may also try reproduce the issue using clean environment using the following command
emacs -q -l lsp-start-plain.el

where lsp-start-plain.el can be downloaded here. Alternatively, it will be great if you can reproduce the issue using lsp-docker which provides the minimal configurations for lsp-mode and ships with most of the language servers.

Bug description

I am currently working on a large codebase, where on most modules/directories the LSP-client starts without problem and offers functionalities. So I am using multiple workspaces.

But there is one workspace that throws an error almost immediately after successful initialization. After that it prompts for the workspace restart, but this doesn't improve the situation.

Steps to reproduce

Cannot provide with sample file/project because of sensitive information

Expected behavior

Should work without problems

Which Language Server did you use?

lsp-typescript

OS

MacOS

Error callstack

Error in *Messages*:
`LSP :: Error from the Language Server: Request textDocument/documentSymbol failed with message: navtree timeout (Internal Error) [5 times]`

Contents of stderr-buffer:
`Process ts-ls stderr<1> finished
(node:74068) UnhandledPromiseRejectionWarning: Error: geterr timeout
    at Timeout.<anonymous> (/usr/local/lib/node_modules/typescript-language-server/lib/utils.js:25:25)
    at listOnTimeout (internal/timers.js:554:17)
    at processTimers (internal/timers.js:497:7)
(node:74068) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:74068) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
undefined:1
<--- Last few GCs --->
^

SyntaxError: Unexpected token < in JSON at position 0
    at JSON.parse (<anonymous>)
    at TspClient.processMessage (/usr/local/lib/node_modules/typescript-language-server/lib/tsp-client.js:108:30)
    at Interface.<anonymous> (/usr/local/lib/node_modules/typescript-language-server/lib/tsp-client.js:57:56)
    at Interface.emit (events.js:314:20)
    at Interface._onLine (readline.js:329:10)
    at Interface._normalWrite (readline.js:474:12)
    at Socket.ondata (readline.js:186:10)
    at Socket.emit (events.js:314:20)
    at addChunk (_stream_readable.js:297:12)
    at readableAddChunk (_stream_readable.js:272:9)

Process ts-ls stderr<1> finished`

Anything else?

VSCode handles it without problems

created time in 3 days