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

Add multiple types for ocamllsp #912

Merged
merged 2 commits into from
May 19, 2021
Merged

Conversation

undu
Copy link
Contributor

@undu undu commented May 17, 2021

Hi, I'm working on splitting the ocaml filetype into several ones.

Historically several file formats have been detected as just "ocaml" filetype. The filetype needs splitting because they need to uses specialized tree-sitter parsers. The plan is to adapt plugins like this one to support the filetypes before the breaking change of splitting the filetype is introduced into (neo)vim: ocaml/vim-ocaml#61

This PR adds support for these filetypes while maintaining current behaviour when all file formats are detected as the ocaml filetype. To further complicate matters the new filetypes and the language_id expected by the server are different, so a map is added and get_language_id is defined.

I'm new to lua, feel free to point out errors in style, I'll gladly fix them.

undu added 2 commits May 17, 2021 20:59
These are ocamlinterface, ocamllex and menhir.

This is in preparation when these filetypes will be introduced in order
to keep lsp working on them. The change is backwards compatible.

For more information about the rationale of this change please read
ocaml/vim-ocaml#61
@lithammer
Copy link
Collaborator

Thanks for preparing us for this change!

@undu undu deleted the ocaml_interface branch May 19, 2021 07:22
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