• myxi@feddit.nl
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    6 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.

  • Venator@lemmy.nz
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    6 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
    arrow-up
    0
    ·
    edit-2
    6 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.

  • perviouslyiner@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    6 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”

    • dvlsg@lemmy.world
      link
      fedilink
      English
      arrow-up
      0
      ·
      6 months ago

      Just enable format-on-save. That way gofmt can helpfully delete that variable you just added that you were for sure never going to use. You’re welcome!

  • smeg@feddit.uk
    link
    fedilink
    English
    arrow-up
    0
    ·
    6 months ago

    Compiler: you’re skating on thin ice there you fucking maverick