• @perviouslyiner@lemmy.world
    link
    fedilink
    123
    edit-2
    9 months ago

    “oh, the line you are typing is incomplete and therefore the whole file is invalid which means there is nothing to suggest for autocomplete”

  • unalivejoy
    link
    fedilink
    English
    449 months ago

    Meanwhile rust when you try to use a variable before saving.

  • @humorlessrepost@lemmy.world
    link
    fedilink
    English
    16
    edit-2
    9 months ago

    I don’t understand?

    Notepad likes my html, and filezilla doesn’t complain when I upload it to production. It even passes validation for 4.01 transitional

  • @Venator@lemmy.nz
    link
    fedilink
    16
    edit-2
    9 months ago

    Sometimes I think it could be easier to just use the variable before its declared and then let the IDE auto fix create it, but I never remember to try it 😂

  • @baseless_discourse@mander.xyz
    link
    fedilink
    16
    edit-2
    9 months ago

    writing code normally

    ocaml-lsp: syntax error

    ocaml-lsp: syntax error

    ocaml-lsp: syntax error

    ocaml-lsp: syntax error

    ocaml-lsp: okay, probably okay

    ocaml-lsp: syntax error

    ocaml-lsp: syntax error

    ocaml-lsp: wait, the entire function is wrong

    me: WHAT, where

    ocaml-lsp: like the entire thing, 20 lines of it,

    a -> (b -> c -> d) -> [200 other types] ->g
    

    doesn’t match

    a -> (b -> c/2 -> d) -> [200 other types] ->g
    

    , c doesn’t match c/2.

  • myxi
    link
    fedilink
    English
    9
    edit-2
    9 months ago

    I turn off LSPs during my train of thoughts. I don’t want all red and yellow underline bullshit to disrupt my thoughts. Like, calm the fuck down. I WILL write the correct code eventually; just give me some fucking time.

    Well, I use Neovim, so turning off the LSPs or restarting them is sufficiently simple.

    When I work on a new project, or on a new feature, I temporarily turn off the LSP, and rely on the compiler to figure out where the code errors. Plain white text gives me the freedom to write whatever the fuck I want without any disruption. Of course, I eventually turn on the LSP again to fix the little issues.

    • @baseless_discourse@mander.xyz
      link
      fedilink
      3
      edit-2
      9 months ago

      Many languages allow type hole like _ to indicate to the compiler/lsp that this is an expression you will fill in later.

      So that lsp don’t put a squiggle on the entire program, only the type hole

      • myxi
        link
        fedilink
        English
        2
        edit-2
        9 months ago

        I also leave out little syntax errors and only only focus on the rough idea during my train of thoughts. And the variables, aren’t really supposed to be implied as private or unused – I do eventually meaningfully use them. If I have to prefix all my variables with a underscore to avoid the LSP, I might instead just disable the LSP. When I eventually turn the LSP back on, it tells me the actually unused variables and imports that I can now get rid of.

        Because of the LSP, I used to write maybe three hundred lines of code per hour, but now I probably average at least five hundred or more.

  • @RonSijm@programming.dev
    link
    fedilink
    89 months ago

    On the other hand, when my IDE doesn’t tell me:

    Build Server: “BUILD FAILED! SonarQube says that Roslyn says that you’re not using one of your variables!”

    Yea okay calm down, and why are you snitching now, Roslyn? Should have told me directly 🙃

  • Aliyss
    link
    fedilink
    49 months ago

    Just type faster than the LSP needs to check. I don’t see an issue.

    • @Luvon@beehaw.org
      link
      fedilink
      109 months ago

      It’s more language dependent than ide. Go for instance makes unused variables a compiler error (I believe) which means ides mark it as red immediately.

      Ts/js can have eslint rules against unused variables but they will still usually compile or just run directly anyway.

      Java doesnt error but can be set to warn you on them.

      Abap doesn’t care and won’t tell you.

      Your mileage will vary.

    • qaz
      link
      fedilink
      29 months ago

      I’ve seen it with multiple IDE’s