Skip to content

Support spelling_language property#210

Merged
cxw42 merged 1 commit intoeditorconfig:masterfrom
gustaphe:natural_language
Mar 16, 2026
Merged

Support spelling_language property#210
cxw42 merged 1 commit intoeditorconfig:masterfrom
gustaphe:natural_language

Conversation

@gustaphe
Copy link
Copy Markdown
Contributor

I implemented the discussion in editorconfig/editorconfig#315 . Perhaps this is the wrong way around - it should be put in the standard first. But I don't know how to edit the standard, I know how to edit the implementation.

I'm currently running off my own fork, but in case the standard is updated at least this practical implementation is ready.

@xuhdev
Copy link
Copy Markdown
Member

xuhdev commented Mar 4, 2023

You are right, it need to be added to the spec first: spec.editorconfig.org. The plugin is a implementation of the spec for Vim.

@cxw42
Copy link
Copy Markdown
Member

cxw42 commented May 29, 2023

Draft specification change using spell_language (based on my reading of the thread): editorconfig/specification#41

@gustaphe
Copy link
Copy Markdown
Contributor Author

I don't know how the tests work, but there's a spelling_language in the specification now so here's the implementation.

@cxw42 cxw42 changed the title Add natural_language Support spelling_language property Mar 25, 2024
Copy link
Copy Markdown
Member

@cxw42 cxw42 left a comment

Choose a reason for hiding this comment

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

LGTM! I am just requesting one change. Thanks for this PR!

Comment thread plugin/editorconfig.vim Outdated
@gustaphe
Copy link
Copy Markdown
Contributor Author

gustaphe commented Apr 8, 2024

Sure, fixed this.

Just to mention, the specification is a bit vague on which territory codes are actually included, the ISO lists all of ^[a-z]\{2}\(-[A-Z0-9]\{2,3}\)\?$, but I'm limiting it to ^[a-z]\{2}\(-[A-Z]\{2}\)\?$ because it's the only ones that can be simply converted to vim format. And I've never seen the three letter or digit codes used. If that is ever required, somebody should probably build a lookup table for this.

@cxw42
Copy link
Copy Markdown
Member

cxw42 commented Apr 10, 2024

Thanks! As for two- vs. three-letter codes, I intended TT in

The format is ss or ss-TT

to be exactly two characters, but your point is well made --- TT could be read as a variable. I have opened editorconfig/specification#48 to fix that. Thank you for reporting the spec issue!

@cxw42
Copy link
Copy Markdown
Member

cxw42 commented Sep 15, 2024

@gustaphe Spec fix open at editorconfig/specification#54

@gustaphe
Copy link
Copy Markdown
Contributor Author

gustaphe commented Oct 3, 2024

Just checking, is there anything blocking this merge?

@cxw42 cxw42 force-pushed the natural_language branch from 5225c86 to ca33e23 Compare March 15, 2026 23:59
@cxw42
Copy link
Copy Markdown
Member

cxw42 commented Mar 16, 2026

@gustaphe Apologies for the long delay! I have squashed and force-pushed your branch. There are no content changes:

$ git diff --exit-code ec5a000 ca33e23 && echo SAME
SAME

@cxw42
Copy link
Copy Markdown
Member

cxw42 commented Mar 16, 2026

Style nit: I prefer '\v...' regexes so not as much has to be escaped. However, that is not at all a blocker!

@cxw42 cxw42 enabled auto-merge (rebase) March 16, 2026 00:16
@cxw42 cxw42 disabled auto-merge March 16, 2026 00:16
cxw42 added a commit to cxw42/editorconfig-vim that referenced this pull request Mar 16, 2026
@cxw42 cxw42 closed this Mar 16, 2026
@cxw42 cxw42 reopened this Mar 16, 2026
@cxw42 cxw42 force-pushed the natural_language branch from ca33e23 to f3d5760 Compare March 16, 2026 00:23
@cxw42 cxw42 enabled auto-merge (rebase) March 16, 2026 00:24
@cxw42
Copy link
Copy Markdown
Member

cxw42 commented Mar 16, 2026

Sorry for the confusion --- I use Bitbucket at work and got mixed up on the PR UI for a moment. Should merge as soon as Appveyor finishes.

After rebase, also no content changes (the only differences shown in the range diff are in context lines)

$ g range-diff ca33e23^..ca33e23 HEAD^..HEAD
1:  ca33e23 ! 1:  f3d5760 Support spelling_language property
    @@ README.md: The EditorConfig Vim plugin supports the following EditorConfig [prop
      ## Selected Options
     
      ## plugin/editorconfig.vim ##
    -@@ plugin/editorconfig.vim: function! s:ApplyConfig(config) abort " Set the buffer options {{{1
    +@@ plugin/editorconfig.vim: function! s:ApplyConfig(bufnr, config) abort
              endif
          endif

@cxw42 cxw42 merged commit c022788 into editorconfig:master Mar 16, 2026
1 check passed
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.

3 participants