Skip to content

Commit

Permalink
Merge branch 'main' into feat/diag-annotations
Browse files Browse the repository at this point in the history
* main:
  Follow global settings more accurately whether to show snippet completions (#2017)
  Add docs for ruby steep language server
  Update F# guidance
  Cut 1.17.0
  • Loading branch information
rchl committed Aug 15, 2022
2 parents 1a45555 + b9b4aeb commit adcabb2
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 9 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.16.3
1.17.0
38 changes: 35 additions & 3 deletions docs/src/language_servers.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ Follow installation instructions on [LSP-elm](https://github.com/sublimelsp/LSP-
"clients": {
"fsautocomplete": {
"enabled": true,
"command": ["dotnet", "fsautocomplete", "--background-service-enabled"],
"command": ["fsautocomplete", "--background-service-enabled"],
"selector": "source.fsharp",
"initializationOptions": {
"AutomaticWorkspaceInit": true
Expand All @@ -139,6 +139,9 @@ Follow installation instructions on [LSP-elm](https://github.com/sublimelsp/LSP-
}
```

!!! info "A note about .NET Tools and $PATH"
If the `fsautocomplete` executable isn't on your $PATH after installing it globally, ensure the .NET global tools location (by default `$HOME/.dotnet/tools`) is on your $PATH.

## Fortran

1. Install the [ Fortran](https://packagecontrol.io/packages/Fortran) package from Package Control for syntax highlighting.
Expand Down Expand Up @@ -166,7 +169,7 @@ Follow installation instructions on [LSP-gopls](https://github.com/sublimelsp/LS

!!! info "Visit [gopls repo](https://github.com/golang/tools/tree/master/gopls) for more info."
Enable multi-module workspace support by setting the `experimentalWorkspaceModule` to `true`. Most features will work across modules, but some, such as `goimports`, will not work as expected. Please note that this setting is still very experimental.

## GDScript (Godot Engine)

1. Install the [GDScript (Godot Engine)](https://packagecontrol.io/packages/GDScript%20(Godot%20Engine)) package from Package Control for syntax highlighting.
Expand Down Expand Up @@ -501,6 +504,35 @@ Follow installation instructions on [LSP-metals](https://github.com/scalameta/me
}
```

## Steep

1. Add the steep gem into your Gemfile and install it

```bash
bundle install
```

2. Binstub steep executable

```bash
steep binstub
```

3. Open `Preferences > Package Settings > LSP > Settings` and add the `"steep"` client configuration to the `"clients"`:

```json
{
"clients": {
"steep": {
"command": ["bin/steep", "langserver"],
"selector": "source.ruby | text.html.ruby",
}
}
}
```

4. Activate server for the currect project - open Command Palette `LSP: Enable Language Server in Project > steep`

## Stylelint

Follow installation instructions on [LSP-stylelint](https://github.com/sublimelsp/LSP-stylelint).
Expand Down Expand Up @@ -587,7 +619,7 @@ Follow installation instructions on [LSP-volar](https://github.com/sublimelsp/LS
}
```

!!! warning "Only works for certain project types. Visit [vala-language-server repo](https://github.com/Prince781/vala-language-server) for more details."
!!! warning "Only works for certain project types. Visit [vala-language-server repo](https://github.com/Prince781/vala-language-server) for more details."

## XML

Expand Down
1 change: 1 addition & 0 deletions messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"1.16.1": "messages/1.16.1.txt",
"1.16.2": "messages/1.16.2.txt",
"1.16.3": "messages/1.16.3.txt",
"1.17.0": "messages/1.17.0.txt",
"1.2.7": "messages/1.2.7.txt",
"1.2.8": "messages/1.2.8.txt",
"1.2.9": "messages/1.2.9.txt",
Expand Down
21 changes: 21 additions & 0 deletions messages/1.17.0.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
=> 1.17.0

# Features and Fixes

- Completions rendering overhaul (expose labelDetails more prominently) (#2010) (jwortmann)
- Prevent failing to load all configs when one fails (Raoul Wols)
- Show previews in side view for Goto commands with side_by_side (#1982) (jwortmann)
- Support side_by_side for "Go to reference" (Rafal Chlodnicki)
- Keep active group when using Goto commands (#1994) (jwortmann)
- Fix bug for symbol action links in hover popup (jwortmann)
- Don't use actual linebreaks in log panel if payload is string literal (#1993) (jwortmann)
- Optionally fallback to goto_definition in lsp_symbol_definition (#1986) (timfjord)
- Restore selections after location picker panel (jwortmann)
- Add preview for resource (res:) files in LocationPicker (jwortmann)
- Tweaks for signature help popup including support for contextSupport and activeParameter (#2006) (jwortmann)
- Enable admonition extension for mdpopups (jwortmann)
- docs: Add Godot (GDScript) LSP instructions (lucypero)

# API changes

- Allow plugins to modify server response messages (#1992) (jwortmann)
2 changes: 1 addition & 1 deletion plugin/core/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = (1, 16, 3)
__version__ = (1, 17, 0)
16 changes: 12 additions & 4 deletions plugin/documents.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ def on_change() -> None:
self._uri = existing_uri
else:
self.set_uri(view_to_uri(view))
self._auto_complete_triggered_manually = False
self._registration = SettingsRegistration(view.settings(), on_change=on_change)
self._setup()

Expand Down Expand Up @@ -451,7 +452,9 @@ def on_hover(self, point: int, hover_zone: int) -> None:
on_navigate=lambda href: self._on_navigate(href, point))

def on_text_command(self, command_name: str, args: Optional[dict]) -> Optional[Tuple[str, dict]]:
if command_name == "show_scope_name" and userprefs().semantic_highlighting:
if command_name == "auto_complete":
self._auto_complete_triggered_manually = True
elif command_name == "show_scope_name" and userprefs().semantic_highlighting:
session = self.session_async("semanticTokensProvider")
if session:
return ("lsp_show_scope_name", {})
Expand Down Expand Up @@ -706,6 +709,8 @@ def render_highlights_on_main_thread() -> None:
# --- textDocument/complete ----------------------------------------------------------------------------------------

def _on_query_completions_async(self, resolve_completion_list: ResolveCompletionsFn, location: int) -> None:
triggered_manually = self._auto_complete_triggered_manually
self._auto_complete_triggered_manually = False # reset state for next completion popup
sessions = list(self.sessions_async('completionProvider'))
if not sessions or not self.view.is_valid():
resolve_completion_list([], 0)
Expand All @@ -723,12 +728,13 @@ def completion_request() -> Promise[ResolvedCompletions]:
completion_promises.append(completion_request())

Promise.all(completion_promises).then(
lambda responses: self._on_all_settled(responses, resolve_completion_list))
lambda responses: self._on_all_settled(responses, resolve_completion_list, triggered_manually))

def _on_all_settled(
self,
responses: List[ResolvedCompletions],
resolve_completion_list: ResolveCompletionsFn
resolve_completion_list: ResolveCompletionsFn,
triggered_manually: bool
) -> None:
LspResolveDocsCommand.completions = {}
items = [] # type: List[sublime.CompletionItem]
Expand All @@ -739,7 +745,9 @@ def _on_all_settled(
flags |= sublime.INHIBIT_EXPLICIT_COMPLETIONS
if prefs.inhibit_word_completions:
flags |= sublime.INHIBIT_WORD_COMPLETIONS
include_snippets = self.view.settings().get("auto_complete_include_snippets")
view_settings = self.view.settings()
include_snippets = view_settings.get("auto_complete_include_snippets") and \
(triggered_manually or view_settings.get("auto_complete_include_snippets_when_typing"))
for response, session_name in responses:
if isinstance(response, Error):
errors.append(response)
Expand Down

0 comments on commit adcabb2

Please sign in to comment.