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

feat(language-server): add support for kebab-case completion #87

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

benalbrecht
Copy link

  • Please check if the PR fulfills these requirements
  • The commit message follows our guidelines (see CONTRIBUTING.md)
  • Tests for the changes have been added (for bug fixes / features)
    i've updated the existing tests to account for kebab-case, but haven't added new tests
  • Docs have been added / updated (for bug fixes / features)
    not yet, i can add them if you're interested in this change
  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

adds support for kebab-case completion

  • What is the current behavior? (You can also link to an open issue here)

kebab-case completion is not supported

  • What is the new behavior (if this is a feature change)?

kebab-case completion is supported

  • Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)

  • Other information:

this is my first time writing F#, so i hope i'm on the right track here :)

@chrissimon-au
Copy link
Contributor

Thanks so much for this - looks great!

In terms of documentation, shouldn't need much of an update - just add snake-case to the list of supported auto-complete styles here: https://github.com/dev-cycles/contextive/blob/main/docs/web/src/content/docs/guides/usage.md#smart-auto-complete

The para after the list explains how it detects the intended scenario, so you might include something like "If all characters are lower case, and a - is detected, only kebab-case will be included".

Definitions File

Something else just for your awareness, the areas of code you touched are related to populating auto-complete. The other side of the coin is how the terms are specified in the definitions file. I'm actually about to touch this area, as it currently only works if you specify the terms as separate words (e.g. Word1 Word2 or as pascal or camelcase word1Word2 or Word1Word2) however it doesn't work if you use snake case, and now that you've added kebab case it probably won't work for that either.

I was about to take a look at adding snake case support there, and will add kebab case when doing so, so no need to do anything further at this point - this is just by way of a heads up in case you were hoping it would work once this PR gets merged/released.

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