-
Notifications
You must be signed in to change notification settings - Fork 21
[WIP] Svelte Language Server integration #277
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
Open
snuffyDev
wants to merge
28
commits into
SvelteLab:main
Choose a base branch
from
snuffyDev:svelte-language-server
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
9617e2f
begin adding language server
snuffyDev b5a1461
reintroduce temp `files` object
snuffyDev 2d93f45
Handle multiple tab language support
snuffyDev e1cb9cf
Update the LS Worker
snuffyDev 87e2b5a
Merge branch 'main' into svelte-language-server
snuffyDev 3d32935
Merge remote-tracking branch 'upstream/main' into svelte-language-server
snuffyDev 1834f90
disable typescript checking for lsp worker in tsconfig.json
snuffyDev 455ad40
update language server files
snuffyDev 2129839
update language server
snuffyDev 86bfd7e
re-add process definition in vite config
snuffyDev 65d1153
Merge remote-tracking branch 'upstream/main' into svelte-language-server
snuffyDev 599d92b
fix double param
snuffyDev 44c3af8
use packaged svelte-language-server-web
snuffyDev 97b9f98
upgrade svelte-lsw to latest
snuffyDev 4677ceb
updates ls locally, temp use local build
snuffyDev e5867d1
use package
snuffyDev 73b9301
fix build
snuffyDev 2b28b48
fix worker imports, again
snuffyDev e4d769f
upgrade lang server package
snuffyDev 2741127
add jsconfigs to lib + basic template
snuffyDev e874c6b
Merge branch 'SvelteLab:main' into svelte-language-server
snuffyDev 7a2e863
Revert "update language server files"
snuffyDev 2d07b56
fix threlte template
snuffyDev a13c214
rm extra deps
snuffyDev 8f54fbb
fix loading on safari
snuffyDev 6dae990
add 'events' pkg
snuffyDev 448bc2f
Merge remote-tracking branch 'upstream/main' into svelte-language-server
snuffyDev b18e205
tweak modification fs event execution
snuffyDev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,4 @@ node_modules | |
# Ignore files for PNPM, NPM and YARN | ||
pnpm-lock.yaml | ||
package-lock.json | ||
yarn.lock | ||
yarn.lock |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,66 @@ | ||
migrate((db) => { | ||
const collection = new Collection({ | ||
"id": "4231um01lpl5v14", | ||
"created": "2023-06-26 20:50:39.199Z", | ||
"updated": "2023-06-26 20:50:39.199Z", | ||
"name": "repls", | ||
"type": "base", | ||
"system": false, | ||
"schema": [ | ||
{ | ||
"system": false, | ||
"id": "gqsfegcs", | ||
"name": "files", | ||
"type": "json", | ||
"required": true, | ||
"unique": false, | ||
"options": {} | ||
}, | ||
{ | ||
"system": false, | ||
"id": "8udknpm3", | ||
"name": "user", | ||
"type": "relation", | ||
"required": false, | ||
"unique": false, | ||
"options": { | ||
"collectionId": "_pb_users_auth_", | ||
"cascadeDelete": true, | ||
"minSelect": null, | ||
"maxSelect": 1, | ||
"displayFields": [ | ||
"id", | ||
"username" | ||
] | ||
} | ||
}, | ||
{ | ||
"system": false, | ||
"id": "8hnolajl", | ||
"name": "name", | ||
"type": "text", | ||
"required": true, | ||
"unique": false, | ||
"options": { | ||
"min": 2, | ||
"max": null, | ||
"pattern": "" | ||
} | ||
} | ||
], | ||
"indexes": [], | ||
"listRule": "", | ||
"viewRule": "", | ||
"createRule": "@request.auth.id != \"\"", | ||
"updateRule": "@request.auth.id = user.id", | ||
"deleteRule": "@request.auth.id = user.id", | ||
"options": {} | ||
}); | ||
migrate( | ||
(db) => { | ||
const collection = new Collection({ | ||
id: '4231um01lpl5v14', | ||
created: '2023-06-26 20:50:39.199Z', | ||
updated: '2023-06-26 20:50:39.199Z', | ||
name: 'repls', | ||
type: 'base', | ||
system: false, | ||
schema: [ | ||
{ | ||
system: false, | ||
id: 'gqsfegcs', | ||
name: 'files', | ||
type: 'json', | ||
required: true, | ||
unique: false, | ||
options: {}, | ||
}, | ||
{ | ||
system: false, | ||
id: '8udknpm3', | ||
name: 'user', | ||
type: 'relation', | ||
required: false, | ||
unique: false, | ||
options: { | ||
collectionId: '_pb_users_auth_', | ||
cascadeDelete: true, | ||
minSelect: null, | ||
maxSelect: 1, | ||
displayFields: ['id', 'username'], | ||
}, | ||
}, | ||
{ | ||
system: false, | ||
id: '8hnolajl', | ||
name: 'name', | ||
type: 'text', | ||
required: true, | ||
unique: false, | ||
options: { | ||
min: 2, | ||
max: null, | ||
pattern: '', | ||
}, | ||
}, | ||
], | ||
indexes: [], | ||
listRule: '', | ||
viewRule: '', | ||
createRule: '@request.auth.id != ""', | ||
updateRule: '@request.auth.id = user.id', | ||
deleteRule: '@request.auth.id = user.id', | ||
options: {}, | ||
}); | ||
|
||
return Dao(db).saveCollection(collection); | ||
}, (db) => { | ||
const dao = new Dao(db); | ||
const collection = dao.findCollectionByNameOrId("4231um01lpl5v14"); | ||
return Dao(db).saveCollection(collection); | ||
}, | ||
(db) => { | ||
const dao = new Dao(db); | ||
const collection = dao.findCollectionByNameOrId('4231um01lpl5v14'); | ||
|
||
return dao.deleteCollection(collection); | ||
}) | ||
return dao.deleteCollection(collection); | ||
}, | ||
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,39 @@ | ||
migrate((db) => { | ||
const dao = new Dao(db) | ||
const collection = dao.findCollectionByNameOrId("_pb_users_auth_") | ||
migrate( | ||
(db) => { | ||
const dao = new Dao(db); | ||
const collection = dao.findCollectionByNameOrId('_pb_users_auth_'); | ||
|
||
collection.listRule = "" | ||
collection.viewRule = "" | ||
collection.listRule = ''; | ||
collection.viewRule = ''; | ||
|
||
// add | ||
collection.schema.addField(new SchemaField({ | ||
"system": false, | ||
"id": "et0pq3ch", | ||
"name": "avatarUrl", | ||
"type": "url", | ||
"required": false, | ||
"unique": false, | ||
"options": { | ||
"exceptDomains": null, | ||
"onlyDomains": null | ||
} | ||
})) | ||
// add | ||
collection.schema.addField( | ||
new SchemaField({ | ||
system: false, | ||
id: 'et0pq3ch', | ||
name: 'avatarUrl', | ||
type: 'url', | ||
required: false, | ||
unique: false, | ||
options: { | ||
exceptDomains: null, | ||
onlyDomains: null, | ||
}, | ||
}), | ||
); | ||
|
||
return dao.saveCollection(collection) | ||
}, (db) => { | ||
const dao = new Dao(db) | ||
const collection = dao.findCollectionByNameOrId("_pb_users_auth_") | ||
return dao.saveCollection(collection); | ||
}, | ||
(db) => { | ||
const dao = new Dao(db); | ||
const collection = dao.findCollectionByNameOrId('_pb_users_auth_'); | ||
|
||
collection.listRule = null | ||
collection.viewRule = null | ||
collection.listRule = null; | ||
collection.viewRule = null; | ||
|
||
// remove | ||
collection.schema.removeField("et0pq3ch") | ||
// remove | ||
collection.schema.removeField('et0pq3ch'); | ||
|
||
return dao.saveCollection(collection) | ||
}) | ||
return dao.saveCollection(collection); | ||
}, | ||
); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are these new modules (open-rpc, codemirror-languageserver, events) used anywhere? 👀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed open-rpc, and events. since they were required when using the language server modules directly rather than using the current NPM package.
codemirror-languageserver
is used here, though: https://github.com/SvelteLab/SvelteLab/pull/277/files#diff-eb2ab2a29594e8de109dcc59d1e2664eb6b05c0107da708a5119794aef7f030aR275