Skip to content

Commit

Permalink
LSP setup (#91)
Browse files Browse the repository at this point in the history
* Add esbuild file for more control over builds

* First implementation of LSP

* Update deps

* Updates

* clean up repo

* add project.ptx completions to LSP, although without position checking

* attributes are only added inside tags

* progress on general completions

* hack together element completions

* get file completions working for xi:include

* Make paths posix

* first try at reference completions

* set up some basic test infrastructure

* fix file completions

* completions can start a line

* very initial work on some schema import script

* implement rng-to-internal schema

* implement completions based on imported rng schema

* format

---------

Co-authored-by: Jason Siefken <[email protected]>
  • Loading branch information
oscarlevin and siefkenj authored Oct 14, 2024
1 parent 75b4663 commit 018a07f
Show file tree
Hide file tree
Showing 41 changed files with 61,013 additions and 2,832 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 6,
"ecmaVersion": 2022,
"sourceType": "module"
},
"plugins": ["@typescript-eslint"],
Expand Down
129 changes: 64 additions & 65 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,66 +1,65 @@
.vscode/**
.vscode-test/**
out/test/**

.gitignore
.yarnrc
vsc-extension-quickstart.md
**/tsconfig.json
**/.eslintrc.json
**/*.map

# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msm
*.msp

# Windows shortcuts
*.lnk

# =========================
# Operating System Files
# =========================

# OSX
# =========================

.DS_Store
.AppleDouble
.LSOverride

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
node_modules
out

#
*.bak
*.vsix
.editorconfig
.vscode/**
.vscode-test/**
out/test/**

.gitignore
.yarnrc
vsc-extension-quickstart.md
**/.eslintrc.json
**/*.map

# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msm
*.msp

# Windows shortcuts
*.lnk

# =========================
# Operating System Files
# =========================

# OSX
# =========================

.DS_Store
.AppleDouble
.LSOverride

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
node_modules
out

#
*.bak
*.vsix
.editorconfig
.access-token
5 changes: 5 additions & 0 deletions .vscode-test.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { defineConfig } from '@vscode/test-cli';

export default defineConfig({
files: 'out/test/**/*.test.js',
});
5 changes: 0 additions & 5 deletions .vscode/extensions.json

This file was deleted.

58 changes: 36 additions & 22 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,40 @@
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
{
"version": "0.2.0",
"configurations": [
{
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
"outFiles": ["${workspaceFolder}/out/**/*.js"],
"preLaunchTask": "${defaultBuildTask}"
},
{
"name": "Extension Tests",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
],
"outFiles": ["${workspaceFolder}/out/test/**/*.js"],
"preLaunchTask": "${defaultBuildTask}"
}
]
"version": "0.2.0",
"compounds": [
{
"name": "Run Extension + LSP",
"configurations": ["Run Extension Only", "Attach to LSP Only"]
}
],
"configurations": [
{
"name": "Run Extension Only",
"type": "extensionHost",
"request": "launch",
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
"outFiles": ["${workspaceFolder}/out/**/*.js"],
"preLaunchTask": "${defaultBuildTask}"
},
{
"type": "node",
"request": "attach",
"name": "Attach to LSP Only",
"port": 6009,
"restart": true,
"outFiles": ["${workspaceRoot}/out/lsp-server.js"]
},
{
"name": "Extension Tests",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
],
"outFiles": ["${workspaceFolder}/out/test/**/*.js"],
"preLaunchTask": "${defaultBuildTask}"
}
]
}
35 changes: 0 additions & 35 deletions .vscode/settings.json

This file was deleted.

32 changes: 16 additions & 16 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,20 +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
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "watch",
"problemMatcher": "$tsc-watch",
"isBackground": true,
"presentation": {
"reveal": "never"
},
"group": {
"kind": "build",
"isDefault": true
}
}
}
]
}
]
}
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [UNRELEASED]

### Changed

- Completions now use a Language Server Provider, which should improve performance.

## [0.20.2] - 2024-08-04

### Fixed
Expand Down
Loading

0 comments on commit 018a07f

Please sign in to comment.