Skip to content
This repository was archived by the owner on May 6, 2024. It is now read-only.

Comments

Shebang overrides plus docs#46

Merged
nathom merged 4 commits intonathom:devfrom
mohamed-abdelnour:shebang-overrides-plus-docs
Nov 23, 2021
Merged

Shebang overrides plus docs#46
nathom merged 4 commits intonathom:devfrom
mohamed-abdelnour:shebang-overrides-plus-docs

Conversation

@mohamed-abdelnour
Copy link
Contributor

Hello, @nathom, thank you for the awesome plugin!

This is a small PR to allow configuring extra shebang associations. I think it would be nice to have this so that users can easily customise shebangs without having to update the main repository.

If you're interested in merging this, please tell me whether or not to keep 379daf5. I'll drop the commit and force push if you don't think it's necessary.

Another thing to note, there is currently a small bug with shebangs on the dev branch after 7837d23; here is the error message:

Error detected while processing BufReadPost Autocommands for "*":
E5108: Error executing lua ...te/pack/packer/start/filetype.nvim/lua/filetype/init.lua:230: attempt to index global 'builtin_map' (a nil value)

I fixed it in c712344 and can update this PR with the fix or open a new one.

if shebang then
shebang = builtin_map.shebang[shebang] or shebang
shebang = custom_map.shebang[shebang]
or builtin_map.shebang[shebang]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

builtin_map was removed entirely, so indexing it will cause an error.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I'll update the PR with c712344; just wanted to ask first in case you were still working on it.

@nathom
Copy link
Owner

nathom commented Nov 20, 2021

Thanks! I'll merge after you fix the builtin_map reference.

@nathom nathom merged commit 8bd1904 into nathom:dev Nov 23, 2021
@mohamed-abdelnour mohamed-abdelnour deleted the shebang-overrides-plus-docs branch November 24, 2021 12:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants