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

Make space delimiter an option on a per language basis #421

Open
alerque opened this issue Mar 3, 2020 · 1 comment
Open

Make space delimiter an option on a per language basis #421

alerque opened this issue Mar 3, 2020 · 1 comment
Labels

Comments

@alerque
Copy link
Member

alerque commented Mar 3, 2020

Right now we have a global preference for using spaces after delimiters:

let g:NERDSpaceDelims = 1

I would like to overhaul this such that each language in our array of supported file types specifies a default integer number of spaces.

Example:

let s:delimiterMap = {
    \ 'aap': { 'left': '#', 'spaces': 1 },
  \}

This would make it easier to manage the cases where some language have stringent style guides, others even mandate spaces for proper lexing, while many people prefer no spaces at all. Additionally it keeps our current "uncomment" code resilient to variations in these preferences, something hard coding the space into the delimiter ruins.

See also #328, #278, #202, #183, #420, #96.

@alerque alerque added the feature label Mar 3, 2020
@alerque
Copy link
Member Author

alerque commented Mar 3, 2020

This idea can probably be expanded to other settings such as default alignment (see e.g. this comment for a use case).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant