Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update grammar with better JSX syntax highlighting #8

Closed
wants to merge 1 commit into from
Closed

Update grammar with better JSX syntax highlighting #8

wants to merge 1 commit into from

Conversation

believer
Copy link

@believer believer commented Sep 4, 2020

I have extracted code from the language-reason grammar to get better support for JSX in ReScript. It's not identical to the old syntax highlighting and it's got some issues (see below), but it's better than nothing.

Before change

Screenshot 2020-09-04 at 16 24 00

After change

New syntax (.res) Old syntax for comparison (.re)
Screenshot 2020-09-04 at 16 20 01 Screenshot 2020-09-04 at 16 20 09
 

Issues I've noticed

Highlighting of the new template string syntax isn't working correctly.

Screenshot 2020-09-04 at 16 28 43

@believer believer changed the title Update grammar with JSX Update grammar with better JSX syntax highlighting Sep 8, 2020
@Faliszek Faliszek mentioned this pull request Dec 10, 2020
@chenglou
Copy link
Member

chenglou commented Jan 21, 2021

Hey, this got stale. This is on us; sorry for the slow reply. We've decided not to go forward with this approach. Here's why:

First, Intro on Highlighting

Here's how code is colored in VSCode:

  • We make a grammar using VSCode's grammar format, which is a bit obsolete (in terms of tech, not in terms of popularity).
  • The grammar runs though the text, assigning scope names to chunks of letters. The scope names are sometime overly generic, e.g. Foo should technically be a "ReScript module" but sometime the scopes we get to choose from is like, "storage" or "namespace" or "object class" or whatever.
  • The user's theme opinionatedly decide to assign colors to specific scope names agreed upon by some ad-hoc decisions. So a theme might decide to highlight "namespace" but not "storage".

Our Priorities

  • Correctness of highlighting. The ReScript syntax inherit some legacy syntax and is one of the more complex ones. Most highlighting overoptimize for colorfulness instead of proper coloring of important tokens. In our case, for example, we've taken great care of distinguishing the color between a variant and a module/functor:
    Screen Shot 2021-01-20 at 11 51 03 PM
    For us, this is the important property of highlighting we'd like to preserve. Over more colors. Highlighting these correctly will greatly help newcomers (despite the fact that newcomers usually don't complain about this confusion; but that's just a bias in the kind of feedback one would publicly post).
  • Simpler assignment of scopes.
    • We've decided not to overload a token with all sorts of scope names just so that probabilistically speaking, some random theme somewhere might decide to color them in some way. This is a wild goose chase; someone can always say that a certain theme X doesn't highlight the scopes we gave. Plus, this goes directly against our previous goal of correctness of highlighting.
    • (You know this, but I'm speaking to the audience here) This also means your first screenshot's problem isn't that we aren't assigning scopes to tokens; we are. It's actually because that particular theme decided not to highlight some scopes. So your first screenshot is pathological depending on the theme, not our grammar. The JSX highlighting is actually like this for the default VSCode theme and many others:
      Screen Shot 2021-01-21 at 12 00 57 AM
      Screen Shot 2021-01-21 at 12 12 13 AM
      Screen Shot 2021-01-21 at 12 12 40 AM
      (Dark+, Monokai Dimmed and Tomorrow Night Blue, respectively)
      I'm emphasizing it because folks who haven't tried the plugin thought that we don't highlight JSX. We do highlight JSX tags, with the same color we highlight module names actually; for the previous correctness reasons (ignore the differing color for <Foo.Bar; this is a shortcoming of VSCode's archaic grammar... hopefully folks don't use that often).
  • Maintenance burden. We've done this 4+ times now and the grammar is plain unmaintainable once a contributor of a big grammar addition leaves. Not to mention we also maintain the Vim and Sublime Text's separate grammar (codegenning all of these from a single grammar is a bad idea too. LSP's experimental token protocol also won't work as it serves a different use-case). So we're trying to strike a sweet spot of coloring well in most cases, and not going overboard. I mean, these are fine coloring already (in terms of scope assignment, not necessarily in terms of actual colors, which is up to individual taste ofc):
    Screen Shot 2021-01-21 at 12 05 45 AM
    Screen Shot 2021-01-21 at 12 06 22 AM
    We've achieve these while maintaining one of the cleaner grammars around given our syntax complexity. Dare I presume that making your contribution wasn't as hard as contributing to another language's grammar (with similar syntactic complexity); and it's unclear that the grammar will stay as maintainable if we merged this (it went from 500 lines total to 1.3k lines just for JSX!). This doesn't mean we don't value your contribution btw, we're really happy you decided to do it.

tldr we've put the proper scopes, but your particular theme doesn't highlight JSX tags. Neither does it highlight module names, but that's less noticeable because nobody piles 10 module names one after after whereas they do for JSX.

Conclusion from the Priorities

  • We won't overload scopes in the hope of backward patching some themes; it's those themes that need to properly highlight the scopes we use (which are all standard, popular scopes).
  • We won't highlight JSX parameters, or we'll highlight both JSX and function parameters. For consistency.
  • We recommend the themes Dark+, Monokai Dimmed and Tomorrow Night Blue, and whichever other themes that do highlight scopes well for most languages. Understandably this is asking the user to change a habit, and themes are a bit personal, but this is a rather exceptional case.

So all in all, I'm afraid I'll have to close this PR and approach. I'm really sorry for taking this long to do so. However, #57 is a bit more promising of a direction, where we highlight the lower-case JSX tags. Yes, it does mean that technically we should highlight function applications too, but that's a bit much. A little inconsistency here but it's probably fine.

@chenglou chenglou closed this Jan 21, 2021
chenglou pushed a commit that referenced this pull request Apr 23, 2021
…or-extensions/vscode/stringstream-0.0.6

Bump stringstream from 0.0.5 to 0.0.6 in /editor-extensions/vscode
chenglou pushed a commit that referenced this pull request Apr 24, 2021
getting a little something going

work it good. got the start of completion going

the most basic completion support

parsing documentation, got topmodule completion working

getting ready for mre completion

ups

wheee we have completion of module items

lets convert ocamldoc to markdown

add in things

small fix

some cleanup

add a vscode client package

add an example project

readmes

add a command to restart the server

yay auto-restart of reason language server

add contributing info

solid caching! with dirty checking of .cmts. also dont complete for current module name

boom, completion with opens

open pervasives

head start on hover! can get types of expressions n stuff

as you type type errors

use flags from merlin file to pick up ppx stuffs

umm working on hover n stuff

going after definition & references

ok, jump to definition works within a file

more docs

refmt

yayy cross-file stuff

compile documents on open

jump to definition in an ocaml file!!! The locations are off for some reason, probably due to transforms?

yay codelens. also uri display on completion items

fix jump to definition for stdlib stuff

use full path for local sources

range formatting, super fun

format whole document

starting on in-file completions

much more stable code lenses

codelens for opens "exposing"

trying to get modue aliases working.. .

yay belt alias autocomplete works

make displayed completion uri relative to root

update rex-json version

some cleanup

highlight local references

complex local rename now working

moving some things

trying various configurations

clearing

lol moving it back

refactor

lots of fixes for real world projects

heres an example native project

ok, finally have native compilation doing ok

ok, I think I have things sorted out better

oops add in the .vscode directories

set log location

put compiler artifacts in the cache location

track number of uses an open got

track location of uses

list external dependencies

working toward cross-file rename

cross-file-rename

fix

packaging

fix directory

Just a small readme update to include instructions to build the example project

Updating client/package-lock.json to be in sync with package.json

a refmt, and resolving definition of "open"s

show local references

cross-file references

check it out

bring back opens

move things

working on constructor, attribute completions

better completions for constructors and attributes

jump to constructor

cross-file jump to definition of attribute / constructor

cleanup

yess find references for attribute names

allow the definitions to be selectable for attributes and constructors

exclude the current item from "find references"

add comparison to ocaml-language-server

Update Readme.md

Update Readme.md

fix size of constructor/attribute locations

rename attributes & constructors!!!

better packaging, dont ship the binary

list document symbols!!!

better error messages

rearrange a bunch of things

get settings to work

generic id param

Revert "generic id param"

This reverts commit bb15188.

Use the raw Json value for message ids.

The spec allows ids to be either Number or String. Since the server simply
carries this value around so that it can submit it with the response, the
simplest solution seems to be to pass the Json type through unexamined and send
it right back to the client.

Thanks to the magic of type inference, the change is isolated and nearly
trivial.

Support windows 👏🎉😎💰 (#8)

It was relatively pain-free, I must say. Pretty much the only thing I had to mess with were path handling logic.

fix handling of files that haven't been opened

rebuild windows

add macos binary

rebuild mac

woops, fix macos

fixed macos deal

Fix capabilities reporting. (#15)

signatureHelpProvider and codeLensProvider must return sub-objects which detail
their capabilities, not just "t".

Do not serve markdown if not supported (#14)

Support a stdlib that doesn't contain sources

This will be more robust, though it's a bit more complicated. Could
probably do with a refactor.

show hover documentation, even for things without source files

cleanup

include stdlib when compiling as you type

lots of cleanup, some initial fixture tests

show a nice error message if you havent run bsb yet. fixes #13

install things

 Improve support for serving plain text (#28)

* Improve support for serving plain text

* Extract converter logic out

This also makes conversion a no-op if usePlainText is false and the source is markdown.

lol typo

Initial reason jsx support

Turns out the ppx flags needed to come before the  `impl` argument.

get it somewhat working for reason-react

process dependencies correctly

fix local file resolution

rebuild

Update issue templates

Readme adjustments (#32)

* Minor typo

* ‘npm build’ doesn’t work

json up

ok work with cmi too

cmi stuff seems to work pretty well

fix module type processing

little refactor

resolve aliases for completions better

bunch of autocomplete fixes, including locally defined modules

get local functors working

remove weird nil render

rebuild for new beta

fix for bs 3.1.5

Use platform helper for getting temporary directory (#36)

trying a recovering parser

fix native belt stuffs

get working on linux!

strip the location info from type errors

Avoid revealing output channel for errors from language server (#40)

fix for older bsb native

first step toward jbuilder!!

add package info everywhere

have packages more

lets try some ppx maybe

try using the ppx

a doc

use ppx more

more

cleaning up more

yassss we hove hover-for-explanation on ppxs. the best

some more explanations

it.. seems to work? I think that was the hardest part. now to try it with two packages in a monorepo

ok, monorepo setup is go!

more and better

more getting ready for dune

a refmt

add a monorepo example

getting rid of some more node_modules

some codelens settings

fix stdlib loading n stuff

jbuild file parser yeah

closing in on esy + jbuilder

arghhh so close here. but the ocaml version is wrong

jbuilder working!! kinda

basic auto-open

woops

some refactorz

workin toward better jbuilder setup

cross-alias definition finding!

fix stdlib for jbuilder

support for adjacent libraries in jbuilder

more jbuilder stuff, also add circle config

ooh fix compilation. sweet

version up

cleanup

fix the rename issue

fix warning reporting

fix syntax error location reporting

gearing up for completing attribute names

better path resolution incoming

yasss got attribute resolution at least a bit

working on better completion

refactor to use a record for docs

undo comment out

starting to unify

working on testing

yay some tests!!

wip developing tests

completion tests lookin good

rebuild

renames

thinking about syntax errors

more completion tests

diff log location

quieter output

call it path

testing definition fetching

some more tests

thinking about renames

test includes

working on better attribute tracking

use attribute pos

more attribute pos stuff

working on type exports

making it all new

ok I think this will work for references?

getting some reference tests working

constructors

diff format

wip getting references

CP: add a format width option

fix compilation

workin on it

basic cross-module working

sweet, cross-file attributes and constructors are ok

you win some, you break some

fix that one

mores

one more fix

ok, reference tests passing

processing cmt modules and stuff

wow, ok I guess modules are doing ok

functor arguments are, um, maybe working?

yay fields

track extent

refactorz

use new process in docs thing

bring in the extra processing.

result ppx

definitions are going on the new style!

refactor

lets get documenthighlight going

fix missing constructor handling

working on moving references to new system

exclude current

sweeet references are working

move more things over, and better error reporting, and partial cmt support

get me some hoverin

digging into some hover stuff

rm old stuff

symbols on the new gig

working on tracking opens

some add uses

ok folks, some opens are working

ok, trying open codelens

getting better about opens

ok open tracking feels good

gonna tackle completion

type error

working on completions

hrmmm working on completions, not quite there yet

ok folks, completions looking not too bad

ok folks, were tearing it all out

removed a ton more things

ok, clean up some more things

working on completions

ok includes

taking a whack at attribute completion. and so tracking variable scopes

hmm closer to attribute completion

sweeet basic attributes working

ok more attributes working

ok attributes maybe mostly working

rockin it up

lots of completion cleanup

muuch more stable codelens

rm unused

working on better module resolution

ok folks, local completions working much better

experimenting

cleanup

sweet, cross-file as you type!

cross-file as-you-type my good folks!

ok, theres some more work to do to nail this down completely, but I like where its at

making the readme ##contributing section true to life again (#60)

Add node module resolver to fix missing bsb bin in hoisted projects (#59)

fixes #58

Improve rangeFormatting (#61)

* Improve rangeFormatting

Preserve leading and trailing newlines
Preserve original indents

* Remove testing

run tests

verify that workspaces are working

rebuilds

fix syntax error

cleanup, get definition tests going again

more tests cleanup

npm test better

tests for open codelens

fix cmi locs, fallback to top of file when needed

fix #64 - allow analysis of dependencies

fix windows uri parsing

working on windows again. fixes #69

support es6 compilation mode. fixes #68

fix #63

fix bsb-native again

maybe better inter-file invalidation

fix tests

cross-file-as-you-type default to false

Fix format on paste

Update MessageHandlers.re

Update test command (#74)

Update MessageHandlers to use Belt fully Any opinion? (#75)

* Update test command

* Update MessageHandlers to use Belt fully

Any opinion?

working on supporting my lispy syntax

better namespacing

fix

trying a reason lisp syntax definition

ok separate syntax highlighting for reason-lisp is working! now threading it through the language server

lookin ok

fixes for reason-lisp

cleanup

better error messages, and block comments

rebuild

rebuild

Update Readme.md

Update Readme.md

Update Readme.md

better release setup, some bugfixes

recompile on save, also fix settings parsing

support interfaces

fixing a bunch of things. definition of longidents as well

initial signatureHelp support!!

cleanups

trying no-cmts out

less logz

yes we have auto-reloading when .merlin files or bsconfig.json files change!

fix #12 - better cross-file go to type definition

Update issue templates

yesss, fixed the module-alias-namespaced issue

Create Changelog.md

fix pattern processing bug

sweet that fixed the other issues too

new release

handle preprocessing errors such that no cmt is generated in asyoutype

change working directory before running bsc for ppxs

fix es6 js output directory

better

Update Readme.md

ocaml syntax add

add ocaml syntax support../..

fix error messages. fixes #65

Read dune files in addition to jbuild files (#82)

* Read dune files in addition to jbuild files

* Add example esy dune project

* Add esy-dune-project to vscode launch config

* Update esy.lock.json

* ship .vscode settings in dune example

fix #83

ignore missing dep in search path errors

fix error position reporting

Deduplicate values from opens (#86)

run bsb from with reason-language-server!

rm no-color

wat

wheee jbuilder run-on-save now working as well!

fix include order

move vscode plugin to a better place

Update package.json

merge

add screenshot

Also load bs-dev-dependencies (#92)

Tested by adding bs-jest to the react example and confirming that
completion and hover work properly in a module in a directory marked as
dev in bsconfig.json.

docs

move things

fix flags order. fixes #89

refmt some, also support formatting for interface files

fixes #98

fix bsb-native flag processing

fix atom reload loop, fixes #100

first release

Minor change, update url to new location (#103)

fix merlin flags order - fixes #104, undoes #89

filter out invalid (pseudo) module names. fixes #102

show bucklescript errors in reason format. fixes #106

fix opens from package opens

show bsconfig.json errors

parse out -open XYZ declarations from merlin flags fixes #110

fix major completion bug

publish 1.0.2

fix windows

docs(Readme.md): add info how to install official extension for vscode (#115)

wait

better completion of constructors

1.0.3 - fix windows, better completion

better error message for bsb issue

fix texts

ok all fixed

isolate the things

further isolate the cmt/cmi stuff

some cleanup

refmt

Display project wide warnings & errors (for unopened files) fixes #113

working toward better es6 imports support

try imports

add logo

fix processing of mli files, get types, modules and includes. fixes #93

trying it outt

fix test case

dedup completion items. fixes #107

make signaturehelp more robust

cleanup tests

fix

fix all tests, ok its good now

preparing for better interface handling.. . localModules just a list

getting closer to good interface handling

typo

fix let%foo syntax highlighting

Include bs-dev-dependencies when searching for findDependencyFiles (#119)

* Typo

* findDependencyFiles includes bs-dev-dependencies

add support for shutdown message. fixes #124

show type hover for constants. fixes #97

list module contents on hover

show constructor arguments when hovering a constructor

using intfs

add a cross-module + interface test

allow interface files in tests

find definitions between interface and implementation files

add the interface file here

renames

show record and variant type info on hover

better rename with interface files

working on the namespace thing. halfway done

simplify "extratypeinfo"

wip

version 1.0.4

ignore "inconsistent assumptions" errors. fixes #117

surface "ninja errors" in bsconfig.json

Parse correctly :identifier and -value in jbuild files (#127)

reload all state when a new file is created

esy it up

move to src

ok belt is ready I think

getting closer i think

umm working?

help text & warnings fix

bringing in 402 typing stuff

rename to unifiedtypes

moving off of compiler-libs typing

402 compiling under 406 I think

ok, working!

type equality of things that dont change

moving things around -- still broked

rename

simplify

move more

ok, unifiedtypes is the only non-isolated thing

remove Definition.re

moving a couple things around

first foreys

ok gonna do the whole type replacement hting

ok, type_expr is gone!

declarations are out!

rm unified label

whoooo Compiler_libs_402 is now only used by Process_402

type it

add a 406 version??? wow

working on getting a shared definition w/ preprocessing for diff versions

printtype back to normal

processcmt + extra are now aligned

ok, might be done?

wheeee 402 is working again

rm olds

ummm so does this work?

fix reloading thing, and fix dune file parsing

esy: Add appveyor.yml for windows CI (#130)

* Add appveyor.yml

* Quick sanity check of output binary

maybe upload things

rebuild mac & windows

too-fancy

1.1.0 release - support for OCaml 4.6.0!

Update Readme.md

Add "show_module_path_on_hover" setting (#135)

* Add "show_module_path_on_hover" setting

* Tweak json for rebuild

getting tests up to date

ok, test suite building & passing

working on type-digger

full stuffs

ok, lots of type differ is in good shape

ok handle tuples too

nit

bool

fix scoping of constrained module types

simple types maybe

ok much happier with this setup

lots of refactors

wip serialize

some json

progress I think

ok dont except for abstracts i think

last fixes to make abstracts work

working on deserialization

ok variants I think

had to rename Result to RResult. go figure. also more things are working

working!

better cli (multiple entrypoints), and handle arrays

better message

trying out some codemod things

hmmm ok, trying some codemod stuff out;

trying to get the things going

use refmt directly

working!

work it

move that stuff to a lib

umm, this is worse?

ok maybe this is usable as a lib

wip

fixx

expose belt_ppx

ignore more

add readme

types

more docs

fix library decl

fix type digging

interface actions! create a full interface file, or add an individual value/type to the interface file

trying to nail down esy
/dune

ok, finally dogfooding rls is working again

Changes for better support for bsb-native 4.0.6 (#140)

* Adding support for bsb-native's new name.

We're probably going to switch to having bsb-native be called that
inside the node_modules folder. This breaks reason-language-server.
This changes un-breaks us.

* Use refmt.exe instead of refmt3.exe for 4.0.6

fix appveyor

fix circleci

update binaries

updates

split the lsp code from the analyze code. major step

move analyze tests

add tests for checking the example files have loaded

Add snippets for vscode (#146)

relock, get examples ready for testing

try to cache the examples stuffs

try agian

fix example

lol fix tests

bad module name issue

try a fix

add test for name_with_underscore

other one is breaking windows

1.2.0

add a test for go-to-module definition

longident for type references

longident for type references

wip testing

move for base

sweet, better definition tracking for functor calls

fix resolution for namespaced deps

max render depth

fix the "cant find module name" issue

fix #129

skip comments in dune files

chasing includes

works!

get you to the right file at least

release

adding tests for hover

working single tuple!

bring in to base

unique type names

add to base

Support reading from .merlin for -backend flag (#142)

* Add support for reading the .merlin file containing the -backend flag.

Bsb-native will put the backend flag in there so reason-language-server
knows how to call bsb.

* Remove derp newlines

* Move function to MerlinFile

release 1.2.2

extract out the bs-json specific stuff from type-diggers serializers

moving stuff

fixx

bugfix release

bugfix again

1.2.4

Enable comment syntax highlighting in jsx attributes (#155)

This allows proper syntax highlighting of comment blocks `/* comment */` of JSX attributes in Reason files.

Update Changelog.md

Added install step for Vim and cleaned up the text (#156)

* Added install step for Vim and cleaned up the text

* The Vim installation was missing the step that says to download the zip file from the releases page
* Minor clean up of formatting keyboard sequences and names
* Moved all links to the bottom

* Put links back in-line

show proper filename for dune (#164)

use jbuildPath in error message

Add snippets for Reason (#163)

* Add snippets for Reason

* a more conservative set of snippets

stop sabatoging esy rebuilds!

lockdown esy version

v1.2.5 published

add a logo

change sublimetext package name (#169)

Esy 0.3.x support (#170)

* Esy 0.3.x support

fixes #166

* _build stopped existing

Show types for module members (#175)

* per-item codeLens type in nested modules

* fix small bit of comment

unix ignore

Use `esy command-env` to get the Esy target directory (#174)

* Use `esy command-env` to get the Esy target directory

This is better than a hardcoded path because it works in all esy
versions. Furthermore, it also makes RLS work with Esy aliased sandboxes

* error instead of assert false

* address code review

add a platform support section

Add a license (#179)

fixes #178

fix json unicode parsing

Support opam+dune projects (#173)

* Add example-opam-dune-project

* Support opam+dune projects without esy

fixx

Add support for OCaml 4.07 (#167)

* Add support for OCaml 4.07

* try esy 0.2.11

* working nicely under 4.07!

* Fix code review comments and rebase on master

* forgot to regenerate the lockfile

* ignore

fix esy version (#181)

Disable formatOnSave for reason (#182)

* disable formatOnSave for reason

* actually turn off formatOnSave

updates

Allow to turn off autoRebuild (#183)

* fix langauge server location for example project

* parse autoRebuild value from settings

* disable buildCommand when autoRebuild is off

* tweak readme

Support global OPAM switches (#184)

Cache _esy folder for faster builds (#185)

Update appveyor.yml

Remove esy version detection (#186)

We now do things in a way that's compatible across every esy version.
This is just introducing unnecessary complexity.

Parse more of dune/jbuild files (#191)

Get ocamlopt.opt and refmt from the sandboxed alias in Esy if any (#190)

Make finding $OCAMLLIB work with Esy sandbox aliases (#188)

* Make finding $OCAMLLIB work with Esy sandbox aliases

* fix code review suggestions

Update Readme.md

Disable autoRebuild inside Esy named sandboxes (#192)

* Disable autoRebuild inside Esy named sandboxes

Esy doesn't yet tell us which named sandbox we're in. Let's disabled
autoRebuild for this case while we wait for support in Esy proper.

I'm also opening a general issue about RLS in Esy which I'll link here
shortly.

* Update Main.re

* code review

testings

Bring in all the autoserialization goodness (#196)

This is finally in a place where it's self-hosting -- the config & lockfile ser/de are generated within it. Also we have auto-migration & backwards compatability ;)

Support every ASCII char in dune/jbuild files (#195)

woops

fix

allow adding entries

fix package-json

fix test command

Describe how to configure reason-language-server with vim (#203)

* Describe how to configure reason-language-server with vim

* Add missing LanguageClient-neovim link

Fix syntax error in vim config in Readme (#204)

fix circle

1.4.0

Look for `public_name` too when figuring out a dune library name (#208)

Since ocaml/dune#1041, `name` is optional in
Dune whenever `public_name` has been specified.

Support es6-global compilation (#212)

* Support es6-global compilation

* Avoid repetition

* Handle missing case

fix warning

Clean up build warnings (#187)

* Clean up build warnings

Wow there were a lot of them

* code review

vscode: add syntax highlighting for md embed (#224)

Dedupe the source files list. (#226)

Let's say I have
- src/dir/X.re
- src/dir/X.rei
- src/dir/sub/Y.re
- src/dir/sub/Y.rei

findProjectFiles would then be fed with src/dir and src/dir/sub.

Y.re & Y.rei would appear two times in files.

When iterating over the files to generate normals, an interface is removed from the hashtbl as soon as its implementation file is treated, meaning the first occurence of Y.re would be considered to contain an interface, the second one would not.

binaries

add lockfile I guess

fix bsb-native stdlib detection

Add "build_system_override_by_root" config option (#206)

* Add "build_system_override_by_root" config option

This will allow users to manually override the build system when
inference isn't cutting it.

* lint

fix test for new esy

fix ci maybe

fix ci again

fix

more

more CI fixes I hope

npm run instead

why is esy timing outtttt

other try

inline

inline different

ok :fingers-crossed:

ok maybe windows will work now tho

Now with "show fully ppxed source" action :D :D :D

live update too

also interfaces

fix error caused by old merlin files with bad directories

use private name first, then public

add a "show AST" command

Escape spaces in ppx-flag arguments when passing to bsb (#231)

* Escape ppx-flag arguments

* Simplify ppx flag quoting in bsb-native case

* fix typo

better conversion to reason syntax

v1.5.1

support for line comments

fix tests to catch #232 that slipped through

Add version to Esy variant + conditional command to getStdlib in esy case (#236)

hopefully fix windows

Fix project root detection for source files at the toplevel (#239)

fix dune source file detection. TODO switch based on dune version

Fix CI (#260)

* random change to show that ci is broken

* Fix ci

* Update config.yml

* idontknowwhatiamdoing.gif

* Update LICENSE

add emacs config (#258)

(- mdata fix) Make default format_width value of declared type (#253)

Update Readme.md (#251)

better config docs

Add support for bs-platform 5.0.0 custom namespace (#259)

* Add support for bs-platform 5.0.0 custom namespace

See recent change in "namespace-spec" here https://bucklescript.github.io/bucklescript/docson/#build-schema.json

* Add support for bs-platform 5.0.0 custom namespace, fixup pre-5.0.0

better tests, now we can check compatible upgrades without requiring a version bump

only print reason if the outfile is .re

tail-call optimize array/list serde

wip fixing migration of type variabled things

wip

building again

fix migration of types with parameters

some refactoring, getting closer

newtypes working!

..closer

fix application order for migrators

ok so I have a repro for this last issue. apparently need newtypes again

ok newtypes looking good

wip row variant stuff

ok process variants

almost variants, dont have the args good yet

ok now parsing the argument correctly, but not processing it yet

ok working now!

add override option

making a new config thing

maybe working? almost

fix lockfile

ok, new config format is now compiling. not supporting multiple engines yet though

some small refactorings

ok, move all types & migration to their own separate modules

more refactor

refmt

add an "upvert" option, but it writes out "null"s instead of omitting optional attributes, so will need to fix that at some point

use specified helpers

self-rebuild w/ new changes

some cleanups

locked types instead of output types

some small cleanups

more cleanups

add ezjsonm

generate type constraints for record literals to fix the "record attr shadowing" issue

add ezjsonm to kitchen sink

also yojson

small refactors

some refactorings

Adjust link to LSP website home (#261)

I found it weird, when I clicked to been sent to a given page, in a specific section.
I would have expected the click to lead me to something like a homepage.
Fixed it!

remove type-digger

Escape pp-flags arguments when parsing .merlin (#266)

Imagine a .merlin containing:
```
FLG -pp /Users/iwan/Development/pp-demo/./node_modules/.bin/napkinscript -ancient
```
`-ancient` shouldn't be picked up as separate compiler flag, but as part of
the napkinscript preprocessor

Add support for bs-platform with 4.06 ast (#267)

* Select correct compiler version based on Bucklescript's version

* Add minimal semver parsing support

wip rejiggering

trying a mostly straight merlin approach

close to working

ok newfangled is working

ok I think we are almost back to parity

ok now alltests is running, that was a goose chase

sweet alltests working

fixing some definitions

fix go-to-definition for belt

more fixes

add back in the stdlibs

lets have some arguments parsing

ready for "verify definitions on rls source code"

ok, most things are resolving now :)

Add `useOldDuneProcess` flag for ease of transition

rename so I can release to npm too

woops the new thing should be enabled for library users

ignore more for npm

readme up

fix cp-test

ci maybe

woops reenable examples

Fix escaping of preprocessing-flags after merge of 'dune-merlin'. (#269)

The merge seems to have overwritten jaredly/reason-language-server#266

fix #268

trying to fix appveyor

back to _build I think

esy test not working 🙃

prepare for 1.6.0

update installation instructions for sublime text (#277)

Change the suggested LSP preferences to:

- Enable reason-language-server for .ml files.
- Enable for sublime-reason (the same Reason sublime package is published under two names: Reason and sublime-reason).

Quote ppx/pp filenames when not already quoted (#281)

try to fix CI

copy the artifact before running tests

oh it was circleci that was unhappy

update for 1.6.1

always log MerlinFile errors

minor fixes to dune parsing

trying out this sponsorships thing

Delete FUNDING.yml

more general handling of quote (#304)

Fix locations for complex idents (foo.bar) that went through ppx (#303)

Don't apply other preprocessing flags to Reason files. (#300)

Refmt is the only pp that should be applied to Reason files.
If a bsconfig contains "pp-flags", they shouldn't be applied to .re files.
Refmt is the source of truth. Follows the behaviour of Bucklescript itself.

Set up CI with Azure Pipelines (#307)

yasssss let's get this done. Supercedes #207, which seems fitting somehow

Update Emacs configuration (#308)

Currently `client/registerCapability` is not supported yet. So we will ignore its notification temporarily.

getting ready for publish

Close #299 - Add re support to markdown codeblock (#310)

Better multi-line comments configuration in vscode (#302)

Fix vscode comments highlight with // inside block comment (#289)

add some more util testing, hopefully fixes #284

nameSpaceToName should elide '@' + split on both '/' and '-' (#312)

fix parsing for dune library syntax (#315)

Add a line about symlinking the build executable (#313)

Resolves jaredly/reason-language-server#298

Fix #290

vscode ext version bump

Setup github workflow for reason-langage-server (#323)

Support OCaml 4.08 (#305)

* Support OCaml 4.08

* Merlin extend is in reason

* newest reason from master

* Use released Reason, get rid of build warnings

* better instructions for assembling the compiler sources

* Use OCaml_current, fix compilation after rebase

* build against OCaml 4.08.1 and run esy

Fix let syntax in OCaml (#330)

RLS on Windows (#318)

* minimal fix for windows

* Fix global dependencies of esy for windows.

* Fix things that could break on windows.

Port old syntax build system (#331)

* Ignore typescript output

* Add OCaml grammar source

* Add typescript config

* Add syntax build script

* Add npm script to build syntaxes

* Add OCaml grammar build instructions

Add coc.nvim extension (#333)

* Init coc.nvim

* Add build deps

* Add build config

* Add eslint

* Add basic extension

* Add prettier config

* Add babel preset target

* Add command extraction impl

* Add current release version

* Update gitignore

* Add npm scripts

* Add npmignore

* Add npm metadata

Fixes unexpected behavior of (** (#346)

add coc extension readme (#343)

add coc.nvim config synchronization (#342)

Add space between number and "more" (#339)

Previously you would see something like "a, b, c and 4more". This adds a space between before "more".

Add typescript as a syntax dev dependency (#356)

Calculate ESY__CACHE_INSTALL_PATH. Fixes failing MacOS ci (#354)

fix macos hopefully

Make client/registerCapability a request (#353)

From the spec
> Register Capability
> The client/registerCapability request is sent from the server to the client to register for a new capability on the client side.

Updated Readme.md too!

version

revert the registerCapability change

Revert "revert the registerCapability change"

This reverts commit 5857c97.

Revert "Make client/registerCapability a request (#353)"

This reverts commit 43adc0d.

get fixture tests going

Upgrade ci to use latest from hello-reason (#361)

* Upgrade ci to use latest from hello-reason

* esy-build-steps->build-platform

* Add publish-build-cache template

Fix issue where getting the ident binding time only works for 4.08. (#363)

* Fix issue where getting the ident binding time only works for 4.08.

* Cosmetic: make the ident hack explicit so it's clear it only works for 408.

version up

Rm "old dune process". It will not be missed (#366)

* Rm "old dune process". It will not be missed

I've had it disabled in tests, but enabled by default, which was in hindsight probably not the best.
I meant to remove it very soon after adding it, just as a compatability measure. It should have been removed long ago.

* fix esy lock

* lock to 4.8

* windows skip

Add option to supply a formatter for ml files (#368)

* Add support for external .ml files formatter

* Simplify fmtCmdForUri: return type result(string, string)

Add tests to verify that jump-to-definition still works with previous ocaml versions (#369)

trying out rely

reenable the other fixtures

moving things over

ok got some failing tests for bs, which isnt awesome

ok ready with rely

ready

prepare

maybe fix timeout

loggs

wat

none

plain

Revert "plain"

This reverts commit 47e63a6.

Revert "none"

This reverts commit 65dfefe.

utils

more

some caching

run the pre

wz path

wip

gaa

compiling

plain

plain

maybe working

recursion

wow working recursive I guess

ok events

ok, so its working but not nested I guess?

ok some nesting

ok passing a suite works

some refactor

some reporting

ready for use maybe

using relite

mo better

track some time, fix some tests, add skipIf for suites

ok set exit code correctly

um

nofatal

maybe fix windows

better rimraf maybe

woops

working toward retest

cleanup

fix error parsing in 4.08. Fixes #371

fix #379

fix: duplicate key in capabilities

jaredly/reason-language-server#290

update pacakge-lock.json in example-react

lets try out a github release flow

Spell correction

actions: release

1.7.5
should fix the crash-on-launch from 379

fix dune file parsing, ignore \r

Report error for edge case for bsb-native. (#382)

* Report error for edge case for bsb-native.
... where .merlin has -backend but bsconfig's entries got updated and
don't have that backend anymore.

* merge in

Co-authored-by: Benjamin San Souci <benjamin.sansouci@gmail.com>

Add instructions for installation in ArchLinux (#391)

add troubleshooting info (#388)

fix #399 (#400)

Fix highlighting of `[@bs.as]`. Fixes #396. (#397)

Fix: URI from LSP is decoded properly (#392)

Fix flags for BuckleScript packages so that ppxs binaries can be found (#360)

* Fix FLG from Merlin for BuckleScript ppx-flags to point to node_modules/.bin

* Add example for bs 7.0.1

* Change ppx path to include package folder and remove node_modules/.bin prefixing

* use jsx3 and latest reason-react to see if this fixes windows ppx issues

* try building whole project before running bsc commands

* Revert "try building whole project before running bsc commands"

This reverts commit eea2b94dc937eec86efed07b8f5349a64bff20c6.

* call npm install from outside ExampleTests + use script instead of bash in yaml template

* ggggaahhhhh

* try to debug some stuff

* add npm build and logging

* run

* try yarn

* revert changes and use node 12

* yarn

* namespace

* try different example

* appveyor simple

* remove more

* node 12

* y

* f

* n

* Revert "n"

This reverts commit d25fcf97ba9037839c33c9e617ba5ca9e6c1a4a8.

* 64

* 2019

* roll back changes

* remove new example

actions: release

1.7.6
several fixes

Follow up for #397; I forgot to build the syntax json. (#406)

fixing bsc.exe location and -bs-no-builtin-ppx flag

try to test again latest version

Fix refmt location and parsing ocaml-version

snapshot changes

add new bs-7.2 example test

lockfile updates

actions: release

1.7.7, really support bs-7.2 this time

last fix (#413)

actions: release

fix 7.1

Update coc-reason to rls 1.7.8 (#410)

Fix OCaml syntax highlighting for let followed by attribute. Fixes #409. (#412)

Hide lowercase modules. (#418)

Fix: formattter was removing the trailing line (#424)

Bump coc-reason version (#432)

fix link to ocaml language server (#443)

Co-authored-by: JP Lew <jp@cto.ai>

Expose function to get current language server client from other VSCode extensions, to allow other extensions to call the language server client directly. (#444)

Update ST instructions (#455)

Respect autorebuild for dune projects (#442)

"Dependencies: -" if there are no dependencies (instead of "Dependenc… (#438)

* "Dependencies: -" if there are no dependencies (instead of "Dependencies:")

* `Dependencies: [none]`

Support esy in monorepos (#440)

actions: release

version 1.7.9
fixing some build system compatability bugs

Test new highlighter

actions: release

1.7.10

trying out a new highlighter

feat: update coc-reason version (#456)

Bump coc-reason version (#457)

Second attempt to fix #417 (and fix #458 too) (#460)

* Revert "Hide lowercase modules. (#418)"

This reverts commit a8458b1.

* Omit lowercase modules in value completions.

actions: release

1.7.11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants