nwolverson / purescript-language-server

MIT License
183 stars 41 forks source link

Formatting sources with purs-tidy #194

Closed wclr closed 1 year ago

wclr commented 1 year ago

As purs-tidy kind of standard de-facto and to make LS codebase formatting more standardized and clean this PR formats all purs sources with the following settings:

{
  "importSort": "ide",
  "importWrap": "source",
  "indent": 2,
  "operatorsFile": null,
  "ribbon": 5,
  "typeArrowPlacement": "last",
  "unicode": "never",
  "width": 80
}

This PR also includes a couple of small cleanup changes in logging, removing excessive output on the server start (protocol settings, PATH env value) because they just clutter the output.

wclr commented 1 year ago

We probably should also add .git-blame-ignore-revs file with such formatting commits.

nwolverson commented 1 year ago

Formatting is fine.

Please remove the PATH display change, it has often been the case that issues in the language server boil down to the incorrect PATH being used to launch vscode, and I don't think knowing the actual purs that was invoked is enough to determine this - unless that information is available elsewhere?

wclr commented 1 year ago

Ok I've brought it back, It is not so annoying if to turn off the wrapping in the OUTPUT. 😄

Just for information, to turn off wrapping:

  "[Log]": {
    "editor.wordWrap": "off" // "off", "bounded", "wordWrapColumn"
  },
wclr commented 1 year ago

I have relaxed the settings to width 100 and ribbon 0.9, I think it is viable. Other problems with auto formatting (additional breaks introduced etc) will be corrected while editing the related code afterwards.