Skip to content

The SymbolProvider line info gets out of whack when editing the file in Calva #1178

Closed
@PEZ

Description

@PEZ

If I edit the file, adding/removing lines, then the Outline links to the wrong locations of the file.

This gets extra problematic with the new Sticky Scroll feature of VS Code, where the symbol provider is used to inform what should stick while scrolling. Here's an issue where this is clarified by the VS Code team:

To Reproduce

  1. Open a Clojure file in Calva
  2. Confirm that the Outline navigation works
  3. Add a line
  4. The Outline now navigates to lines offset by -1 for symbols after where you added the line.

What's a bit extra strange here is that if I undo the change of adding a line, the Outline now links to incorrect line offset by +1.

Expected behavior

The outline should navigate to the new line locations of the symbols is lists as the file is edited.

Log - client <-> server
Sure, I can add this, but in a bit of a hurry here. Please let me know if it would help with a log.
Log - clojure-lsp
Same.

User details (please complete the following information):

  • OS: [e.g. ArchLinux, MacOS, Windows 10]
  • Editor [e.g. emacs, nvim, VSCode (Calva)]
  • Version: (post the result of clojure-lsp --version)

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingeditorRelated to clojure-lsp on a text editor

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions