Comments (3)
Hi @hmijail ,
I wonder why the extension would start the Dafny LS, simply by opening the Bookmarks View, unless the Dafny LS has a hook in the onDidOpenTextDocument
event. To check that, use the Bookmarks: List from All Files
command instead, and look if the same issue occurs.
What does these two commands execute in the extension? Under the hood, the same thing. Both will loop through all files that contains some bookmark (based on the .vscode/bookmarks.json
or in the workspaceState
Memento), open them using openTextDocument
API, and read the content of the lines where a bookmark has been toggled. No change is made in your files, just reads, in order to display the line content. Based on the documentation, the openTextDocument
API knows if a file has been previously opened, and won't do it twice.
I don't know Dafny, and I'm not sure why its LS would suffer from memory leak because another extension opened a file and read content from some of its lines. Maybe it doesn't expect "sharing" a file and ended up opening again.
Hope this helps
from vscode-bookmarks.
Indeed, Bookmarks: List from All Files
causes the same issue.
Looking at the Output tab, Extension Host channel, looks like that command causes extensions to activate because a bookmark in a file with language X will trigger an event of the type onLanguage:X
. So this is activating e.g. the ms-dotnettools.csharp and golang.go extensions too, because I have bookmarks on C# and Go files too.
Interestingly, there's also an event for Java, but doesn't seem to have much effect because its extension/LS does a lot of eager-start startup configuration stuff anyway.
(I'm commenting this just FYI. I guess those onLanguage events are produced by the openTextDocument
API you mentioned, not directly by Bookmarks)
from vscode-bookmarks.
Yes, that onDidOpenTextDocument
event, and consequently on language:xyz
is triggered whenever a file is opened.
Coincidentally, this post was raised recently in the VS Code Discussions forum (microsoft/vscode-discussions#1192), but had no comment/answer yet.
from vscode-bookmarks.
Related Issues (20)
- [BUG] - Bookmarks desync when performing git commands HOT 2
- [BUG] - Slowing down VSC
- [BUG] - Bookmarks don't appear for global VSCode settings.json in the bookmarks explorer. HOT 2
- [BUG] - Problems with bookmarking in a network file HOT 4
- Bookmark explorer is slow with large-ish file HOT 1
- [FEATURE] - Can bookmark support sorting and grouping? HOT 3
- [FEATURE] - To manage/expose bookmarks on the myWorkspace.code-workspace file HOT 1
- [FEATURE] - Please add a new feature such as grouping bookmarks into groups HOT 1
- [FEATURE] - Hide location in Quick Pick menu HOT 2
- [FEATURE] - New setting to define "focus behavior" while navigating in the Side Bar HOT 1
- [FEATURE] - Display label content HOT 2
- [FEATURE] - File-Level Bookmarks (Last Location is Preserved)
- [FEATURE] - Replace 'hardcoded' icons with product icons HOT 2
- [FEATURE] - Add jumpToPreviousInCurrentEditor / jumpToNextInCurrentEditor HOT 2
- [FEATURE] - Group bookmark with custom folder HOT 2
- [BUG] - Disappearing Bookmark Icon in VSCode on Mac
- [FEATURE] - I would love to have a similar extension to this in Azure Data Studio.
- i can not find the search function.
- [FEATURE] - Bookmarks not tied to workspace
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-bookmarks.