-
-
Notifications
You must be signed in to change notification settings - Fork 390
Document call hierarchy plugin #2067
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,23 @@ | ||||||||||||||||||||||||||||||||||||
# Call hierarchy plugin for the [Haskell Language Server](https://github.com/haskell/haskell-language-server#readme) | ||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
The call hierarchy plugin can review the code to determine where functions are called and how they relate to other functions. | ||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
This plugin is useful when debugging and refactoring code because it allows you to see how different parts of the code are related. And it is more conducive for users to quickly understand their macro architecture in the face of strange code. | ||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
## Demo | ||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
 | ||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
 | ||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
## Prerequisite | ||||||||||||||||||||||||||||||||||||
None. You can experience the whole feature without any setting. | ||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
## Configuration | ||||||||||||||||||||||||||||||||||||
Enable default. You can disable it in the setting file (JSON format) whenever you like. | ||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jneira I am not sure how to point out where the setting is precisely, maybe we can link it to a unified place(lots of plugins need this) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. mmm you can the discover the hls server configuration with 2 commands:
So the configuration for hlint, for example, would be: {
"haskell.plugin.hlint.diagnosticsOn": false
} If you put a file with that content in a ... but i tried both commands with last version and it does not mention any hls-call-hierarchy plugin.. 🤔 I think something has to be done to "register" the plugin and include its config in the output, but dont remember right now (i think @berberman did that nice addition to the cli) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Ah, that's because haskell-language-server/hls-plugin-api/src/Ide/Plugin/ConfigUtils.hs Lines 87 to 95 in 047ffc3
and haskell-language-server/hls-plugin-api/src/Ide/Plugin/ConfigUtils.hs Lines 117 to 124 in 047ffc3
need update for new call hierarchy handlers There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @July541 could you have the chance of update those definitions, to complete the hierarchy plugin integration? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure, I'll do it. |
||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
## Acknowledgments | ||||||||||||||||||||||||||||||||||||
Supported by | ||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
* [Google Summer of Code](https://summerofcode.withgoogle.com/) | ||||||||||||||||||||||||||||||||||||
* Warm and timely help from mentors [@jneira](https://github.com/jneira) and [@pepeiborra](https://github.com/pepeiborra) | ||||||||||||||||||||||||||||||||||||
July541 marked this conversation as resolved.
Show resolved
Hide resolved
|
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.
I think it's helpful to mention somewhere in this doc that this works only on definitions, not type signatures. I recently saw some people said that this feature doesn't work, but it was actually that they used this on type signatures.
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.
out of curiosity anyone knows if other langs work differently?