forked from confused-Techie/pulsar-documentation-eleventy
-
-
Notifications
You must be signed in to change notification settings - Fork 2
Miscellaneous fixes, part 6 (plus an “IDE features” section) #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
75109ca
Fix broken link
savetheclocktower ff121da
Casing
savetheclocktower 251c19d
Add an “IDE features” section
savetheclocktower bd6c8d7
Fix hovercard display weirdness
savetheclocktower f537eb0
Base style changes:
savetheclocktower 83e7c70
Tighter spacing within alerts
savetheclocktower 04bce59
Enable TOCs on summary pages
savetheclocktower dae8178
Some tweaks to templates:
savetheclocktower 78e9ae4
Don't try to fetch JSON for a hovercard more than once
savetheclocktower 77bb4e7
Update list of IDE packages
savetheclocktower 6a0bf16
Add reference to `pulsar-ide-json`.
savetheclocktower 6524ed8
Fix typos
savetheclocktower 876a9a1
Add reference to `pulsar-ide-html`
savetheclocktower ae6a1ef
Add a couple more language servers to the list…
savetheclocktower e0f724c
Address feedback…
savetheclocktower File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| --- | ||
| title: "IDE features provided by builtin packages" | ||
| layout: doc.ejs | ||
| --- | ||
|
|
||
| So far we’ve told you how to install an IDE package for a given language — the “brain” that knows how to deliver lots of IDE features. But brains can’t do anything by themselves. What does the brain talk to? How do you use the features themselves? | ||
|
|
||
| For various reasons, some of these IDE features are provided by built-in packages, and others require additional community packages to enable. First, let’s talk about the built-in packages, and the features you get for free without further installation. | ||
|
|
||
| ::: tip | ||
|
|
||
| If any of the features described below do not work, revisit the README file for your IDE package and ensure you’ve configured it properly. See the [troubleshooting](../troubleshooting) page for more information. | ||
|
|
||
| ::: | ||
|
|
||
| ## Autocompletion | ||
|
|
||
| We’ve learned that autocompletion is provided by the {autocomplete-plus} package. IDE packages use the `autocomplete.provider` [service](/infrastructure/interacting-with-other-packages-via-services/) to supply contextual autocompletion suggestions to the user. | ||
|
|
||
| Even where other autocompletion providers exist — like the built-in {autocomplete-html} and {autocomplete-css} — the autocompletion you get from an IDE package is likely to be more contextually aware and more useful. | ||
|
|
||
| <figure> | ||
| <div> | ||
| <img src="/img/atom/autocomplete-plus-language-server.png" alt="autocompletion via pulsar-ide-typescript"> | ||
| </div> | ||
| <figcaption><p>In this example, <code>pulsar-ide-typescript</code> is able to offer us a contextual completion for this parameter type.</p></figcaption> | ||
| </figure> | ||
|
|
||
|
|
||
| ## Symbol resolution | ||
|
|
||
| We briefly mentioned how you can [navigate through files by symbol](/using-pulsar/movement/#navigating-by-symbols). Those symbols could be a number of things depending on the kind of file: method names, CSS selectors, or Markdown heading names, to list a few examples. | ||
|
|
||
| This functionality is supplied by the built-in {symbols-view} package. Even without an IDE package, Pulsar allows you to navigate by symbols in most languages for the current file. (Since the file is already open, this isn’t hard!) But `symbols-view` also has the ability to jump to a symbol in a _different_ file, but not automatically; it needs something to tell it what those symbols are. A language server can do that very thing! | ||
|
|
||
| :::tip | ||
|
|
||
| Old IDE packages written for Atom don’t have this feature! You’ll need an IDE provider package _specifically written for Pulsar_. Pick one [from the list](../getting-started) or ensure it starts with `pulsar-ide-` instead of just `ide-`. | ||
|
|
||
| ::: | ||
|
|
||
| An IDE package is especially useful for symbol resolution and lets you search for symbols on a _project-wide_ basis. For instance, the **Symbols View: Toggle Project Symbols** command (<kbd class="platform-mac">Cmd+Shift+R</kbd><kbd class="platform-linux platform-win">Ctrl+Shift+R</kbd> by default) will open a palette into which you can type the name of a symbol that may exist anywhere in your project. | ||
|
|
||
| <figure> | ||
| <video controls> | ||
| <source src="/img/atom/symbols-view-toggle-project-symbols.webm" type="video/webm"> | ||
| <a href=/img/atom/symbols-view-toggle-project-symbols.webm">Download as WebM</a> | ||
| </video> | ||
| <figcaption><p><strong>Symbols View: Toggle Project Symbols</strong> lets you search for symbols across the entire project.</p></figcaption> | ||
| </figure> | ||
|
|
||
|
|
||
| Even more powerful is the ability to jump to where a symbol is defined. Place your cursor inside the name of a function, then invoke the **Symbols View: Go To Declaration** command (<kbd class="platform-mac">Cmd+Alt+Down</kbd><kbd class="platform-linux platform-win">Ctrl+Alt+Shift+Down</kbd> by default) to jump to the declaration of that function! | ||
|
|
||
| But this isn’t a one-way trip: when you’re done consulting the function definition, you can invoke **Symbols View: Return From Declaration** (<kbd class="platform-mac">Cmd+Alt+Up</kbd><kbd class="platform-linux platform-win">Ctrl+Alt+Shift+Up</kbd> by default) to return to your previous location. | ||
|
|
||
| <figure> | ||
| <video controls> | ||
| <source src="/img/atom/symbols-view-go-to-declaration.webm" type="video/webm"> | ||
| <a href=/img/atom/symbols-view-go-to-declaration.webm">Download as WebM</a> | ||
| </video> | ||
| <figcaption><p><strong>Symbols View: Go To Declaration</strong> lets you jump to the place where a symbol is defined, no matter where it is in your project. <strong>Symbols View: Return From Declaration</strong> will return you to your original position.</p></figcaption> | ||
| </figure> | ||
|
|
||
| The list of locations you jump _from_ functions like a web browser’s history stack. For instance, you can jump three definitions deep, then invoke **Symbols View: Return From Declaration** three times in a row to go back to where you started. | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While not needed, maybe a link or comment here about how someone could jump between symbols in the current file in Pulsar, without any installation. Just like above you mention what autocomplete providers are already built in.
EDIT:
Unless these concerns are fully addressed by the commands listed below, which it seems they may be. So if that's the case feel free to ignore this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They can do that in the Ctrl-R sense (bringing up the palette) but not in the sense that I mean it in this paragraph (moving the cursor to a symbol and then jumping to the symbol with the same name in the current document). That isn't implemented (though it could be!).