Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Phillip Tola
    @zag1024
    Oh the completion worked in unnamed buffers @tylerl0706 , just not the formatting
    Tyler James Leonhardt
    @TylerLeonhardt
    what language server protocol client are you using?
    Phillip Tola
    @zag1024
    LanguageClient-Neovim
    Tyler James Leonhardt
    @TylerLeonhardt
    yeah same
    hmm
    let me update and I’ll see if I get the same thing
    Staffan Gustafsson
    @powercode
    @tylerl0706 LanguageService.cs:637
    Tyler James Leonhardt
    @TylerLeonhardt
    Hi
    Staffan Gustafsson
    @powercode
    I thing the last x should be a y
    Tyler James Leonhardt
    @TylerLeonhardt
    Would you mind linking for me? I'm not at a computer at the moment
    funcDefnAst = foundAsts.Cast<FunctionDefinitionAst>().Aggregate((x, y) =>
    
                    {
    
                        if (x.Extent.StartOffset >= y.Extent.StartOffset && x.Extent.EndOffset <= x.Extent.EndOffset)
    
                        {
    
                            return x;
    
                        }
    Tyler James Leonhardt
    @TylerLeonhardt
    Honestly, I'm not incredibly knowledgeable abuut this part of the code... @SeeminglyScience might be more help.
    But I'm reading
    Staffan Gustafsson
    @powercode
    It is asymmetric
    And the later part of the condition is always true
    Tyler James Leonhardt
    @TylerLeonhardt
    Ok I'm about to drive so I will look in a bit
    Staffan Gustafsson
    @powercode
    Cool. Just ran past it and thought I should let you know. To lazy to open an issue :)
    Tyler James Leonhardt
    @TylerLeonhardt
    Lol no worries!
    Patrick Meinecke
    @SeeminglyScience
    hah yeah definitely a mistake
    Staffan Gustafsson
    @powercode
    I've started implementing AstVisitors in a dynamically loaded assembly to be able to find classes and methods - just so we don't to double work here.
    Tyler James Leonhardt
    @TylerLeonhardt
    Awesome
    Staffan Gustafsson
    @powercode
    So, once I'm done coding and want to test it in the editor, how do I go about it?
    Staffan Gustafsson
    @powercode
    image.png
    Teaser...
    Staffan Gustafsson
    @powercode

    Ok, how should we handle references where there is a possible match, but where the type is unknown?

    class A {
         [string] $Name
    }
    
    
    $a.Name

    Should $a.Name show up as a reference to A::Name? It may be correct, and it may not...

    Since we have dynamic scoping, these situation arises.
    Patrick Meinecke
    @SeeminglyScience
    I'm a bit hesitant about even putting in reference support until we have a way to infer AST type. We won't be able to catch most references without that :/
    Staffan Gustafsson
    @powercode
    A dynamic language will always have this issue, with or without type inference
    Patrick Meinecke
    @SeeminglyScience
    Fair point. My preference would be to only report references we're reasonably confident about. Mainly because when we add support for symbol renaming, it would likely use references. I'd rather catch real references less often than find more incorrect references. Obviously there will always be both, but the former feels like the lesser evil
    Btw sorry for the delay is responding, I don't check gitter as often as I should :/
    Tyler James Leonhardt
    @TylerLeonhardt
    @powercode That’s amazing!
    also sorry for the delay on gitter
    maybe I can get Joel to bridge these to slack/discord
    Staffan Gustafsson
    @powercode
    I'm working to get type inference working. Should improve the quality of the results
    Tyler James Leonhardt
    @TylerLeonhardt
    this is going to make a LOT of people very happy :)
    Patrick Meinecke
    @SeeminglyScience
    Type inference opens so many options for cool stuff :D that'd be amazing. Btw ty for all your inference PR's to PowerShell, I live in pwsh as much as possible just for those sweet sweet tab completion improvements
    Tyler James Leonhardt
    @TylerLeonhardt
    So awesome!
    @powercode is a living legend 😎
    Staffan Gustafsson
    @powercode
    Ok, my performance week is coming to an end, so I'm back at looking at the classes stuff. Sorry for the delay.
    Staffan Gustafsson
    @powercode

    I've run into an issue at work - We have a custom distribution of pwsh, including a set of modules that is deployed as a "package", a custom profile etc.

    It is delivered via click once, and ends up at new paths on every update.

    What would the best way be to add custom hooks to the getAvailablePowerShellExes?
    Could we have a setting pointing to a JS file containing a hook that would be executed if it existed? I'm on deep water in javascript land...

    Staffan Gustafsson
    @powercode

    In my case, I would like to do the javascript equivalent of

    gci $env:localappdata\apps\2.0\*\*\dice*\pwsh.exe | sort LastWriteTime -Descending | select -first 1 | % fullname

    And have the result added with a custom name to the available powershells.

    Staffan Gustafsson
    @powercode
    It would be cool to also have the currently selected powershell as the executable that is used when launching tasks.
    Tyler James Leonhardt
    @TylerLeonhardt
    @powercode did you get your answer? We talked about it on Slack a while ago
    Also sorry for the delay. Ive been traveling a lot and also Gitter stopped sending me notifications
    Staffan Gustafsson
    @powercode
    Yeah, I've joined the slack channel. I've also been a bit bogged down by other stuff.
    Tyler James Leonhardt
    @TylerLeonhardt
    Great 👍 I'm also in the Discord chat too
    And no worries. Times can get quite crazy!
    Иван Сердюк
    @oceanfish81_twitter
    Hi there
    did anyone tested Powershell's support, for LSP, on https://theia-ide.org/ ?