Comments (16)
Fixed by 0e52868
from vscode-ide-purescript.
Should I also add symbols view/navigation? Likewise for Atom.
from vscode-ide-purescript.
Can do; for Atom there is a thing called symbols-view but only supports ctags (you can generate these with psc-docs but it isn't great). I guess it's just a filterable list of all document symbols though with goto-definition on selection? Rather than navigating based on a symbol in source you're looking at already.
from vscode-ide-purescript.
Yeah I suppose DocumentSymbolProvider
is like a glossary compared to DefinitionProvider
. It additionally provides visual context to differentiate between e.g. a type
and data
constructor of the same name. In theory it should also enable navigation by module name in addition to file from Go to Fileβ¦
. Go to Definition
should also eventually work for terms in function scope unlike Go to Symbol
.
from vscode-ide-purescript.
Regarding renaming we'd need the positions of all references across the project CC @kritzcreek.
from vscode-ide-purescript.
For renaming you really would want to operate on the AST (even for top level identifiers - need to be aware of shadowing). Similarly "find references" is useful but has the same issue, if it is to be any better than string search.
from vscode-ide-purescript.
We only need the AST to find them not rename right?
from vscode-ide-purescript.
WFM π
- Is it possible to link module names that way?
- Neither args nor type params work but I assume that's because of
psc-ide
?
from vscode-ide-purescript.
Should work for anything that you can get a tooltip for - top level defs only.
Module names is interesting - I suppose psc-ide already has this information but I don't think we can query it. Not sure how useful this is. @kritzcreek any thoughts on file location lookup of modules?
from vscode-ide-purescript.
@nwolverson One thing that should be easy enough is to add the file location to the list command. I wouldn't want to mix module and type names again... But the question then is how does the editor figure out if it's looking at a module name or a type name.
from vscode-ide-purescript.
Not sure how useful this is.
@nwolverson From an end user perspective? Not as useful as, but related to, Go to a symbol
by module name. Currently I have to disable filtering bower_components
from search and guess filename by convention. That would make the biggest impact on my workflow besides Go to definition
in general. I forgot to add FFI names to my wish list if the JS language service supports it (at least open the right file).
how does the editor figure out if it's looking at a module name or a type name.
@kritzcreek Code expects the API to know how to handle any sort of thing (value, type, parameter, module etc.). Likewise Go to symbol
can assign different icons based on it. I suppose the client could merge results from multiple psc-ide
calls?
from vscode-ide-purescript.
I think module names can only appear in imports anyway? Otherwise just as part of a qualified identifier. So for contextual stuff, I think that is enough - obviously could be an explicit 'go to module' command.
Not exactly hard to find module names correspondence with file names but may as well avoid parsing the files repeatedly - I think the list command suggestion sounds ideal.
from vscode-ide-purescript.
I think module names can only appear in imports anyway?
True. Is the reasoning behind not including function arguments or type parameters locality? Might be useful for shadowing but we get warnings for that anyway.
obviously could be an explicit 'go to module' command.
True but I'd rather see it in symbols. I suspect it could be used for autocompletion as well?
PS: your Code plugin is the π£!
from vscode-ide-purescript.
psc-ide only has any information for identifiers present in externs files, which generally means top level definitions which are exported (but non-exported tl definitions should present for the current file after rebuild).
"I'd rather see it in symbols" - I don't know what that means. Listed in "go to symbol" ?
Autocompletion - module names are autocompleted in imports in the Atom plugin
from vscode-ide-purescript.
Listed in "go to symbol" ?
Affirmative.
Autocompletion - module names are autocompleted in imports in the Atom plugin
Is there a ticket already here?
from vscode-ide-purescript.
raised
#25 symbol provider
#26 module autocomplete
from vscode-ide-purescript.
Related Issues (20)
- GoTODefination having issue HOT 2
- 'PureScript: Clean' resulted in an error (command 'purescript.clean' not found) HOT 3
- Web extension support HOT 2
- Enable for vscode.dev? HOT 1
- Wrong purs path taken when using nvm HOT 3
- How to disable overlay of export options HOT 1
- Pursuit search doesn't work HOT 2
- formatters fails on windows HOT 5
- New option for syntax highlighting of MissingTypeDeclaration HOT 1
- Is there a way to remove "export (export only this) | export everything else" HOT 3
- Go to symbol in workspace does nothing in 0.26 HOT 3
- Is there any way to see var types? HOT 1
- Warnings can stick around even when no longer relevant.
- Keep formatting/indentation in problems pane error messages HOT 1
- Ctrl + click on a type named Field always opens Data.Field
- Reloading VSCode window sometimes results in exceptions
- Autocomplete for qualified values not optimal HOT 4
- Question:Can it support data constructor autocomplete? HOT 2
- Outline shows only exported values/types HOT 1
- Formatter local installation HOT 3
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-ide-purescript.