Skip to content

Commit

Permalink
docs: remove now obsolete settings from docs
Browse files Browse the repository at this point in the history
  • Loading branch information
wkillerud committed Sep 17, 2024
1 parent d03995f commit 93bb668
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 62 deletions.
23 changes: 0 additions & 23 deletions docs/src/language-server/configure-a-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,29 +24,6 @@ For example, while we may document `"somesass.loadPaths": []` (and write it this
}
```

### Server-only settings

In addition to [the user settings](../user-guide/settings.md), language clients may want to configure these server-only settings to tweak how certain features interact with your specific editor.

| Key | Description |
| ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `somesass.completion.afterModule` | Set this to the empty string if you end up with `module..$variable` after accepting a code suggestion item. If `module.` or `module` disappears, you can set it to `"{module}."` or `"{module}"` respectively. That is a "magic string" that will be replaced with the actual module name. |
| `somesass.completion.beforeVariable` | Set this to the empty string if you end up with `$$variable` after accepting a code suggestion item. |

For example:

```json
{
"settings": {
"somesass": {
"completion": {
"afterModule": "{module}"
}
}
}
}
```

## Existing clients

This list of [language client implementations][languageclients] may be a helpful starting point. You may also want to look at [existing clients](./existing-clients.md).
Expand Down
2 changes: 1 addition & 1 deletion docs/src/language-server/helix.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ You can configure new language servers in [`.config/helix/languages.toml`](https
[language-server.some-sass-language-server]
command = "some-sass-language-server"
args = ["--stdio"]
config = { somesass = { completion = { afterModule = "", beforeVariable = "" } } }
config = { somesass = { loadPaths = [] } }

[[language]]
name = "scss"
Expand Down
4 changes: 1 addition & 3 deletions packages/language-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ some-sass-language-server --stdio

### Workspace configuration

The language server requests [settings](../user-guide/settings.md) via the [`workspace/configuration` message](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#workspace_configuration), on the `somesass` key. All fields are optional.

See the [documentation for the available settings](https://wkillerud.github.io/some-sass/user-guide/settings.html).
See [how to configure a client](https://wkillerud.github.io/some-sass/language-server/configure-a-client.html) and the [documentation for the available settings](https://wkillerud.github.io/some-sass/user-guide/settings.html).

## Capabilities

Expand Down
2 changes: 0 additions & 2 deletions packages/language-server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,6 @@ export class SomeSassServer {
suggestionStyle: settings.suggestionStyle,
suggestFunctionsInStringContextAfterSymbols:
settings.suggestFunctionsInStringContextAfterSymbols,
afterModule: settings.completion?.afterModule,
beforeVariable: settings.completion?.beforeVariable,
},
});
}
Expand Down
4 changes: 0 additions & 4 deletions packages/language-server/src/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ export interface ISettings {
readonly suggestFromUseOnly: boolean;
readonly suggestFunctionsInStringContextAfterSymbols: " (+-*%";
readonly triggerPropertyValueCompletion: boolean;
readonly completion?: {
afterModule?: string;
beforeVariable?: string;
};
}

export interface IEditorSettings {
Expand Down
2 changes: 0 additions & 2 deletions packages/language-services/src/language-feature.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ const defaultConfiguration: LanguageServiceConfiguration = {
suggestFunctionsInStringContextAfterSymbols: " (+-*%",
suggestionStyle: "all",
triggerPropertyValueCompletion: true,
afterModule: ".",
beforeVariable: "$",
},
};

Expand Down
27 changes: 0 additions & 27 deletions packages/language-services/src/language-services-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,33 +225,6 @@ export interface LanguageServiceConfiguration {
*/
triggerPropertyValueCompletion?: boolean;
includePrefixDot?: boolean;
/**
* If you end up with an extra `.` after accepting a suggestion, set this to the empty string.
* If your module disappears, set it to "{module}" or "{module}." depending on your situation.
*
* @example
* ```scss
* .foo {
* // set this setting to the empty string "" to fix this bug,
* // which varies depending on your editor's grammar for Sass.
* color: module..$variable;
* }
* ```
*/
afterModule?: string;
/**
* If you end up with an extra `&` after accepting a suggestion, set this to the empty string.
*
* @example
* ```scss
* .foo {
* // set this setting to the empty string "" to fix this bug,
* // which varies depending on your editor's grammar for Sass.
* color: $$variable;
* }
* ```
*/
beforeVariable?: string;
};
editorSettings?: EditorSettings;
workspaceRoot?: URI;
Expand Down

0 comments on commit 93bb668

Please sign in to comment.