Giter VIP home page Giter VIP logo

Comments (16)

nwolverson avatar nwolverson commented on July 29, 2024 1

Fixed by 0e52868

from vscode-ide-purescript.

texastoland avatar texastoland commented on July 29, 2024

Should I also add symbols view/navigation? Likewise for Atom.

from vscode-ide-purescript.

nwolverson avatar nwolverson commented on July 29, 2024

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.

texastoland avatar texastoland commented on July 29, 2024

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.

texastoland avatar texastoland commented on July 29, 2024

Regarding renaming we'd need the positions of all references across the project CC @kritzcreek.

from vscode-ide-purescript.

nwolverson avatar nwolverson commented on July 29, 2024

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.

texastoland avatar texastoland commented on July 29, 2024

We only need the AST to find them not rename right?

from vscode-ide-purescript.

texastoland avatar texastoland commented on July 29, 2024

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.

nwolverson avatar nwolverson commented on July 29, 2024

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.

kritzcreek avatar kritzcreek commented on July 29, 2024

@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.

texastoland avatar texastoland commented on July 29, 2024

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.

nwolverson avatar nwolverson commented on July 29, 2024

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.

texastoland avatar texastoland commented on July 29, 2024

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.

nwolverson avatar nwolverson commented on July 29, 2024

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.

texastoland avatar texastoland commented on July 29, 2024

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.

nwolverson avatar nwolverson commented on July 29, 2024

raised

#25 symbol provider
#26 module autocomplete

from vscode-ide-purescript.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.