Skip to content
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

Merge fea-rs repo #505

Merged
merged 528 commits into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
528 commits
Select commit Hold shift + click to select a range
cea8e74
Handle contextual ignore statements
cmyr Nov 21, 2022
22b573c
Compile reverse chain sub rules
cmyr Nov 22, 2022
997e0b8
Use read/types via write_fonts reexport
cmyr Nov 22, 2022
74d4686
Fix for new hhea/vhea API
cmyr Nov 22, 2022
9ff0b85
fixup imports
cmyr Nov 22, 2022
a48e16c
Improve compiling against existing font
cmyr Nov 22, 2022
081c17e
Compile device tables in value records
cmyr Nov 25, 2022
ce91561
Remove redundant anchor type
cmyr Nov 25, 2022
4b2e555
Compile devices in anchor tables
cmyr Nov 25, 2022
e4e44d9
Compile vhea
cmyr Nov 29, 2022
46a7cf8
Clippy fixups && pin write-fonts to git rev
cmyr Nov 29, 2022
69f0004
Shared fns for ss01-ss20 and cv01-cv99 Tags
cmyr Nov 29, 2022
672778c
Move const tags into common::tags
cmyr Dec 1, 2022
f33af88
Add NameBuilder
cmyr Dec 1, 2022
07985c8
Rename STAT -> StatBuilder, add build() fn
cmyr Dec 1, 2022
a712bb1
Add Compilation::build_raw
cmyr Nov 28, 2022
be018b9
Update bin/compile to accept glyph order input
cmyr Nov 28, 2022
6790b75
Test glyph order loading
cmyr Nov 30, 2022
f9e7532
Compile ss01-ss20 feature params
cmyr Dec 1, 2022
a44137d
Only compile name entries with known encodings
cmyr Dec 1, 2022
86aa9e1
Compile cv01-cv99 feature params
cmyr Dec 2, 2022
08cbba1
Cleanup for 0.0.1 release
cmyr Dec 2, 2022
738ea57
Fix manifest readme entry
cmyr Dec 2, 2022
06ca178
Update write-fonts, get working with API changes
cmyr Dec 9, 2022
4a4e92f
Tweak build API
cmyr Dec 6, 2022
5372da6
Write out post table in ttx tests
cmyr Dec 6, 2022
75f923d
Fix STAT compilation
cmyr Dec 4, 2022
71f74e7
Compile BASE table
cmyr Dec 7, 2022
070662f
More consistent table builder names
cmyr Dec 12, 2022
9a53ab1
Compile OS/2 table
cmyr Dec 12, 2022
abe6f8c
Special handling for value records in vertical features
cmyr Dec 12, 2022
fbcb8f8
Fix bug with size feature name records
cmyr Dec 13, 2022
052acc6
Fix incorrect delta calculation
cmyr Dec 13, 2022
800b35d
Update test data submodule
cmyr Dec 14, 2022
8d35823
Do not ignore name ids 1-6
cmyr Dec 14, 2022
e7a2a7c
Consider finishing decoding name strings at some point
cmyr Dec 14, 2022
cd8839a
Fixup ligature sub sort order
cmyr Dec 14, 2022
790ccd8
Clippy fixups for 1.66
cmyr Dec 15, 2022
280149d
Add support for specifying required features
cmyr Dec 15, 2022
12ea0a5
Update test data
cmyr Dec 15, 2022
74a1485
Update write-fonts
cmyr Dec 16, 2022
6ecf047
Rework GPOS1 subtable compilation logic
cmyr Dec 17, 2022
f4ad020
Rework GPOS2 compilation
cmyr Dec 19, 2022
ce03dde
Update to 2021 edition
cmyr Dec 21, 2022
cc6cb45
Compile ChainContextual format 1
cmyr Dec 20, 2022
ceb0ee4
Compile ChainedSequenceContext format 2
cmyr Dec 20, 2022
a7a3626
Compile SequenceContextFormat1
cmyr Dec 20, 2022
5424e0c
Support explicit subtable breaks in contextual lookups
cmyr Dec 20, 2022
2b853e1
Match feaLib glyph class assignment
cmyr Dec 23, 2022
c2dd91c
Support deleting glyphs ('sub X by NULL')
cmyr Dec 23, 2022
e552ed5
Improve parsing of aalt feature
cmyr Dec 22, 2022
c96b992
Validate aalt feature
cmyr Dec 22, 2022
a1869a0
Small refactor in compile_ctx
cmyr Dec 22, 2022
2209b4d
Compile aalt feature
cmyr Dec 22, 2022
82cab05
Improve how we handle default language systems
cmyr Dec 22, 2022
e49af9e
Add compile::features module
cmyr Dec 27, 2022
6b4f992
Add compile::language_system module
cmyr Dec 27, 2022
2b60bd4
Tweak feature sort order (language before script)
cmyr Dec 24, 2022
43773e8
Move some validation into... validate.rs
cmyr Dec 28, 2022
7273e70
Rework logic for assigning lookups to lang/scripts
cmyr Dec 28, 2022
0038afb
Force GPOS7 to GPOS8, matching fonttools
cmyr Dec 29, 2022
54680e3
Handle zero-value valuerecords in PairPos
cmyr Dec 29, 2022
a555e86
Include non-inline lookups in included aalt features
cmyr Dec 29, 2022
459b648
Fix script + lookupflag interactions
cmyr Dec 29, 2022
42560ab
Build rest of GDEF table
cmyr Dec 29, 2022
3d77ccb
Refactor lookupflag tracking
cmyr Jan 4, 2023
153b927
Fix mark class ids in GPOS 4, 5, and 6
cmyr Jan 4, 2023
c4a64ad
Update some docs
cmyr Jan 5, 2023
9467ae2
Use clap instead of xflags for CLI args
cmyr Jan 5, 2023
f31b222
Allow compiler to support UFO input directly
cmyr Jan 5, 2023
4c1fe19
Add quickstart section to readme
cmyr Jan 5, 2023
6e34b3f
Cleanup and document everything
cmyr Jan 5, 2023
5c66978
Remove unused cursor methods
cmyr Jan 5, 2023
818753f
Bump version, update deps
cmyr Jan 5, 2023
ec93b5a
Add badges to Readme, add license files
cmyr Jan 5, 2023
5e50e0e
Make compile module public
cmyr Jan 7, 2023
cf5bbe2
Fix breakage in util::ttx
cmyr Jan 7, 2023
eb5af25
Add compile::get_post_glyph_order helper method
cmyr Jan 7, 2023
6ad0c69
Add cli option to get glyph order from font
cmyr Jan 7, 2023
ad02af4
Add maxp table when compiling font
cmyr Jan 7, 2023
8902a1a
Fix crash when highlighting long lines
cmyr Jan 7, 2023
c69620a
More robust lookup splitting
cmyr Jan 7, 2023
6fcee06
Add compile::Opts, make 'generate post table' an option
cmyr Jan 7, 2023
a3fb508
Mark fea-lsp as publish = false
cmyr Jan 9, 2023
b290ecd
Update test data
cmyr Jan 9, 2023
f1d9690
Add Filter utility to ttx.rs
cmyr Jan 9, 2023
5aeb618
Tests store glyph order as text instead of in font
cmyr Jan 9, 2023
a44a9f2
Improve aalt validation
cmyr Jan 9, 2023
203c45f
Ensure GDEF classes are disjoint
cmyr Jan 9, 2023
e6f1060
Improve lookup block validation
cmyr Jan 10, 2023
c8561c7
Error if named lookup name is reused
cmyr Jan 10, 2023
a7e92e2
Add additional test cases
cmyr Jan 10, 2023
31ba680
Ensure no mixing of gsub/gpos lookups
cmyr Jan 10, 2023
e16579e
Compare against expected ttx for custom compile tests
cmyr Jan 11, 2023
bc708c8
Move fonttools tests into main tests::compile module
cmyr Jan 11, 2023
4c76822
Setup venv in CI for ttx testing
cmyr Jan 11, 2023
68a4456
Remove old debug module
cmyr Jan 11, 2023
216a2cc
Update fonttools tests
cmyr Jan 11, 2023
5ddb23e
Sort and dedupe lookups before compilation
cmyr Jan 11, 2023
657cc04
Test that file with includes compiles correctly
cmyr Jan 11, 2023
ba2f715
Add better errors related to computing glyph order
cmyr Jan 12, 2023
d7dc91f
Fix a clippy lint
cmyr Jan 13, 2023
14b2909
Print warnings from ttx tests if FEA_VERBOSE set
cmyr Jan 12, 2023
d1365d1
Set up logging
cmyr Jan 12, 2023
975e9d7
Add a trait for (chain)contextual AstNodes
cmyr Jan 12, 2023
bd53cb2
Verify include stmt range is correct
cmyr Jan 12, 2023
4aa24df
Validate OS/2 sFamilyClass
cmyr Jan 12, 2023
37e6340
Improve rsub handling
cmyr Jan 12, 2023
0912ba8
Support ommiting 'by _' clause in GSUB 1 rules
cmyr Jan 12, 2023
8c40663
Compile ignore stmts with no marked glyphs
cmyr Jan 12, 2023
39e2a08
Support in-memory compilation
cmyr Jan 18, 2023
03d174f
Use Rc<str> instead of Arc<str>
cmyr Jan 19, 2023
29ae809
Cleanup API and imports
cmyr Jan 18, 2023
cb251fb
Clean up a few more old FIXMEs
cmyr Jan 13, 2023
8ef7464
Rename ::types to ::common
cmyr Jan 19, 2023
1db3d14
Move GlyphClass into own module
cmyr Jan 19, 2023
6d583ca
Rename compile::common -> compile::tags
cmyr Jan 19, 2023
8c0ae89
A few more visibility tweaks
cmyr Jan 19, 2023
e52d26e
Set version to 0.2.0, update some deps
cmyr Jan 23, 2023
e419e5d
Make ParseTree cheap to clone
cmyr Jan 19, 2023
3da961c
Add Compiler struct
cmyr Jan 19, 2023
ada0ba2
Final Compiler API docs and fixups
cmyr Jan 19, 2023
272ed19
Don't rebase absolute paths
cmyr Jan 23, 2023
f229d9a
Address review feedback
cmyr Jan 23, 2023
fbf7433
Use Arc instead of Rc
cmyr Jan 24, 2023
1c08f2f
Make CompilerError: Send
cmyr Jan 24, 2023
ec3e98f
Update fontations to 0.0.6 and update fea-rs to 0.2.1 so we can relea…
rsheeter Mar 1, 2023
be09432
Update per newfound understanding in https://github.com/googlefonts/f…
rsheeter Mar 1, 2023
111f31a
Name id fixup (#124)
cmyr Mar 22, 2023
51b904a
Update .gitignore
cmyr Mar 10, 2023
3be3073
Add release=false to fea-lsp/Cargo.toml
cmyr Mar 10, 2023
07fc463
Update version to 0.3.1
cmyr Mar 22, 2023
3a7df41
rebase_path can assume the current directory when base is empty ''
anthrotype Mar 23, 2023
22dfd9a
Document why we disable an assert when running tests
cmyr Apr 5, 2023
38334f4
bump write-fonts to 0.2.0
anthrotype May 15, 2023
fedc335
Bump version to 0.3.2
cmyr May 15, 2023
6e023a5
Update to latest write-fonts
rsheeter May 15, 2023
19e5073
Bring back Send test
rsheeter May 15, 2023
82b4c6b
Use type alias for write_fonts::Error
cmyr May 16, 2023
b2e7133
Allow inline multiple substitutions, fixes #99
simoncozens Apr 26, 2023
cd27e41
Bump version to 0.3.3
cmyr May 16, 2023
7be8d71
Update test-data submodule for #132
cmyr May 16, 2023
a1e99e3
Update write-fonts, bump version to 0.4.0
cmyr May 26, 2023
b7f02f1
Update dependencies
cmyr May 26, 2023
06fcf8c
Set deny(broken_intra_doc_links)
cmyr Jun 1, 2023
2e57775
Expose raw tables in Compilation type
cmyr Jun 1, 2023
39da8bb
Update write-fonts, bump version
cmyr Jun 1, 2023
b31324f
Update write-fonts, bump version
cmyr Jun 6, 2023
b6f60ba
Improve diff printing
cmyr Jun 13, 2023
c07e54b
Improve accuracy of parse error diagnostic
cmyr Jun 14, 2023
db04d03
Always check for expected diff in ttx tests
cmyr Jun 14, 2023
bb87498
Mark more fonttools tests as acceptable diffs
cmyr Jun 14, 2023
84dca66
Disable some fonttools tests in CI, run the rest
cmyr Jun 14, 2023
01cc187
Support named value records (valueRecordDef)
cmyr Jun 13, 2023
2258462
Update to write-fonts 0.7, bump version to 0.7
cmyr Jun 15, 2023
8635eee
Fixup parsing of OS/2 vendor tag
cmyr Jun 15, 2023
639c33c
Parse conditionset nodes
cmyr Jun 12, 2023
06d000f
Parse variation blocks
cmyr Jun 12, 2023
966cf24
Support parsing variable metrics
cmyr Jun 15, 2023
16af483
Validate variation & condset blocks
cmyr Jun 16, 2023
d2bc5c9
Add AllFeatures struct
cmyr Jun 19, 2023
9e7a8c9
Move size/aalt feature state into AllFeatures
cmyr Jun 19, 2023
1e238b8
Move ssNN and cvNN feature stuff into AllFeatures
cmyr Jun 19, 2023
f722f36
Track required features in AllFeatures
cmyr Jun 19, 2023
981347e
Build feature params in AllFeatures
cmyr Jun 19, 2023
1056361
Move lookup splitting logic into features.rs
cmyr Jun 21, 2023
d07e6e3
Bump to 0.8.0
cmyr Jun 21, 2023
24553fb
Make colorizing diagnostics optional
cmyr Jun 22, 2023
0fa7a00
Add VariationInfo trait
cmyr Jun 20, 2023
e275f43
Compile feature variations
cmyr Jun 21, 2023
795c869
More rigorous variable metric parsing
cmyr Jun 23, 2023
28d8685
Use stable ConditionSet sort order
cmyr Jun 22, 2023
855ac98
Use builder method to pass VariationInfo to compiler
cmyr Jun 26, 2023
3aa1b75
Improve docs in compile_ctx.rs
cmyr Jun 15, 2023
865a220
Validate variable metrics
cmyr Jun 23, 2023
fe49ebf
Move test-data into root repository
cmyr Jun 27, 2023
1763d3c
Add a 'testing' section to the readme.
cmyr Jun 16, 2023
492cedc
Parse contextual pos with trailing value record
cmyr Jun 28, 2023
8fafa1a
Compile funky GPOS contextual trailing rule
cmyr Jun 28, 2023
5756ed0
Add full parse test for glyph/range disambiguation
cmyr Jun 28, 2023
659efcc
Clarify some function names, improve comments
cmyr Jun 28, 2023
26e4b33
Fix breakage from merge
cmyr Jun 29, 2023
4c64d5c
Bump version to 0.8.1
cmyr Jun 29, 2023
d33a432
Split up the tables module
cmyr Jul 2, 2023
c579741
Update write-fonts, bump version to 0.9.0
cmyr Jul 4, 2023
47e8f61
Fixup loading of test-data for non-tests
cmyr Jul 5, 2023
89aff53
Tweak validation behaviour of redefined lookupflags
cmyr Jun 29, 2023
0b67a72
Support mixed GSUB Type 1 and Type 2 rules
cmyr Jul 5, 2023
f8d0e60
Sketch out API for getting deltas from the compiler
cmyr Jun 30, 2023
21cf3e9
Make VariationInfo::resolve_..metric return Result
cmyr Jul 1, 2023
cc904d6
Fixup some signatures
cmyr Jul 5, 2023
d31e8e4
Build variable metrics in anchor tables
cmyr Jul 5, 2023
0d6d97b
Bump version to v0.9.1
cmyr Jul 6, 2023
082fa2d
Update write-fonts, bump version to 0.10.0
cmyr Jul 19, 2023
6c41dd7
Use ValueRecord builder methods
cmyr Jul 20, 2023
0bf0b27
More careful zeroing of value records
cmyr Jul 20, 2023
8502b87
First pass at a VarStoreBuilder
cmyr Jul 3, 2023
be256e5
Remap VarStore references after compilation
cmyr Jul 5, 2023
435a087
First pass at compiling a packed ItemVariationStore
cmyr Jul 10, 2023
3bff593
Fix VarStore testing
cmyr Jul 11, 2023
55c7b45
Correctly write empty value records
cmyr Jul 20, 2023
f0f8db3
Bump version to 0.11.0
cmyr Jul 25, 2023
622cf8a
Update for new FontBuilder API
cmyr Aug 2, 2023
1008f4a
Put clap & norad behind 'cli' feature
cmyr Aug 7, 2023
340fb70
bump write-fonts to 0.14.0
anthrotype Aug 10, 2023
612b3e8
Fix failing doctest in compile/compiler.rs
anthrotype Aug 10, 2023
8f340e4
bump minor version in fea-rs crate to 0.13.0
anthrotype Aug 10, 2023
aa73abd
Merge pull request #197 from cmyr/write-fonts-0-14
anthrotype Aug 10, 2023
292dc70
[ci] Ensure doctests run in CI
cmyr Aug 10, 2023
06dbc68
Use the PendingVariationIndex table instead of DeltaKey
cmyr Jul 26, 2023
27c576b
Check for VarStore in GDEF when deciding to build
cmyr Aug 15, 2023
7c4d990
Bump to 0.13.1
cmyr Aug 15, 2023
03f266f
VarStore: skip writing deltas for zero regions
cmyr Aug 16, 2023
ca3eb97
VarStore: add test that includes explicit zero deltas
cmyr Aug 16, 2023
f447791
Bump to 0.13.2
cmyr Aug 17, 2023
aed9d40
Cleanup some lookup builders
cmyr Aug 20, 2023
a54f9ae
Parse suffixes in axis locations
cmyr Aug 15, 2023
8dc959e
Add AxisLocation enum
cmyr Aug 16, 2023
bd1cf05
Bump version to 0.14.0
cmyr Aug 21, 2023
8b8f597
Use Display instead of Debug for printing CLI errors
cmyr Aug 18, 2023
4d7ea2f
Mark fonttools diff for spec5f_ii_3 as ok
cmyr Aug 21, 2023
5049319
Minor refactor of contextual lookup compilation
cmyr Aug 21, 2023
299edbc
More efficient generation of anonymous lookups
cmyr Aug 18, 2023
b91bb9d
Clarify & document anonymous lookup API
cmyr Aug 18, 2023
17bf0c4
Add expected diff to fonttools test spec5f_ii_4.fea
cmyr Aug 18, 2023
97dd42e
[ci] Remove code to ignore certain test cases in CI
cmyr Aug 21, 2023
f75462a
Cleanup old comments
cmyr Aug 22, 2023
892dd23
Remove commented out value record format test case
cmyr Aug 22, 2023
8c9dbac
Ensure we compile arbitrarily long device records
cmyr Aug 22, 2023
39f08e3
Store AxisLocation as f32, not Fixed
cmyr Aug 23, 2023
853477f
Bump version to 0.15.0
cmyr Aug 24, 2023
617ec7f
[rustfmt] Run updated formatter
cmyr Aug 25, 2023
5b23c17
Only print up to some maximum number of errors
cmyr Aug 23, 2023
d7bcd76
Add compiler option to specify number of errors to print
cmyr Aug 23, 2023
98396b3
Change format size log level to 'trace'
cmyr Sep 7, 2023
9676a6e
Bump crate version, update write-fonts
cmyr Sep 8, 2023
88c7c0e
Update to new resolver
cmyr Sep 11, 2023
497f51c
Fix crash when trying to write all-zero deltas
cmyr Aug 22, 2023
bf56008
Accept naked semi ('null statements')
cmyr Sep 13, 2023
b42e96d
Bump version to 0.16.1
cmyr Sep 13, 2023
8609462
Update deps, bump version
cmyr Sep 28, 2023
478a183
bump write-fonts to 0.17.0
anthrotype Oct 4, 2023
6827cf9
Merge pull request #233 from cmyr/bump-write-fonts
anthrotype Oct 4, 2023
0ff8c5a
bump version
anthrotype Oct 4, 2023
19a3667
[clippy] Push the rock back up the hill
cmyr Oct 11, 2023
04fc44f
Merge pull request #237 from cmyr/clippy-time
rsheeter Oct 11, 2023
5e86415
Allow specifying variation info at the CLI
cmyr Oct 11, 2023
5f8590e
Clean up in preparation for move to fontc repo
cmyr Oct 25, 2023
739f143
Merge fea-rs into fontc
cmyr Oct 25, 2023
e303f72
Fixup test path discovery
cmyr Oct 25, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
111 changes: 111 additions & 0 deletions .github/workflows/fea-rs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
on:
pull_request:
push:
branches:
- main
tags:
- "*"

name: Continuous integration

jobs:
check:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- run: rustup component add rustfmt

- name: rustfmt check
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

- name: cargo doc
uses: actions-rs/cargo@v1
with:
command: doc
args: --all-features --document-private-items

clippy-lint:
name: Clippy lints
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: clippy
profile: minimal
override: true

- name: cargo clippy --all-features
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-features --all-targets -- -D warnings

- name: cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-targets --no-default-features -- -D warnings

test-all-targets:
name: cargo test all-targets
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: getsentry/[email protected]
id: venv
with:
python-version: 3.10.7
requirement-files: requirements.txt
- run: pip install -r requirements.txt
if: steps.venv.outputs.cache-hit != 'true'

- name: install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true

- name: cargo test all-targets
uses: actions-rs/cargo@v1
with:
command: test
args: --all-targets --all-features


test-basic:
name: cargo test basic
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: getsentry/[email protected]
id: venv
with:
python-version: 3.10.7
requirement-files: requirements.txt
- run: pip install -r requirements.txt
if: steps.venv.outputs.cache-hit != 'true'

- name: install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true

- name: cargo test basic
uses: actions-rs/cargo@v1
with:
command: test

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ Cargo.lock
.venv/

.DS_Store

Empty file added .gitmodules
Empty file.
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,6 @@ members = [
"glyphs2fontir",
"ufo2fontir",
"fontc",
"fea-rs",
"fea-lsp",
]
17 changes: 17 additions & 0 deletions fea-lsp/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[package]
name = "fea-lsp"
version = "0.1.0"
edition = "2018"
publish = false

[dependencies]
fea-rs = {version = "0", path = "../fea-rs"}
lspower = "1.1.0"
tokio = { version = "1.3", features = ["io-std", "io-util", "macros", "net", "rt-multi-thread", "sync", "time"] }
serde_json = "1.0"
anyhow = "1.0"
env_logger = "0.10"

# cargo-release settings
[package.metadata.release]
release = false
8 changes: 8 additions & 0 deletions fea-lsp/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# FEA Language Server

This crate is an experimental [language server][] for Adobe OpenType Feature
files.

It is an experiment, and not supported or intended for use.

[language server]: https://microsoft.github.io/language-server-protocol/
5 changes: 5 additions & 0 deletions fea-lsp/editors/vscode/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules/**
client/node_modules/**
client/out/**
server/node_modules/**
server/out/**
20 changes: 20 additions & 0 deletions fea-lsp/editors/vscode/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/**@type {import('eslint').Linter.Config} */
// eslint-disable-next-line no-undef
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint',
],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
],
rules: {
'semi': [2, "always"],
'@typescript-eslint/no-unused-vars': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/explicit-module-boundary-types': 0,
'@typescript-eslint/no-non-null-assertion': 0,
}
};
4 changes: 4 additions & 0 deletions fea-lsp/editors/vscode/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
out
node_modules
client/server
.vscode-test
9 changes: 9 additions & 0 deletions fea-lsp/editors/vscode/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp

// List of extensions which should be recommended for users of this workspace.
"recommendations": [
"dbaeumer.vscode-eslint"
]
}
44 changes: 44 additions & 0 deletions fea-lsp/editors/vscode/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// A launch configuration that compiles the extension and then opens it inside a new window
{
"version": "0.2.0",
"configurations": [
{
"type": "extensionHost",
"request": "launch",
"name": "Launch Client",
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceRoot}"],
"outFiles": ["${workspaceRoot}/client/out/**/*.js"],
"preLaunchTask": {
"type": "npm",
"script": "watch"
}
},
{
"type": "node",
"request": "attach",
"name": "Attach to Server",
"port": 6009,
"restart": true,
"outFiles": ["${workspaceRoot}/server/out/**/*.js"]
},
{
"name": "Language Server E2E Test",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceRoot}",
"--extensionTestsPath=${workspaceRoot}/client/out/test/index",
"${workspaceRoot}/client/testFixture"
],
"outFiles": ["${workspaceRoot}/client/out/test/**/*.js"]
}
],
"compounds": [
{
"name": "Client + Server",
"configurations": ["Launch Client", "Attach to Server"]
}
]
}
8 changes: 8 additions & 0 deletions fea-lsp/editors/vscode/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"editor.insertSpaces": false,
"typescript.tsc.autoDetect": "off",
"typescript.preferences.quoteStyle": "single",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
}
33 changes: 33 additions & 0 deletions fea-lsp/editors/vscode/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "compile",
"group": "build",
"presentation": {
"panel": "dedicated",
"reveal": "never"
},
"problemMatcher": [
"$tsc"
]
},
{
"type": "npm",
"script": "watch",
"isBackground": true,
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"panel": "dedicated",
"reveal": "never"
},
"problemMatcher": [
"$tsc-watch"
]
}
]
}
15 changes: 15 additions & 0 deletions fea-lsp/editors/vscode/.vscodeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.vscode/**
**/*.ts
**/*.map
.gitignore
**/tsconfig.json
**/tsconfig.base.json
contributing.md
.travis.yml
client/node_modules/**
!client/node_modules/vscode-jsonrpc/**
!client/node_modules/vscode-languageclient/**
!client/node_modules/vscode-languageserver-protocol/**
!client/node_modules/vscode-languageserver-types/**
!client/node_modules/{minimatch,brace-expansion,concat-map,balanced-match}/**
!client/node_modules/{semver,lru-cache,yallist}/**
26 changes: 26 additions & 0 deletions fea-lsp/editors/vscode/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# VSCode Extension

This is very hacky and probably not a great experience right now; it was
intended as a proof of concept. Use at your peril.


Installation:

this extension is not published, and has to be run manually. First, you will
need to compile the `fea-lsp` crate in the parent directory, and move the
binary somewhere where you can easily find it, such as `~/.fea-lsp/fea-lsp`.

Then from from this directory, run:

```sh
npm install
npm run compile
```

Open this directory in VSCode. From the 'run and debug' sidebar, run the 'Launch
Client' command. This will open a new VSCode window with the extenstion enabled.

To actually make it work, you need to point it the location of the `fea-lsp`
binary you compiled earlier. Open VSCode settings, and search for 'fea'. At the
bottom you should find a setting "fea-lsp > Server: Path", where you can enter
the path to the binary.
29 changes: 29 additions & 0 deletions fea-lsp/editors/vscode/language-configuration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"comments": {
// symbol used for single line comment. Remove this entry if your language does not support line comments
"lineComment": "#"
},
// symbols used as brackets
"brackets": [
["{", "}"],
["[", "]"],
["(", ")"],
["<", ">"]
],
// symbols that are auto closed when typing
"autoClosingPairs": [
["{", "}"],
["[", "]"],
["(", ")"],
["\"", "\""]
],
// symbols that can be used to surround a selection
"surroundingPairs": [
["{", "}"],
["[", "]"],
["(", ")"],
["<", ">"],
["\"", "\""]
]
}

Loading