Skip to content
This repository has been archived by the owner on Dec 4, 2020. It is now read-only.

Ability to select custom language for a file #6

Open
dakyskye opened this issue Jul 16, 2020 · 1 comment
Open

Ability to select custom language for a file #6

dakyskye opened this issue Jul 16, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@dakyskye
Copy link
Owner

What do you want

Either a way to define file names in NVim config and custom asset names, or a new command, that will save what language you want to be displayed for a certain file in the program memory. Or maybe both way.

Why

I was editing a shell script file, that has no file extension. I'd like others to see what language I am writing in that file.

Implementation hints

For the command, save the exact file path to memory, and iterate over this new array before the original languages array.
For config, just simple Vim syntax:

let g:cord_custom_types = {
    \ 'mySpecialFileName' : 'shell',
   \ 'mySpecialFileName.with.a.file.extension': 'powershell'
\ }
@dakyskye dakyskye added the enhancement New feature or request label Jul 16, 2020
@dakyskye
Copy link
Owner Author

Possibly this should rather go in coc-settings.json than in actual nvim config

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant