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

Replace "languages" by "selector" #1428

Merged
merged 8 commits into from
Nov 14, 2020
Merged

Conversation

rwols
Copy link
Member

@rwols rwols commented Nov 7, 2020

  • Maintain a map of base scopes -> language IDs
  • Rename the awkward feature_selector to priority_selector
  • Solve the problem of non-unique language IDs in SessionView
  • Update all default clients
  • "languages", "document_selector", "syntaxes" are all backwards-compatible
  • But not if you use LanguageConfig in your plugin somewhere

This is a minor version update because the public API changed.

Resolves #1384

rwols added 2 commits November 7, 2020 16:40
- Maintain a map of base scopes -> language IDs
- Rename the awkward feature_selector to priority_selector
- Solve the problem of non-unique language IDs in SessionView
- Update all default clients

This is a minor version update because the public API changed.
@rwols rwols marked this pull request as ready for review November 8, 2020 19:05
@rchl
Copy link
Member

rchl commented Nov 10, 2020

Will try to look at it later today.

@rchl
Copy link
Member

rchl commented Nov 10, 2020

My not-very-clean ST shows one test fail:

======================================================================
FAIL: test_can_parse_client_settings_with_languages (test_configs.ConfigParsingTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/rchlodnicki/workspace/lsp/Sublime LSP.app/Contents/MacOS/Data/Packages/UnitTesting/unittesting/core/py33/case.py", line 26, in _executeTestPart
    deferred = function()
  File "/Users/rchlodnicki/workspace/lsp/Sublime LSP.app/Contents/MacOS/Data/Packages/LSP/tests/test_configs.py", line 28, in test_can_parse_client_settings_with_languages
    self.assertEqual(config.selector, "source.python")
AssertionError: '' != 'source.python'
+ source.python

Copy link
Member

@rchl rchl left a comment

Choose a reason for hiding this comment

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

This is a bit over my head right now but it seems to work so I approve. :)

@rwols rwols merged commit 69cc8ed into st4000-exploration Nov 14, 2020
@rwols rwols deleted the feat/language-selector branch November 14, 2020 16:53
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.

Replace "languages" with documentSelector
2 participants