[vim/vim] Add Faust filetype (PR #14894)

27 views
Skip to first unread message

Blake North

unread,
Jun 1, 2024, 7:39:21 AMJun 1
to vim/vim, Subscribed

This adds the faust filetype for Faust .dsp and .lib files.

The .lib file extension was marked as being for COBOL files, but I couldn't find any evidence to support .lib being an extension that's used by COBOL (see sources below), so I reassigned it to Faust, which does use the .lib extension (example). If anyone can find a .lib file in COBOL, I'll gladly write a file type detector for it, but I would need to see it in order to know what I'm detecting.


Sources proving that COBOL doesn't use .lib:

  1. The Wikipedia article on COBOL does not list .lib as an extension
    image.png (view on web)
  2. Visual Studio's COBOL Language Support extension does not list .lib as an extension they detect as a COBOL file.
    image.png (view on web)
  3. The first 100 search results for .lib files on github are all in repos that do not contain any COBOL code
    (verified by hand)

You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/14894

Commit Summary

File Changes

(1 file)

Patch Links:


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/14894@github.com>

dkearns

unread,
Jun 1, 2024, 11:34:16 AMJun 1
to vim/vim, Subscribed

It might be a good idea to email the Cobol runtime files maintainer (Ankit Jain aja...@yahoo.co.in) and see if they can offer an explanation for this extension. It appears to have been assigned to Cobol for at least twenty five years.

Linguist doesn't recognise it as a Cobol extension either.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/14894/c2143489384@github.com>

Christian Brabandt

unread,
Jun 1, 2024, 3:06:15 PMJun 1
to vim/vim, Subscribed

Thanks. Another issue: *.dsp is already used for Makefiles


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/14894/c2143551632@github.com>

Blake North

unread,
Jun 1, 2024, 3:18:09 PMJun 1
to vim/vim, Subscribed

Yes, I just noticed that - I'll write a detector for it. It seems like checking for # characters at the beginnings of lines, no semicolons ; at the ends of lines, and looking for keywords like ifeq and endif could be a good way of doing this.

Example .dsp in Makefile: https://github.com/alberto-fc/csr-spi-ftdi/blob/21cda76812b916bb8e31097c389fe6b82fcb8512/obj-win32/Makefile.dsp
Example .dsp in Faust: https://github.com/magnetophon/lamb/blob/a2151cfd20c9827c92fb6fc092dc367b2b40d450/lamb.dsp

Also, I've never submitted a PR here before. Should this PR touch the same files as #12363?


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/14894/c2143554970@github.com>

Ankit

unread,
Jun 2, 2024, 3:22:12 AMJun 2
to vim/vim, Subscribed

@PowerUser64 I think it is safe to remove .lib from COBOL filetype detector as it is not a standard COBOL extension. Standard types are .cbl and .cob and .cpy for copybooks.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/14894/c2143729273@github.com>

Christian Brabandt

unread,
Jun 2, 2024, 10:09:28 AMJun 2
to vim/vim, Subscribed

I think #12363 is a good example, which you can use as a template for you changes. Thanks for working on that.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/14894/c2143868727@github.com>

Blake North

unread,
Jun 17, 2024, 9:33:54 PM (9 days ago) Jun 17
to vim/vim, Push

@PowerUser64 pushed 1 commit.


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/14894/before/9abe90dd4f9348b4e5eaf319d9ccd5d6d420227b/after/81a57b13305d12a5b7d82d16cb59fc0f6c7e7a8a@github.com>

Blake North

unread,
Jun 17, 2024, 9:37:16 PM (9 days ago) Jun 17
to vim/vim, Subscribed

Good news, it turns out that Make doesn't actually use the .dsp extension. Rather it's used by a discontinued program called Microsoft Developer Studio, hence the Developer Studio Project .dsp format. What's nice is these files are auto-generated, and all seem to have the same text at the top, "# Microsoft Developer Studio Project File". The format of the file is the same as that of Makefile, hence the association. I added in a few extra tests for things like keywords and comments for good measure.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/14894/c2174743074@github.com>

Blake North

unread,
Jun 17, 2024, 10:11:00 PM (9 days ago) Jun 17
to vim/vim, Push

@PowerUser64 pushed 1 commit.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/14894/before/81a57b13305d12a5b7d82d16cb59fc0f6c7e7a8a/after/30d60283e467eb3fd42d179bf36e2a4c91cfb780@github.com>

Blake North

unread,
Jun 17, 2024, 10:26:25 PM (9 days ago) Jun 17
to vim/vim, Push

@PowerUser64 pushed 1 commit.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/14894/before/30d60283e467eb3fd42d179bf36e2a4c91cfb780/after/e5ea5b30abca4b087808ab16d3f462289b3f28bf@github.com>

Blake North

unread,
Jun 17, 2024, 10:49:07 PM (9 days ago) Jun 17
to vim/vim, Subscribed

Cool, tests pass. By the way, any idea why https://github.com/vim/vim/actions/runs/9557808149/job/26345595245?pr=14894#step:11:15186 failed?


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/14894/c2174853612@github.com>

Christian Brabandt

unread,
Jun 18, 2024, 2:45:43 AM (8 days ago) Jun 18
to vim/vim, Subscribed

Thanks, those 2 failing ones are known flaky ones.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/14894/c2175249091@github.com>

Christian Brabandt

unread,
Jun 19, 2024, 2:32:06 PM (7 days ago) Jun 19
to vim/vim, Subscribed

thanks, looks good now.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/14894/c2179289055@github.com>

Christian Brabandt

unread,
Jun 19, 2024, 2:37:57 PM (7 days ago) Jun 19
to vim/vim, Subscribed

Closed #14894 via aa61b8a.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/14894/issue_event/13219886883@github.com>

Blake North

unread,
Jun 19, 2024, 6:29:29 PM (7 days ago) Jun 19
to vim/vim, Subscribed

Thanks for the review!


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/14894/c2179525537@github.com>

Reply all
Reply to author
Forward
0 new messages