Skip to content

Commit

Permalink
fix: document selector not working in github.dev (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
d-jeffery authored Sep 29, 2023
1 parent 64ecd14 commit 4c416bc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
7 changes: 2 additions & 5 deletions client/src/extension.browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,8 @@ let client: LanguageClient;
// this method is called when vs code is activated
export function activate(context: ExtensionContext) {

/*
* all except the code to create the language client in not browser specific
* and could be shared with a regular (Node) extension
*/
const documentSelector = [{ scheme: 'file', language: 'openfga' }, { scheme: 'untitled', language: 'openfga'}];
// Register the server for all document types
const documentSelector = [{ language: 'openfga' }];

// Options to control the language client
const clientOptions: LanguageClientOptions = {
Expand Down
4 changes: 2 additions & 2 deletions client/src/extension.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ export function activate(context: ExtensionContext) {

// Options to control the language client
const clientOptions: LanguageClientOptions = {
// Register the server for plain text documents
documentSelector: [{ scheme: 'file', language: 'openfga' }, { scheme: 'untitled', language: 'openfga'}],
// Register the server for all document types
documentSelector: [{ language: 'openfga' }],
synchronize: {
// Notify the server about file changes to '.clientrc files contained in the workspace
fileEvents: workspace.createFileSystemWatcher('**/.clientrc')
Expand Down

0 comments on commit 4c416bc

Please sign in to comment.