Skip to content

Commit

Permalink
Merge pull request #286 from ishantheperson/lsp
Browse files Browse the repository at this point in the history
Obsidian LSP implementation
  • Loading branch information
ishantheperson committed May 3, 2020
2 parents dc14a43 + a054df5 commit 2132ad1
Show file tree
Hide file tree
Showing 15 changed files with 491 additions and 589 deletions.
4 changes: 2 additions & 2 deletions obs-vscode-extension/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
node_modules/
**/node_modules/
*.vsix
out/
**/out/
48 changes: 32 additions & 16 deletions obs-vscode-extension/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,34 @@
// A launch configuration that launches the extension inside a new window
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
// A launch configuration that compiles the extension and then opens it inside a new window
{
"version": "0.2.0",
"configurations": [
{
"name": "Extension",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
]
}
]
"version": "2.0.0",
"configurations": [
{
"type": "extensionHost",
"request": "launch",
"name": "Launch Client",
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceRoot}"],
"outFiles": ["${workspaceRoot}/out/**/*.js"],
"sourceMaps": true,
"preLaunchTask": {
"type": "npm",
"script": "watch"
}
},
{
"type": "node",
"request": "attach",
"name": "Attach to Server",
"port": 6009,
"restart": true,
"outFiles": ["${workspaceRoot}/server/out/**/*.js"],
"sourceMaps": true
}
],
"compounds": [
{
"name": "Client + Server",
"configurations": ["Launch Client", "Attach to Server"]
}
]
}
20 changes: 20 additions & 0 deletions obs-vscode-extension/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "watch",
"problemMatcher": "$tsc-watch",
"isBackground": true,
"presentation": {
"reveal": "never"
},
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
16 changes: 14 additions & 2 deletions obs-vscode-extension/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,21 @@

## Usage

* tsc
Compiling:
* npm install
* npm run compile

To develop the extension/LSP:
* code -n . (to open the project in vscode)
* Go to the "Run" menu on the left
* First, start "Launch client"
* The extension will open in a new VSCode window
* Now select "Attach to server"
* You can now trigger breakpoints, etc.

To install:
* vsce package
* code --install-extension obsidian-0.0.1.vsix
* code --install-extension obsidian-\*.vsix
* Restart VSCode.

## Citations
Expand Down

0 comments on commit 2132ad1

Please sign in to comment.